chore: adopt markdownlint and markdown-table-formatter for *.md (#15831)

Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
This commit is contained in:
Muhammad Atif Ali
2025-01-03 18:12:59 +05:00
committed by GitHub
parent 08463c27d8
commit 94f5d52fdc
255 changed files with 18279 additions and 16786 deletions

45
.github/workflows/docs-ci.yaml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Docs CI
on:
push:
branches:
- main
paths:
- "docs/**"
- "**.md"
- ".github/workflows/docs-ci.yaml"
pull_request:
paths:
- "docs/**"
- "**.md"
- ".github/workflows/docs-ci.yaml"
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Setup Node
uses: ./.github/actions/setup-node
- uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366 # v45.0.5
id: changed-files
with:
files: |
docs/**
**.md
separator: ","
- name: lint
if: steps.changed-files.outputs.any_changed == 'true'
run: |
pnpm exec markdownlint-cli2 ${{ steps.changed-files.outputs.all_changed_files }}
- name: fmt
if: steps.changed-files.outputs.any_changed == 'true'
run: |
# markdown-table-formatter requires a space separated list of files
echo ${{ steps.changed-files.outputs.all_changed_files }} | tr ',' '\n' | pnpm exec markdown-table-formatter --check

31
.markdownlint.jsonc Normal file
View File

@ -0,0 +1,31 @@
// Example markdownlint configuration with all properties set to their default value
{
"MD010": { "spaces_per_tab": 4}, // No hard tabs: we use 4 spaces per tab
"MD013": false, // Line length: we are not following a strict line lnegth in markdown files
"MD024": { "siblings_only": true }, // Multiple headings with the same content:
"MD033": false, // Inline HTML: we use it in some places
"MD034": false, // Bare URL: we use it in some places in generated docs e.g.
// codersdk/deployment.go L597, L1177, L2287, L2495, L2533
// codersdk/workspaceproxy.go L196, L200-L201
// coderd/tracing/exporter.go L26
// cli/exp_scaletest.go L-9
"MD041": false, // First line in file should be a top level heading: All of our changelogs do not start with a top level heading
// TODO: We need to update /home/coder/repos/coder/coder/scripts/release/generate_release_notes.sh to generate changelogs that follow this rule
"MD052": false, // Image reference: Not a valid reference in generated docs
// docs/reference/cli/server.md L628
"MD055": false, // Table pipe style: Some of the generated tables do not have ending pipes
// docs/reference/api/schema.md
// docs/reference/api/templates.md
// docs/reference/cli/server.md
"MD056": false // Table column count: Some of the auto-generated tables have issues. TODO: This is probably because of splitting cell content to multiple lines.
// docs/reference/api/schema.md
// docs/reference/api/templates.md
}

View File

@ -1,96 +0,0 @@
# Code generated by Makefile (.gitignore .prettierignore.include). DO NOT EDIT.
# .gitignore:
# Common ignore patterns, these rules applies in both root and subdirectories.
.DS_Store
.eslintcache
.gitpod.yml
.idea
**/*.swp
gotests.coverage
gotests.xml
gotests_stats.json
gotests.json
node_modules/
vendor/
yarn-error.log
# VSCode settings.
**/.vscode/*
# Allow VSCode recommendations and default settings in project root.
!/.vscode/extensions.json
!/.vscode/settings.json
# Allow code snippets
!/.vscode/*.code-snippets
# Front-end ignore patterns.
.next/
site/build-storybook.log
site/coverage/
site/storybook-static/
site/test-results/*
site/e2e/test-results/*
site/e2e/states/*.json
site/e2e/.auth.json
site/playwright-report/*
site/.swc
# Make target for updating golden files (any dir).
.gen-golden
# Build
build/
dist/
out/
# Bundle analysis
site/stats/
*.tfstate
*.tfstate.backup
*.tfplan
*.lock.hcl
.terraform/
**/.coderv2/*
**/__debug_bin
# direnv
.envrc
*.test
# Loadtesting
./scaletest/terraform/.terraform
./scaletest/terraform/.terraform.lock.hcl
scaletest/terraform/secrets.tfvars
.terraform.tfstate.*
# Nix
result
# Data dumps from unit tests
**/*.test.sql
# Filebrowser.db
**/filebrowser.db
# pnpm
.pnpm-store/
# Zed
.zed_server
# .prettierignore.include:
# Helm templates contain variables that are invalid YAML and can't be formatted
# by Prettier.
helm/**/templates/*.yaml
# Testdata shouldn't be formatted.
testdata/
# Ignore generated files
**/pnpm-lock.yaml
**/*.gen.json
# Everything in site/ is formatted by Biome. For the rest of the repo though, we
# need broader language support.
site/

View File

@ -1,14 +0,0 @@
# Helm templates contain variables that are invalid YAML and can't be formatted
# by Prettier.
helm/**/templates/*.yaml
# Testdata shouldn't be formatted.
testdata/
# Ignore generated files
**/pnpm-lock.yaml
**/*.gen.json
# Everything in site/ is formatted by Biome. For the rest of the repo though, we
# need broader language support.
site/

View File

@ -1,16 +1,16 @@
{ {
"recommendations": [ "recommendations": [
"biomejs.biome",
"bradlc.vscode-tailwindcss",
"DavidAnson.vscode-markdownlint",
"EditorConfig.EditorConfig",
"emeraldwalk.runonsave",
"foxundermoon.shell-format",
"github.vscode-codeql", "github.vscode-codeql",
"golang.go", "golang.go",
"hashicorp.terraform", "hashicorp.terraform",
"esbenp.prettier-vscode",
"foxundermoon.shell-format",
"emeraldwalk.runonsave",
"zxh404.vscode-proto3",
"redhat.vscode-yaml", "redhat.vscode-yaml",
"tekumara.typos-vscode", "tekumara.typos-vscode",
"EditorConfig.EditorConfig", "zxh404.vscode-proto3"
"biomejs.biome",
"bradlc.vscode-tailwindcss"
] ]
} }

View File

@ -1 +1,2 @@
[https://coder.com/docs/coder-oss/latest/contributing/CODE_OF_CONDUCT](https://coder.com/docs/contributing/CODE_OF_CONDUCT) <!-- markdownlint-disable MD041 -->
[https://coder.com/docs/contributing/CODE_OF_CONDUCT](https://coder.com/docs/contributing/CODE_OF_CONDUCT)

View File

@ -1 +1,2 @@
https://coder.com/docs/CONTRIBUTING <!-- markdownlint-disable MD041 -->
[https://coder.com/docs/CONTRIBUTING](https://coder.com/docs/CONTRIBUTING)

View File

@ -414,7 +414,7 @@ BOLD := $(shell tput bold 2>/dev/null)
GREEN := $(shell tput setaf 2 2>/dev/null) GREEN := $(shell tput setaf 2 2>/dev/null)
RESET := $(shell tput sgr0 2>/dev/null) RESET := $(shell tput sgr0 2>/dev/null)
fmt: fmt/ts fmt/go fmt/terraform fmt/shfmt fmt/prettier fmt: fmt/ts fmt/go fmt/terraform fmt/shfmt fmt/biome fmt/markdown
.PHONY: fmt .PHONY: fmt
fmt/go: fmt/go:
@ -438,15 +438,16 @@ else
endif endif
.PHONY: fmt/ts .PHONY: fmt/ts
fmt/prettier: .prettierignore fmt/biome:
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/prettier$(RESET)" echo "$(GREEN)==>$(RESET) $(BOLD)fmt/biome$(RESET)"
cd site
# Avoid writing files in CI to reduce file write activity # Avoid writing files in CI to reduce file write activity
ifdef CI ifdef CI
pnpm run format:check pnpm run format:check
else else
pnpm run format pnpm run format
endif endif
.PHONY: fmt/prettier .PHONY: fmt/biome
fmt/terraform: $(wildcard *.tf) fmt/terraform: $(wildcard *.tf)
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/terraform$(RESET)" echo "$(GREEN)==>$(RESET) $(BOLD)fmt/terraform$(RESET)"
@ -463,7 +464,13 @@ else
endif endif
.PHONY: fmt/shfmt .PHONY: fmt/shfmt
lint: lint/shellcheck lint/go lint/ts lint/examples lint/helm lint/site-icons fmt/markdown:
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/markdown$(RESET)"
./scripts/pnpm_install.sh
pnpm format-docs
.PHONY: fmt/markdown
lint: lint/shellcheck lint/go lint/ts lint/examples lint/helm lint/site-icons lint/markdown
.PHONY: lint .PHONY: lint
lint/site-icons: lint/site-icons:
@ -497,6 +504,11 @@ lint/helm:
make lint make lint
.PHONY: lint/helm .PHONY: lint/helm
lint/markdown:
./scripts/pnpm_install.sh
pnpm lint-docs
.PHONY: lint/markdown
# All files generated by the database should be added here, and this can be used # All files generated by the database should be added here, and this can be used
# as a target for jobs that need to run after the database is generated. # as a target for jobs that need to run after the database is generated.
DB_GEN_FILES := \ DB_GEN_FILES := \
@ -530,8 +542,6 @@ GEN_FILES := \
docs/reference/cli/index.md \ docs/reference/cli/index.md \
docs/admin/security/audit-logs.md \ docs/admin/security/audit-logs.md \
coderd/apidoc/swagger.json \ coderd/apidoc/swagger.json \
.prettierignore.include \
.prettierignore \
provisioner/terraform/testdata/version \ provisioner/terraform/testdata/version \
site/e2e/provisionerGenerated.ts \ site/e2e/provisionerGenerated.ts \
site/src/theme/icons.json \ site/src/theme/icons.json \
@ -566,8 +576,6 @@ gen/mark-fresh:
docs/reference/cli/index.md \ docs/reference/cli/index.md \
docs/admin/security/audit-logs.md \ docs/admin/security/audit-logs.md \
coderd/apidoc/swagger.json \ coderd/apidoc/swagger.json \
.prettierignore.include \
.prettierignore \
site/e2e/provisionerGenerated.ts \ site/e2e/provisionerGenerated.ts \
site/src/theme/icons.json \ site/src/theme/icons.json \
examples/examples.gen.json \ examples/examples.gen.json \
@ -648,6 +656,9 @@ vpn/vpn.pb.go: vpn/vpn.proto
site/src/api/typesGenerated.ts: $(wildcard scripts/apitypings/*) $(shell find ./codersdk $(FIND_EXCLUSIONS) -type f -name '*.go') site/src/api/typesGenerated.ts: $(wildcard scripts/apitypings/*) $(shell find ./codersdk $(FIND_EXCLUSIONS) -type f -name '*.go')
# -C sets the directory for the go run command # -C sets the directory for the go run command
go run -C ./scripts/apitypings main.go > $@ go run -C ./scripts/apitypings main.go > $@
cd site
../scripts/pnpm_install.sh
pnpm exec biome format --write src/api/typesGenerated.ts
site/e2e/provisionerGenerated.ts: provisionerd/proto/provisionerd.pb.go provisionersdk/proto/provisioner.pb.go site/e2e/provisionerGenerated.ts: provisionerd/proto/provisionerd.pb.go provisionersdk/proto/provisioner.pb.go
cd site cd site
@ -656,8 +667,9 @@ site/e2e/provisionerGenerated.ts: provisionerd/proto/provisionerd.pb.go provisio
site/src/theme/icons.json: $(wildcard scripts/gensite/*) $(wildcard site/static/icon/*) site/src/theme/icons.json: $(wildcard scripts/gensite/*) $(wildcard site/static/icon/*)
go run ./scripts/gensite/ -icons "$@" go run ./scripts/gensite/ -icons "$@"
./scripts/pnpm_install.sh cd site
pnpm -C site/ exec biome format --write src/theme/icons.json ../scripts/pnpm_install.sh
pnpm exec biome format --write src/theme/icons.json
examples/examples.gen.json: scripts/examplegen/main.go examples/examples.go $(shell find ./examples/templates) examples/examples.gen.json: scripts/examplegen/main.go examples/examples.go $(shell find ./examples/templates)
go run ./scripts/examplegen/main.go > examples/examples.gen.json go run ./scripts/examplegen/main.go > examples/examples.gen.json
@ -676,29 +688,45 @@ codersdk/rbacresources_gen.go: scripts/typegen/codersdk.gotmpl scripts/typegen/m
site/src/api/rbacresourcesGenerated.ts: scripts/typegen/codersdk.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go site/src/api/rbacresourcesGenerated.ts: scripts/typegen/codersdk.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
go run scripts/typegen/main.go rbac typescript > "$@" go run scripts/typegen/main.go rbac typescript > "$@"
cd site
../scripts/pnpm_install.sh
pnpm exec biome format --write src/api/rbacresourcesGenerated.ts
site/src/api/countriesGenerated.ts: scripts/typegen/countries.tstmpl scripts/typegen/main.go codersdk/countries.go site/src/api/countriesGenerated.ts: scripts/typegen/countries.tstmpl scripts/typegen/main.go codersdk/countries.go
go run scripts/typegen/main.go countries > "$@" go run scripts/typegen/main.go countries > "$@"
cd site
../scripts/pnpm_install.sh
pnpm exec biome format --write src/api/countriesGenerated.ts
docs/admin/integrations/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics docs/admin/integrations/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics
go run scripts/metricsdocgen/main.go go run scripts/metricsdocgen/main.go
./scripts/pnpm_install.sh ./scripts/pnpm_install.sh
pnpm exec prettier --write ./docs/admin/integrations/prometheus.md pnpm exec markdownlint-cli2 --fix ./docs/admin/integrations/prometheus.md
pnpm exec markdown-table-formatter ./docs/admin/integrations/prometheus.md
docs/reference/cli/index.md: scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES) docs/reference/cli/index.md: scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES)
CI=true BASE_PATH="." go run ./scripts/clidocgen CI=true BASE_PATH="." go run ./scripts/clidocgen
./scripts/pnpm_install.sh ./scripts/pnpm_install.sh
pnpm exec prettier --write ./docs/reference/cli/index.md ./docs/reference/cli/*.md ./docs/manifest.json pnpm exec markdownlint-cli2 --fix ./docs/reference/cli/*.md
pnpm exec markdown-table-formatter ./docs/reference/cli/*.md
cd site
../scripts/pnpm_install.sh
pnpm exec biome format --write ../docs/manifest.json
docs/admin/security/audit-logs.md: coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go docs/admin/security/audit-logs.md: coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go
go run scripts/auditdocgen/main.go go run scripts/auditdocgen/main.go
./scripts/pnpm_install.sh ./scripts/pnpm_install.sh
pnpm exec prettier --write ./docs/admin/security/audit-logs.md pnpm exec markdownlint-cli2 --fix ./docs/admin/security/audit-logs.md
pnpm exec markdown-table-formatter ./docs/admin/security/audit-logs.md
coderd/apidoc/swagger.json: $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS) -type f) $(wildcard coderd/*.go) $(wildcard enterprise/coderd/*.go) $(wildcard codersdk/*.go) $(wildcard enterprise/wsproxy/wsproxysdk/*.go) $(DB_GEN_FILES) .swaggo docs/manifest.json coderd/rbac/object_gen.go coderd/apidoc/swagger.json: $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS) -type f) $(wildcard coderd/*.go) $(wildcard enterprise/coderd/*.go) $(wildcard codersdk/*.go) $(wildcard enterprise/wsproxy/wsproxysdk/*.go) $(DB_GEN_FILES) .swaggo docs/manifest.json coderd/rbac/object_gen.go
./scripts/apidocgen/generate.sh ./scripts/apidocgen/generate.sh
./scripts/pnpm_install.sh ./scripts/pnpm_install.sh
pnpm exec prettier --write ./docs/reference/api ./docs/manifest.json ./coderd/apidoc/swagger.json pnpm exec markdownlint-cli2 --fix ./docs/reference/api/*.md
pnpm exec markdown-table-formatter ./docs/reference/api/*.md
cd site
../scripts/pnpm_install.sh
pnpm exec biome format --write ../docs/manifest.json ../coderd/apidoc/swagger.json
update-golden-files: \ update-golden-files: \
cli/testdata/.gen-golden \ cli/testdata/.gen-golden \
@ -769,15 +797,6 @@ provisioner/terraform/testdata/version:
fi fi
.PHONY: provisioner/terraform/testdata/version .PHONY: provisioner/terraform/testdata/version
# Combine .gitignore with .prettierignore.include to generate .prettierignore.
.prettierignore: .gitignore .prettierignore.include
echo "# Code generated by Makefile ($^). DO NOT EDIT." > "$@"
echo "" >> "$@"
for f in $^; do
echo "# $${f}:" >> "$@"
cat "$$f" >> "$@"
done
test: test:
$(GIT_FLAGS) gotestsum --format standard-quiet -- -v -short -count=1 ./... $(GIT_FLAGS) gotestsum --format standard-quiet -- -v -short -count=1 ./...
.PHONY: test .PHONY: test

View File

@ -1,9 +1,10 @@
<!-- markdownlint-disable MD041 -->
<div align="center"> <div align="center">
<a href="https://coder.com#gh-light-mode-only"> <a href="https://coder.com#gh-light-mode-only">
<img src="./docs/images/logo-black.png" style="width: 128px"> <img src="./docs/images/logo-black.png" alt="Coder Logo Light" style="width: 128px">
</a> </a>
<a href="https://coder.com#gh-dark-mode-only"> <a href="https://coder.com#gh-dark-mode-only">
<img src="./docs/images/logo-white.png" style="width: 128px"> <img src="./docs/images/logo-white.png" alt="Coder Logo Dark" style="width: 128px">
</a> </a>
<h1> <h1>
@ -11,10 +12,10 @@
</h1> </h1>
<a href="https://coder.com#gh-light-mode-only"> <a href="https://coder.com#gh-light-mode-only">
<img src="./docs/images/banner-black.png" style="width: 650px"> <img src="./docs/images/banner-black.png" alt="Coder Banner Light" style="width: 650px">
</a> </a>
<a href="https://coder.com#gh-dark-mode-only"> <a href="https://coder.com#gh-dark-mode-only">
<img src="./docs/images/banner-white.png" style="width: 650px"> <img src="./docs/images/banner-white.png" alt="Coder Banner Dark" style="width: 650px">
</a> </a>
<br> <br>
@ -40,14 +41,14 @@
- Onboard developers in seconds instead of days - Onboard developers in seconds instead of days
<p align="center"> <p align="center">
<img src="./docs/images/hero-image.png"> <img src="./docs/images/hero-image.png" alt="Coder Hero Image">
</p> </p>
## Quickstart ## Quickstart
The most convenient way to try Coder is to install it on your local machine and experiment with provisioning cloud development environments using Docker (works on Linux, macOS, and Windows). The most convenient way to try Coder is to install it on your local machine and experiment with provisioning cloud development environments using Docker (works on Linux, macOS, and Windows).
``` ```shell
# First, install Coder # First, install Coder
curl -L https://coder.com/install.sh | sh curl -L https://coder.com/install.sh | sh
@ -65,7 +66,7 @@ The easiest way to install Coder is to use our
and macOS. For Windows, use the latest `..._installer.exe` file from GitHub and macOS. For Windows, use the latest `..._installer.exe` file from GitHub
Releases. Releases.
```bash ```shell
curl -L https://coder.com/install.sh | sh curl -L https://coder.com/install.sh | sh
``` ```

View File

@ -8,7 +8,7 @@ to us, what we expect, what you can expect from us.
You can see the pretty version [here](https://coder.com/security/policy) You can see the pretty version [here](https://coder.com/security/policy)
# Why Coder's security matters ## Why Coder's security matters
If an attacker could fully compromise a Coder installation, they could spin up If an attacker could fully compromise a Coder installation, they could spin up
expensive workstations, steal valuable credentials, or steal proprietary source expensive workstations, steal valuable credentials, or steal proprietary source
@ -16,13 +16,13 @@ code. We take this risk very seriously and employ routine pen testing,
vulnerability scanning, and code reviews. We also welcome the contributions from vulnerability scanning, and code reviews. We also welcome the contributions from
the community that helped make this product possible. the community that helped make this product possible.
# Where should I report security issues? ## Where should I report security issues?
Please report security issues to security@coder.com, providing all relevant Please report security issues to <security@coder.com>, providing all relevant
information. The more details you provide, the easier it will be for us to information. The more details you provide, the easier it will be for us to
triage and fix the issue. triage and fix the issue.
# Out of Scope ## Out of Scope
Our primary concern is around an abuse of the Coder application that allows an Our primary concern is around an abuse of the Coder application that allows an
attacker to gain access to another users workspace, or spin up unwanted attacker to gain access to another users workspace, or spin up unwanted
@ -40,7 +40,7 @@ workspaces.
out-of-scope systems should be reported to the appropriate vendor or out-of-scope systems should be reported to the appropriate vendor or
applicable authority. applicable authority.
# Our Commitments ## Our Commitments
When working with us, according to this policy, you can expect us to: When working with us, according to this policy, you can expect us to:
@ -53,7 +53,7 @@ When working with us, according to this policy, you can expect us to:
- Extend Safe Harbor for your vulnerability research that is related to this - Extend Safe Harbor for your vulnerability research that is related to this
policy. policy.
# Our Expectations ## Our Expectations
In participating in our vulnerability disclosure program in good faith, we ask In participating in our vulnerability disclosure program in good faith, we ask
that you: that you:

View File

@ -459,8 +459,8 @@ termsOfServiceURL: ""
# (default: ed25519, type: string) # (default: ed25519, type: string)
sshKeygenAlgorithm: ed25519 sshKeygenAlgorithm: ed25519
# URL to use for agent troubleshooting when not set in the template. # URL to use for agent troubleshooting when not set in the template.
# (default: https://coder.com/docs/templates/troubleshooting, type: url) # (default: https://coder.com/docs/admin/templates/troubleshooting, type: url)
agentFallbackTroubleshootingURL: https://coder.com/docs/templates/troubleshooting agentFallbackTroubleshootingURL: https://coder.com/docs/admin/templates/troubleshooting
# Disable workspace apps that are not served from subdomains. Path-based apps can # Disable workspace apps that are not served from subdomains. Path-based apps can
# make requests to the Coder API and pose a security risk when the workspace # make requests to the Coder API and pose a security risk when the workspace
# serves malicious JavaScript. This is recommended for security purposes if a # serves malicious JavaScript. This is recommended for security purposes if a

View File

@ -36,7 +36,7 @@ Both **negative** and **positive** permissions override **abstain** at the same
This can be represented by the following truth table, where Y represents _positive_, N represents _negative_, and \_ represents _abstain_: This can be represented by the following truth table, where Y represents _positive_, N represents _negative_, and \_ represents _abstain_:
| Action | Positive | Negative | Result | | Action | Positive | Negative | Result |
| ------ | -------- | -------- | ------ | |--------|----------|----------|--------|
| read | Y | \_ | Y | | read | Y | \_ | Y |
| read | Y | N | N | | read | Y | N | N |
| read | \_ | \_ | \_ | | read | \_ | \_ | \_ |
@ -63,10 +63,10 @@ This can be represented by the following truth table, where Y represents _positi
A _role_ is a set of permissions. When evaluating a role's permission to form an action, all the relevant permissions for the role are combined at each level. Permissions at a higher level override permissions at a lower level. A _role_ is a set of permissions. When evaluating a role's permission to form an action, all the relevant permissions for the role are combined at each level. Permissions at a higher level override permissions at a lower level.
The following table shows the per-level role evaluation. The following table shows the per-level role evaluation.
Y indicates that the role provides positive permissions, N indicates the role provides negative permissions, and _ indicates the role does not provide positive or negative permissions. YN_ indicates that the value in the cell does not matter for the access result. Y indicates that the role provides positive permissions, N indicates the role provides negative permissions, and _indicates the role does not provide positive or negative permissions. YN_ indicates that the value in the cell does not matter for the access result.
| Role (example) | Site | Org | User | Result | | Role (example) | Site | Org | User | Result |
| --------------- | ---- | ---- | ---- | ------ | |-----------------|------|------|------|--------|
| site-admin | Y | YN\_ | YN\_ | Y | | site-admin | Y | YN\_ | YN\_ | Y |
| no-permission | N | YN\_ | YN\_ | N | | no-permission | N | YN\_ | YN\_ | N |
| org-admin | \_ | Y | YN\_ | Y | | org-admin | \_ | Y | YN\_ | Y |
@ -102,7 +102,7 @@ Example of a scope for a workspace agent token, using an `allow_list` containing
} }
``` ```
# Testing ## Testing
You can test outside of golang by using the `opa` cli. You can test outside of golang by using the `opa` cli.

View File

@ -1,6 +1,6 @@
# Using RBAC # Using RBAC
# Overview ## Overview
> _NOTE: you should probably read [`README.md`](README.md) beforehand, but it's > _NOTE: you should probably read [`README.md`](README.md) beforehand, but it's
> not essential._ > not essential._
@ -19,7 +19,7 @@ We have a number of roles (some of which have legacy connotations back to v1).
These can be found in `coderd/rbac/roles.go`. These can be found in `coderd/rbac/roles.go`.
| Role | Description | Example resources (non-exhaustive) | | Role | Description | Example resources (non-exhaustive) |
| -------------------- | ------------------------------------------------------------------- | -------------------------------------------- | |----------------------|---------------------------------------------------------------------|----------------------------------------------|
| **owner** | Super-user, first user in Coder installation, has all\* permissions | all\* | | **owner** | Super-user, first user in Coder installation, has all\* permissions | all\* |
| **member** | A regular user | workspaces, own details, provisioner daemons | | **member** | A regular user | workspaces, own details, provisioner daemons |
| **auditor** | Viewer of audit log events, read-only access to a few resources | audit logs, templates, users, groups | | **auditor** | Viewer of audit log events, read-only access to a few resources | audit logs, templates, users, groups |
@ -43,7 +43,7 @@ Roles are collections of permissions (we call them _actions_).
These can be found in `coderd/rbac/policy/policy.go`. These can be found in `coderd/rbac/policy/policy.go`.
| Action | Description | | Action | Description |
| ----------------------- | --------------------------------------- | |-------------------------|-----------------------------------------|
| **create** | Create a resource | | **create** | Create a resource |
| **read** | Read a resource | | **read** | Read a resource |
| **update** | Update a resource | | **update** | Update a resource |
@ -58,7 +58,7 @@ These can be found in `coderd/rbac/policy/policy.go`.
| **stop** | Stop a workspace | | **stop** | Stop a workspace |
| **assign** | Assign user to role / org | | **assign** | Assign user to role / org |
# Creating a new noun ## Creating a new noun
In the following example, we're going to create a new RBAC noun for a new entity In the following example, we're going to create a new RBAC noun for a new entity
called a "frobulator" _(just some nonsense word for demonstration purposes)_. called a "frobulator" _(just some nonsense word for demonstration purposes)_.
@ -291,7 +291,7 @@ frobulator, but no test case covered it.
**NOTE: don't just add cases which make the tests pass; consider all the ways in **NOTE: don't just add cases which make the tests pass; consider all the ways in
which your resource must be used, and test all of those scenarios!** which your resource must be used, and test all of those scenarios!**
# Database authorization ## Database authorization
Now that we have the RBAC system fully configured, we need to make use of it. Now that we have the RBAC system fully configured, we need to make use of it.
@ -350,7 +350,7 @@ before we validate (this explains the `fetchWithPostFilter` naming).
All queries are executed through `dbauthz`, and now our little frobulators are All queries are executed through `dbauthz`, and now our little frobulators are
protected! protected!
# API authorization ## API authorization
API authorization is not strictly required because we have database API authorization is not strictly required because we have database
authorization in place, but it's a good practice to reject requests as soon as authorization in place, but it's a good practice to reject requests as soon as

View File

@ -793,7 +793,7 @@ func DefaultSupportLinks(docsURL string) []LinkConfig {
}, },
{ {
Name: "Report a bug", Name: "Report a bug",
Target: "https://github.com/coder/coder/issues/new?labels=needs+grooming&body=" + buildInfo, Target: "https://github.com/coder/coder/issues/new?labels=needs+triage&body=" + buildInfo,
Icon: "bug", Icon: "bug",
}, },
{ {
@ -2376,7 +2376,7 @@ when required by your organization's security policy.`,
Flag: "agent-fallback-troubleshooting-url", Flag: "agent-fallback-troubleshooting-url",
Env: "CODER_AGENT_FALLBACK_TROUBLESHOOTING_URL", Env: "CODER_AGENT_FALLBACK_TROUBLESHOOTING_URL",
Hidden: true, Hidden: true,
Default: "https://coder.com/docs/templates/troubleshooting", Default: "https://coder.com/docs/admin/templates/troubleshooting",
Value: &c.AgentFallbackTroubleshootingURL, Value: &c.AgentFallbackTroubleshootingURL,
YAML: "agentFallbackTroubleshootingURL", YAML: "agentFallbackTroubleshootingURL",
}, },

View File

@ -332,7 +332,7 @@ Breaking changes can be triggered in two ways:
### Security ### Security
> If you find a vulnerability, **DO NOT FILE AN ISSUE**. Instead, send an email > If you find a vulnerability, **DO NOT FILE AN ISSUE**. Instead, send an email
> to security@coder.com. > to <security@coder.com>.
The The
[`security`](https://github.com/coder/coder/issues?q=sort%3Aupdated-desc+label%3Asecurity) [`security`](https://github.com/coder/coder/issues?q=sort%3Aupdated-desc+label%3Asecurity)

View File

@ -49,7 +49,7 @@ GitHub provider).
![Adjust GitHub App Permissions](../images/admin/github-app-permissions.png) ![Adjust GitHub App Permissions](../images/admin/github-app-permissions.png)
| Name | Permission | Description | | Name | Permission | Description |
| ------------- | ------------ | ------------------------------------------------------ | |---------------|--------------|--------------------------------------------------------|
| Contents | Read & Write | Grants access to code and commit statuses. | | Contents | Read & Write | Grants access to code and commit statuses. |
| Pull requests | Read & Write | Grants access to create and update pull requests. | | Pull requests | Read & Write | Grants access to create and update pull requests. |
| Workflows | Read & Write | Grants access to update files in `.github/workflows/`. | | Workflows | Read & Write | Grants access to update files in `.github/workflows/`. |
@ -150,7 +150,7 @@ CODER_EXTERNAL_AUTH_0_AUTH_URL="https://gitea.com/login/oauth/authorize"
``` ```
The Redirect URI for Gitea should be The Redirect URI for Gitea should be
https://coder.company.org/external-auth/gitea/callback `https://coder.company.org/external-auth/gitea/callback`.
## Self-managed git providers ## Self-managed git providers

View File

@ -17,7 +17,7 @@ For any information not strictly contained in these sections, check out our
## What is an image, template, dev container, or workspace ## What is an image, template, dev container, or workspace
**Image** ### Image
- A [base image](./templates/managing-templates/image-management.md) contains - A [base image](./templates/managing-templates/image-management.md) contains
OS-level packages and utilities that the Coder workspace is built on. It can OS-level packages and utilities that the Coder workspace is built on. It can
@ -26,28 +26,28 @@ For any information not strictly contained in these sections, check out our
defined in each template. defined in each template.
- Managed by: Externally to Coder. - Managed by: Externally to Coder.
**Template** ### Template
- [Templates](./templates/index.md) include infrastructure-level dependencies - [Templates](./templates/index.md) include infrastructure-level dependencies
for the workspace. For example, a template can include Kubernetes for the workspace. For example, a template can include Kubernetes
PersistentVolumeClaims, Docker containers, or EC2 VMs. PersistentVolumeClaims, Docker containers, or EC2 VMs.
- Managed by: Template administrators from within the Coder deployment. - Managed by: Template administrators from within the Coder deployment.
**Startup scripts** ### Startup scripts
- Agent startup scripts apply to all users of a template. This is an - Agent startup scripts apply to all users of a template. This is an
intentionally flexible area that template authors have at their disposal to intentionally flexible area that template authors have at their disposal to
manage the "last mile" of workspace creation. manage the "last mile" of workspace creation.
- Managed by: Coder template administrators. - Managed by: Coder template administrators.
**Workspace** ### Workspace
- A [workspace](../user-guides/workspace-management.md) is the environment that - A [workspace](../user-guides/workspace-management.md) is the environment that
a developer works in. Developers on a team each work from their own workspace a developer works in. Developers on a team each work from their own workspace
and can use [multiple IDEs](../user-guides/workspace-access/index.md). and can use [multiple IDEs](../user-guides/workspace-access/index.md).
- Managed by: Developers - Managed by: Developers
**Development containers (dev containers)** ### Development containers (dev containers)
- A - A
[Development Container](./templates/managing-templates/devcontainers/index.md) [Development Container](./templates/managing-templates/devcontainers/index.md)
@ -57,7 +57,7 @@ For any information not strictly contained in these sections, check out our
will be built on-demand. will be built on-demand.
- Managed by: Dev Teams - Managed by: Dev Teams
**Dotfiles / personalization** ### Dotfiles / personalization
- Users may have their own specific preferences relating to shell prompt, custom - Users may have their own specific preferences relating to shell prompt, custom
keybindings, color schemes, and more. Users can leverage Coder's keybindings, color schemes, and more. Users can leverage Coder's

View File

@ -40,12 +40,12 @@ Our scale tests include the following stages:
The scale tests runner can distribute the workload to overlap single scenarios The scale tests runner can distribute the workload to overlap single scenarios
based on the workflow configuration: based on the workflow configuration:
| | T0 | T1 | T2 | T3 | T4 | T5 | T6 | | | T0 | T1 | T2 | T3 | T4 | T5 | T6 |
| -------------------- | --- | --- | --- | --- | --- | --- | --- | |----------------------|----|----|----|----|----|----|----|
| SSH connections | X | X | X | X | | | | | SSH connections | X | X | X | X | | | |
| Web Terminal (PTY) | | X | X | X | X | | | | Web Terminal (PTY) | | X | X | X | X | | |
| Workspace apps | | | X | X | X | X | | | Workspace apps | | | X | X | X | X | |
| Dashboard (headless) | | | | X | X | X | X | | Dashboard (headless) | | | | X | X | X | X |
This pattern closely reflects how our customers naturally use the system. SSH This pattern closely reflects how our customers naturally use the system. SSH
connections are heavily utilized because they're the primary communication connections are heavily utilized because they're the primary communication
@ -137,7 +137,7 @@ When determining scaling requirements, consider the following factors:
connections: For a very high number of proxied connections, more memory is connections: For a very high number of proxied connections, more memory is
required. required.
**HTTP API latency** #### HTTP API latency
For a reliable Coder deployment dealing with medium to high loads, it's For a reliable Coder deployment dealing with medium to high loads, it's
important that API calls for workspace/template queries and workspace build important that API calls for workspace/template queries and workspace build
@ -152,7 +152,7 @@ between users and the load balancer. Fortunately, the latency can be improved
with a deployment of Coder with a deployment of Coder
[workspace proxies](../networking/workspace-proxies.md). [workspace proxies](../networking/workspace-proxies.md).
**Node Autoscaling** #### Node Autoscaling
We recommend disabling the autoscaling for `coderd` nodes. Autoscaling can cause We recommend disabling the autoscaling for `coderd` nodes. Autoscaling can cause
interruptions for user connections, see interruptions for user connections, see
@ -186,7 +186,7 @@ When determining scaling requirements, consider the following factors:
provisioners are free/available, the more concurrent workspace builds can be provisioners are free/available, the more concurrent workspace builds can be
performed. performed.
**Node Autoscaling** #### Node Autoscaling
Autoscaling provisioners is not an easy problem to solve unless it can be Autoscaling provisioners is not an easy problem to solve unless it can be
predicted when a number of concurrent workspace builds increases. predicted when a number of concurrent workspace builds increases.
@ -219,7 +219,7 @@ When determining scaling requirements, consider the following factors:
running Coder agent and occasional CPU and memory bursts for building running Coder agent and occasional CPU and memory bursts for building
projects. projects.
**Node Autoscaling** #### Node Autoscaling
Workspace nodes can be set to operate in autoscaling mode to mitigate the risk Workspace nodes can be set to operate in autoscaling mode to mitigate the risk
of prolonged high resource utilization. of prolonged high resource utilization.

View File

@ -17,7 +17,7 @@ Learn more about [Coders architecture](./architecture.md) and our
> hardware sizing recommendations. > hardware sizing recommendations.
| Environment | Coder CPU | Coder RAM | Coder Replicas | Database | Users | Concurrent builds | Concurrent connections (Terminal/SSH) | Coder Version | Last tested | | Environment | Coder CPU | Coder RAM | Coder Replicas | Database | Users | Concurrent builds | Concurrent connections (Terminal/SSH) | Coder Version | Last tested |
| ---------------- | --------- | --------- | -------------- | ----------------- | ----- | ----------------- | ------------------------------------- | ------------- | ------------ | |------------------|-----------|-----------|----------------|-------------------|-------|-------------------|---------------------------------------|---------------|--------------|
| Kubernetes (GKE) | 3 cores | 12 GB | 1 | db-f1-micro | 200 | 3 | 200 simulated | `v0.24.1` | Jun 26, 2023 | | Kubernetes (GKE) | 3 cores | 12 GB | 1 | db-f1-micro | 200 | 3 | 200 simulated | `v0.24.1` | Jun 26, 2023 |
| Kubernetes (GKE) | 4 cores | 8 GB | 1 | db-custom-1-3840 | 1500 | 20 | 1,500 simulated | `v0.24.1` | Jun 27, 2023 | | Kubernetes (GKE) | 4 cores | 8 GB | 1 | db-custom-1-3840 | 1500 | 20 | 1,500 simulated | `v0.24.1` | Jun 27, 2023 |
| Kubernetes (GKE) | 2 cores | 4 GB | 1 | db-custom-1-3840 | 500 | 20 | 500 simulated | `v0.27.2` | Jul 27, 2023 | | Kubernetes (GKE) | 2 cores | 4 GB | 1 | db-custom-1-3840 | 500 | 20 | 500 simulated | `v0.27.2` | Jul 27, 2023 |
@ -48,14 +48,14 @@ specified template and extra parameters.
```shell ```shell
coder exp scaletest create-workspaces \ coder exp scaletest create-workspaces \
--retry 5 \ --retry 5 \
--count "${SCALETEST_PARAM_NUM_WORKSPACES}" \ --count "${SCALETEST_PARAM_NUM_WORKSPACES}" \
--template "${SCALETEST_PARAM_TEMPLATE}" \ --template "${SCALETEST_PARAM_TEMPLATE}" \
--concurrency "${SCALETEST_PARAM_CREATE_CONCURRENCY}" \ --concurrency "${SCALETEST_PARAM_CREATE_CONCURRENCY}" \
--timeout 5h \ --timeout 5h \
--job-timeout 5h \ --job-timeout 5h \
--no-cleanup \ --no-cleanup \
--output json:"${SCALETEST_RESULTS_DIR}/create-workspaces.json" --output json:"${SCALETEST_RESULTS_DIR}/create-workspaces.json"
# Run `coder exp scaletest create-workspaces --help` for all usage # Run `coder exp scaletest create-workspaces --help` for all usage
``` ```
@ -79,14 +79,14 @@ Terminal against those workspaces.
```shell ```shell
# Produce load at about 1000MB/s (25MB/40ms). # Produce load at about 1000MB/s (25MB/40ms).
coder exp scaletest workspace-traffic \ coder exp scaletest workspace-traffic \
--template "${SCALETEST_PARAM_GREEDY_AGENT_TEMPLATE}" \ --template "${SCALETEST_PARAM_GREEDY_AGENT_TEMPLATE}" \
--bytes-per-tick $((1024 * 1024 * 25)) \ --bytes-per-tick $((1024 * 1024 * 25)) \
--tick-interval 40ms \ --tick-interval 40ms \
--timeout "$((delay))s" \ --timeout "$((delay))s" \
--job-timeout "$((delay))s" \ --job-timeout "$((delay))s" \
--scaletest-prometheus-address 0.0.0.0:21113 \ --scaletest-prometheus-address 0.0.0.0:21113 \
--target-workspaces "0:100" \ --target-workspaces "0:100" \
--trace=false \ --trace=false \
--output json:"${SCALETEST_RESULTS_DIR}/traffic-${type}-greedy-agent.json" --output json:"${SCALETEST_RESULTS_DIR}/traffic-${type}-greedy-agent.json"
``` ```
@ -114,8 +114,8 @@ wish to clean up all workspaces, you can run the following command:
```shell ```shell
coder exp scaletest cleanup \ coder exp scaletest cleanup \
--cleanup-job-timeout 2h \ --cleanup-job-timeout 2h \
--cleanup-timeout 15min --cleanup-timeout 15min
``` ```
This will delete all workspaces and users with the prefix `scaletest-`. This will delete all workspaces and users with the prefix `scaletest-`.
@ -168,7 +168,7 @@ that operators can deploy depending on the traffic projections.
There are a few cluster options available: There are a few cluster options available:
| Workspace size | vCPU | Memory | Persisted storage | Details | | Workspace size | vCPU | Memory | Persisted storage | Details |
| -------------- | ---- | ------ | ----------------- | ----------------------------------------------------- | |----------------|------|--------|-------------------|-------------------------------------------------------|
| minimal | 1 | 2 Gi | None | | | minimal | 1 | 2 Gi | None | |
| small | 1 | 1 Gi | None | | | small | 1 | 1 Gi | None | |
| medium | 2 | 2 Gi | None | Medium-sized cluster offers the greedy agent variant. | | medium | 2 | 2 Gi | None | Medium-sized cluster offers the greedy agent variant. |

View File

@ -13,7 +13,7 @@ tech startups, educational units, or small to mid-sized enterprises.
### Coderd nodes ### Coderd nodes
| Users | Node capacity | Replicas | GCP | AWS | Azure | | Users | Node capacity | Replicas | GCP | AWS | Azure |
| ----------- | ------------------- | ------------------- | --------------- | ---------- | ----------------- | |-------------|---------------------|---------------------|-----------------|------------|-------------------|
| Up to 1,000 | 2 vCPU, 8 GB memory | 1-2 / 1 coderd each | `n1-standard-2` | `t3.large` | `Standard_D2s_v3` | | Up to 1,000 | 2 vCPU, 8 GB memory | 1-2 / 1 coderd each | `n1-standard-2` | `t3.large` | `Standard_D2s_v3` |
**Footnotes**: **Footnotes**:
@ -24,7 +24,7 @@ tech startups, educational units, or small to mid-sized enterprises.
### Provisioner nodes ### Provisioner nodes
| Users | Node capacity | Replicas | GCP | AWS | Azure | | Users | Node capacity | Replicas | GCP | AWS | Azure |
| ----------- | -------------------- | ------------------------------ | ---------------- | ------------ | ----------------- | |-------------|----------------------|--------------------------------|------------------|--------------|-------------------|
| Up to 1,000 | 8 vCPU, 32 GB memory | 2 nodes / 30 provisioners each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | | Up to 1,000 | 8 vCPU, 32 GB memory | 2 nodes / 30 provisioners each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` |
**Footnotes**: **Footnotes**:
@ -34,7 +34,7 @@ tech startups, educational units, or small to mid-sized enterprises.
### Workspace nodes ### Workspace nodes
| Users | Node capacity | Replicas | GCP | AWS | Azure | | Users | Node capacity | Replicas | GCP | AWS | Azure |
| ----------- | -------------------- | ----------------------- | ---------------- | ------------ | ----------------- | |-------------|----------------------|-------------------------|------------------|--------------|-------------------|
| Up to 1,000 | 8 vCPU, 32 GB memory | 64 / 16 workspaces each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | | Up to 1,000 | 8 vCPU, 32 GB memory | 64 / 16 workspaces each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` |
**Footnotes**: **Footnotes**:
@ -47,5 +47,5 @@ tech startups, educational units, or small to mid-sized enterprises.
### Database nodes ### Database nodes
| Users | Node capacity | Replicas | Storage | GCP | AWS | Azure | | Users | Node capacity | Replicas | Storage | GCP | AWS | Azure |
| ----------- | ------------------- | -------- | ------- | ------------------ | ------------- | ----------------- | |-------------|---------------------|----------|---------|--------------------|---------------|-------------------|
| Up to 1,000 | 2 vCPU, 8 GB memory | 1 | 512 GB | `db-custom-2-7680` | `db.t3.large` | `Standard_D2s_v3` | | Up to 1,000 | 2 vCPU, 8 GB memory | 1 | 512 GB | `db-custom-2-7680` | `db.t3.large` | `Standard_D2s_v3` |

View File

@ -18,13 +18,13 @@ deployment reliability under load.
### Coderd nodes ### Coderd nodes
| Users | Node capacity | Replicas | GCP | AWS | Azure | | Users | Node capacity | Replicas | GCP | AWS | Azure |
| ----------- | -------------------- | ----------------------- | --------------- | ----------- | ----------------- | |-------------|----------------------|-------------------------|-----------------|-------------|-------------------|
| Up to 2,000 | 4 vCPU, 16 GB memory | 2 nodes / 1 coderd each | `n1-standard-4` | `t3.xlarge` | `Standard_D4s_v3` | | Up to 2,000 | 4 vCPU, 16 GB memory | 2 nodes / 1 coderd each | `n1-standard-4` | `t3.xlarge` | `Standard_D4s_v3` |
### Provisioner nodes ### Provisioner nodes
| Users | Node capacity | Replicas | GCP | AWS | Azure | | Users | Node capacity | Replicas | GCP | AWS | Azure |
| ----------- | -------------------- | ------------------------------ | ---------------- | ------------ | ----------------- | |-------------|----------------------|--------------------------------|------------------|--------------|-------------------|
| Up to 2,000 | 8 vCPU, 32 GB memory | 4 nodes / 30 provisioners each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | | Up to 2,000 | 8 vCPU, 32 GB memory | 4 nodes / 30 provisioners each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` |
**Footnotes**: **Footnotes**:
@ -37,7 +37,7 @@ deployment reliability under load.
### Workspace nodes ### Workspace nodes
| Users | Node capacity | Replicas | GCP | AWS | Azure | | Users | Node capacity | Replicas | GCP | AWS | Azure |
| ----------- | -------------------- | ------------------------ | ---------------- | ------------ | ----------------- | |-------------|----------------------|--------------------------|------------------|--------------|-------------------|
| Up to 2,000 | 8 vCPU, 32 GB memory | 128 / 16 workspaces each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | | Up to 2,000 | 8 vCPU, 32 GB memory | 128 / 16 workspaces each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` |
**Footnotes**: **Footnotes**:
@ -50,7 +50,7 @@ deployment reliability under load.
### Database nodes ### Database nodes
| Users | Node capacity | Replicas | Storage | GCP | AWS | Azure | | Users | Node capacity | Replicas | Storage | GCP | AWS | Azure |
| ----------- | -------------------- | -------- | ------- | ------------------- | -------------- | ----------------- | |-------------|----------------------|----------|---------|---------------------|----------------|-------------------|
| Up to 2,000 | 4 vCPU, 16 GB memory | 1 | 1 TB | `db-custom-4-15360` | `db.t3.xlarge` | `Standard_D4s_v3` | | Up to 2,000 | 4 vCPU, 16 GB memory | 1 | 1 TB | `db-custom-4-15360` | `db.t3.xlarge` | `Standard_D4s_v3` |
**Footnotes**: **Footnotes**:

View File

@ -19,13 +19,13 @@ continuously improve the reliability and performance of the platform.
### Coderd nodes ### Coderd nodes
| Users | Node capacity | Replicas | GCP | AWS | Azure | | Users | Node capacity | Replicas | GCP | AWS | Azure |
| ----------- | -------------------- | ----------------- | --------------- | ----------- | ----------------- | |-------------|----------------------|-------------------|-----------------|-------------|-------------------|
| Up to 3,000 | 8 vCPU, 32 GB memory | 4 / 1 coderd each | `n1-standard-4` | `t3.xlarge` | `Standard_D4s_v3` | | Up to 3,000 | 8 vCPU, 32 GB memory | 4 / 1 coderd each | `n1-standard-4` | `t3.xlarge` | `Standard_D4s_v3` |
### Provisioner nodes ### Provisioner nodes
| Users | Node capacity | Replicas | GCP | AWS | Azure | | Users | Node capacity | Replicas | GCP | AWS | Azure |
| ----------- | -------------------- | ------------------------ | ---------------- | ------------ | ----------------- | |-------------|----------------------|--------------------------|------------------|--------------|-------------------|
| Up to 3,000 | 8 vCPU, 32 GB memory | 8 / 30 provisioners each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | | Up to 3,000 | 8 vCPU, 32 GB memory | 8 / 30 provisioners each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` |
**Footnotes**: **Footnotes**:
@ -39,7 +39,7 @@ continuously improve the reliability and performance of the platform.
### Workspace nodes ### Workspace nodes
| Users | Node capacity | Replicas | GCP | AWS | Azure | | Users | Node capacity | Replicas | GCP | AWS | Azure |
| ----------- | -------------------- | ------------------------------ | ---------------- | ------------ | ----------------- | |-------------|----------------------|--------------------------------|------------------|--------------|-------------------|
| Up to 3,000 | 8 vCPU, 32 GB memory | 256 nodes / 12 workspaces each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` | | Up to 3,000 | 8 vCPU, 32 GB memory | 256 nodes / 12 workspaces each | `t2d-standard-8` | `t3.2xlarge` | `Standard_D8s_v3` |
**Footnotes**: **Footnotes**:
@ -53,7 +53,7 @@ continuously improve the reliability and performance of the platform.
### Database nodes ### Database nodes
| Users | Node capacity | Replicas | Storage | GCP | AWS | Azure | | Users | Node capacity | Replicas | Storage | GCP | AWS | Azure |
| ----------- | -------------------- | -------- | ------- | ------------------- | --------------- | ----------------- | |-------------|----------------------|----------|---------|---------------------|-----------------|-------------------|
| Up to 3,000 | 8 vCPU, 32 GB memory | 2 | 1.5 TB | `db-custom-8-30720` | `db.t3.2xlarge` | `Standard_D8s_v3` | | Up to 3,000 | 8 vCPU, 32 GB memory | 2 | 1.5 TB | `db-custom-8-30720` | `db.t3.2xlarge` | `Standard_D8s_v3` |
**Footnotes**: **Footnotes**:

View File

@ -23,7 +23,7 @@ This guide targets the following personas. It assumes a basic understanding of
cloud/on-premise computing, containerization, and the Coder platform. cloud/on-premise computing, containerization, and the Coder platform.
| Role | Description | | Role | Description |
| ------------------------- | ------------------------------------------------------------------------------ | |---------------------------|--------------------------------------------------------------------------------|
| Platform Engineers | Responsible for deploying, operating the Coder deployment and infrastructure | | Platform Engineers | Responsible for deploying, operating the Coder deployment and infrastructure |
| Enterprise Architects | Responsible for architecting Coder deployments to meet enterprise requirements | | Enterprise Architects | Responsible for architecting Coder deployments to meet enterprise requirements |
| Managed Service Providers | Entities that deploy and run Coder software as a service for customers | | Managed Service Providers | Entities that deploy and run Coder software as a service for customers |
@ -31,7 +31,7 @@ cloud/on-premise computing, containerization, and the Coder platform.
## CVA Guidance ## CVA Guidance
| CVA provides: | CVA does not provide: | | CVA provides: | CVA does not provide: |
| ---------------------------------------------- | ---------------------------------------------------------------------------------------- | |------------------------------------------------|------------------------------------------------------------------------------------------|
| Single and multi-region K8s deployment options | Prescribing OS, or cloud vs. on-premise | | Single and multi-region K8s deployment options | Prescribing OS, or cloud vs. on-premise |
| Reference architectures for up to 3,000 users | An approval of your architecture; the CVA solely provides recommendations and guidelines | | Reference architectures for up to 3,000 users | An approval of your architecture; the CVA solely provides recommendations and guidelines |
| Best practices for building a Coder deployment | Recommendations for every possible deployment scenario | | Best practices for building a Coder deployment | Recommendations for every possible deployment scenario |

View File

@ -3,7 +3,7 @@
<div> <div>
<a href="https://github.com/ericpaulsen" style="text-decoration: none; color: inherit;"> <a href="https://github.com/ericpaulsen" style="text-decoration: none; color: inherit;">
<span style="vertical-align:middle;">Eric Paulsen</span> <span style="vertical-align:middle;">Eric Paulsen</span>
<img src="https://github.com/ericpaulsen.png" width="24px" height="24px" style="vertical-align:middle; margin: 0px;"/> <img src="https://github.com/ericpaulsen.png" alt="ericpaulsen" width="24px" height="24px" style="vertical-align:middle; margin: 0px;"/>
</a> </a>
</div> </div>
April 24, 2024 April 24, 2024

View File

@ -3,7 +3,7 @@
<div> <div>
<a href="https://github.com/matifali" style="text-decoration: none; color: inherit;"> <a href="https://github.com/matifali" style="text-decoration: none; color: inherit;">
<span style="vertical-align:middle;">M Atif Ali</span> <span style="vertical-align:middle;">M Atif Ali</span>
<img src="https://github.com/matifali.png" width="24px" height="24px" style="vertical-align:middle; margin: 0px;"/> <img src="https://github.com/matifali.png" alt="matifali" width="24px" height="24px" style="vertical-align:middle; margin: 0px;"/>
</a> </a>
</div> </div>
January 24, 2024 January 24, 2024
@ -31,84 +31,83 @@ by using our official Coder [modules](https://registry.coder.com). We publish
two type of modules that automate the JFrog Artifactory and Coder integration. two type of modules that automate the JFrog Artifactory and Coder integration.
1. [JFrog-OAuth](https://registry.coder.com/modules/jfrog-oauth) 1. [JFrog-OAuth](https://registry.coder.com/modules/jfrog-oauth)
2. [JFrog-Token](https://registry.coder.com/modules/jfrog-token) 1. [JFrog-Token](https://registry.coder.com/modules/jfrog-token)
### JFrog-OAuth ### JFrog-OAuth
This module is usable by JFrog self-hosted (on-premises) Artifactory as it This module is usable by JFrog self-hosted (on-premises) Artifactory as it
requires configuring a custom integration. This integration benefits from requires configuring a custom integration. This integration benefits from
Coder's [external-auth](https://coder.com/docs/admin/external-auth) feature and Coder's [external-auth](../../admin/external-auth.md) feature and allows each
allows each user to authenticate with Artifactory using an OAuth flow and issues user to authenticate with Artifactory using an OAuth flow and issues user-scoped
user-scoped tokens to each user. tokens to each user.
To set this up, follow these steps: To set this up, follow these steps:
1. Modify your Helm chart `values.yaml` for JFrog Artifactory to add, 1. Modify your Helm chart `values.yaml` for JFrog Artifactory to add,
```yaml ```yaml
artifactory: artifactory:
enabled: true enabled: true
frontend: frontend:
extraEnvironmentVariables: extraEnvironmentVariables:
- name: JF_FRONTEND_FEATURETOGGLER_ACCESSINTEGRATION - name: JF_FRONTEND_FEATURETOGGLER_ACCESSINTEGRATION
value: "true" value: "true"
access: access:
accessConfig: accessConfig:
integrations-enabled: true integrations-enabled: true
integration-templates: integration-templates:
- id: "1" - id: "1"
name: "CODER" name: "CODER"
redirect-uri: "https://CODER_URL/external-auth/jfrog/callback" redirect-uri: "https://CODER_URL/external-auth/jfrog/callback"
scope: "applied-permissions/user" scope: "applied-permissions/user"
``` ```
> Note Replace `CODER_URL` with your Coder deployment URL, e.g., > Note Replace `CODER_URL` with your Coder deployment URL, e.g.,
> <coder.example.com> > <coder.example.com>
2. Create a new Application Integration by going to 1. Create a new Application Integration by going to
<https://JFROG_URL/ui/admin/configuration/integrations/new> and select the <https://JFROG_URL/ui/admin/configuration/integrations/new> and select the
Application Type as the integration you created in step 1. Application Type as the integration you created in step 1.
![JFrog Platform new integration](../../images/guides/artifactory-integration/jfrog-oauth-app.png) ![JFrog Platform new integration](../../images/guides/artifactory-integration/jfrog-oauth-app.png)
3. Add a new 1. Add a new [external authentication](../../admin/external-auth.md) to Coder by
[external authentication](https://coder.com/docs/admin/external-auth) to setting these env variables,
Coder by setting these env variables,
```env ```env
# JFrog Artifactory External Auth # JFrog Artifactory External Auth
CODER_EXTERNAL_AUTH_1_ID="jfrog" CODER_EXTERNAL_AUTH_1_ID="jfrog"
CODER_EXTERNAL_AUTH_1_TYPE="jfrog" CODER_EXTERNAL_AUTH_1_TYPE="jfrog"
CODER_EXTERNAL_AUTH_1_CLIENT_ID="YYYYYYYYYYYYYYY" CODER_EXTERNAL_AUTH_1_CLIENT_ID="YYYYYYYYYYYYYYY"
CODER_EXTERNAL_AUTH_1_CLIENT_SECRET="XXXXXXXXXXXXXXXXXXX" CODER_EXTERNAL_AUTH_1_CLIENT_SECRET="XXXXXXXXXXXXXXXXXXX"
CODER_EXTERNAL_AUTH_1_DISPLAY_NAME="JFrog Artifactory" CODER_EXTERNAL_AUTH_1_DISPLAY_NAME="JFrog Artifactory"
CODER_EXTERNAL_AUTH_1_DISPLAY_ICON="/icon/jfrog.svg" CODER_EXTERNAL_AUTH_1_DISPLAY_ICON="/icon/jfrog.svg"
CODER_EXTERNAL_AUTH_1_AUTH_URL="https://JFROG_URL/ui/authorization" CODER_EXTERNAL_AUTH_1_AUTH_URL="https://JFROG_URL/ui/authorization"
CODER_EXTERNAL_AUTH_1_SCOPES="applied-permissions/user" CODER_EXTERNAL_AUTH_1_SCOPES="applied-permissions/user"
``` ```
> Note Replace `JFROG_URL` with your JFrog Artifactory base URL, e.g., > Note Replace `JFROG_URL` with your JFrog Artifactory base URL, e.g.,
> <example.jfrog.io> > <example.jfrog.io>
4. Create or edit a Coder template and use the 1. Create or edit a Coder template and use the
[JFrog-OAuth](https://registry.coder.com/modules/jfrog-oauth) module to [JFrog-OAuth](https://registry.coder.com/modules/jfrog-oauth) module to
configure the integration. configure the integration.
```tf ```tf
module "jfrog" { module "jfrog" {
source = "registry.coder.com/modules/jfrog-oauth/coder" source = "registry.coder.com/modules/jfrog-oauth/coder"
version = "1.0.0" version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
jfrog_url = "https://jfrog.example.com" jfrog_url = "https://jfrog.example.com"
configure_code_server = true # this depends on the code-server configure_code_server = true # this depends on the code-server
username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username"
package_managers = { package_managers = {
"npm": "npm", "npm": "npm",
"go": "go", "go": "go",
"pypi": "pypi" "pypi": "pypi"
} }
} }
``` ```
### JFrog-Token ### JFrog-Token
@ -123,37 +122,36 @@ To set this up, follow these steps:
1. Get a JFrog access token from your Artifactory instance. The token must be an 1. Get a JFrog access token from your Artifactory instance. The token must be an
[admin token](https://registry.terraform.io/providers/jfrog/artifactory/latest/docs#access-token) [admin token](https://registry.terraform.io/providers/jfrog/artifactory/latest/docs#access-token)
with scope `applied-permissions/admin`. with scope `applied-permissions/admin`.
2. Create or edit a Coder template and use the 1. Create or edit a Coder template and use the
[JFrog-Token](https://registry.coder.com/modules/jfrog-token) module to [JFrog-Token](https://registry.coder.com/modules/jfrog-token) module to
configure the integration and pass the admin token. It is recommended to configure the integration and pass the admin token. It is recommended to
store the token in a sensitive terraform variable to prevent it from being store the token in a sensitive terraform variable to prevent it from being
displayed in plain text in the terraform state. displayed in plain text in the terraform state.
```tf ```tf
variable "artifactory_access_token" { variable "artifactory_access_token" {
type = string type = string
sensitive = true sensitive = true
} }
module "jfrog" { module "jfrog" {
source = "registry.coder.com/modules/jfrog-token/coder" source = "registry.coder.com/modules/jfrog-token/coder"
version = "1.0.0" version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
jfrog_url = "https://example.jfrog.io" jfrog_url = "https://example.jfrog.io"
configure_code_server = true # this depends on the code-server configure_code_server = true # this depends on the code-server
artifactory_access_token = var.artifactory_access_token artifactory_access_token = var.artifactory_access_token
package_managers = { package_managers = {
"npm": "npm", "npm": "npm",
"go": "go", "go": "go",
"pypi": "pypi" "pypi": "pypi"
} }
} }
``` ```
<blockquote class="info"> <blockquote class="info">
The admin-level access token is used to provision user tokens and is never exposed to The admin-level access token is used to provision user tokens and is never exposed to developers or stored in workspaces.
developers or stored in workspaces. </blockquote>
</blockquote>
If you do not want to use the official modules, you can check example template If you do not want to use the official modules, you can check example template
that uses Docker as the underlying compute that uses Docker as the underlying compute

View File

@ -3,7 +3,8 @@
<div> <div>
<a href="https://github.com/matifali" style="text-decoration: none; color: inherit;"> <a href="https://github.com/matifali" style="text-decoration: none; color: inherit;">
<span style="vertical-align:middle;">Muhammad Atif Ali</span> <span style="vertical-align:middle;">Muhammad Atif Ali</span>
<img src="https://github.com/matifali.png" width="24px" height="24px" style="vertical-align:middle; margin: 0px;"/> <img src="https://github.com/matifali.png" alt="matifali" width="24px" height="24px" style="vertical-align:middle; margin: 0px;"/>
</a> </a>
</div> </div>
March 17, 2024 March 17, 2024

View File

@ -104,7 +104,7 @@ deployment. They will always be available from the agent.
<!-- Code generated by 'make docs/admin/integrations/prometheus.md'. DO NOT EDIT --> <!-- Code generated by 'make docs/admin/integrations/prometheus.md'. DO NOT EDIT -->
| Name | Type | Description | Labels | | Name | Type | Description | Labels |
| ------------------------------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | |---------------------------------------------------------------|-----------|----------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
| `agent_scripts_executed_total` | counter | Total number of scripts executed by the Coder agent. Includes cron scheduled scripts. | `agent_name` `success` `template_name` `username` `workspace_name` | | `agent_scripts_executed_total` | counter | Total number of scripts executed by the Coder agent. Includes cron scheduled scripts. | `agent_name` `success` `template_name` `username` `workspace_name` |
| `coderd_agents_apps` | gauge | Agent applications with statuses. | `agent_name` `app_name` `health` `username` `workspace_name` | | `coderd_agents_apps` | gauge | Agent applications with statuses. | `agent_name` `app_name` `health` `username` `workspace_name` |
| `coderd_agents_connection_latencies_seconds` | gauge | Agent connection latencies in seconds. | `agent_name` `derp_region` `preferred` `username` `workspace_name` | | `coderd_agents_connection_latencies_seconds` | gauge | Agent connection latencies in seconds. | `agent_name` `derp_region` `preferred` `username` `workspace_name` |

View File

@ -3,7 +3,8 @@
<div> <div>
<a href="https://github.com/matifali" style="text-decoration: none; color: inherit;"> <a href="https://github.com/matifali" style="text-decoration: none; color: inherit;">
<span style="vertical-align:middle;">Muhammad Atif Ali</span> <span style="vertical-align:middle;">Muhammad Atif Ali</span>
<img src="https://github.com/matifali.png" width="24px" height="24px" style="vertical-align:middle; margin: 0px;"/> <img src="https://github.com/matifali.png" alt="matifali" width="24px" height="24px" style="vertical-align:middle; margin: 0px;"/>
</a> </a>
</div> </div>
August 05, 2024 August 05, 2024

View File

@ -24,7 +24,7 @@ If there is an issue, you may see one of the following errors reported:
### EACS01 ### EACS01
_Access URL not set_ ### Access URL not set
**Problem:** no access URL has been configured. **Problem:** no access URL has been configured.
@ -32,7 +32,7 @@ _Access URL not set_
### EACS02 ### EACS02
_Access URL invalid_ #### Access URL invalid
**Problem:** `${CODER_ACCESS_URL}/healthz` is not a valid URL. **Problem:** `${CODER_ACCESS_URL}/healthz` is not a valid URL.
@ -44,7 +44,7 @@ _Access URL invalid_
### EACS03 ### EACS03
_Failed to fetch `/healthz`_ #### Failed to fetch `/healthz`
**Problem:** Coder was unable to execute a GET request to **Problem:** Coder was unable to execute a GET request to
`${CODER_ACCESS_URL}/healthz`. `${CODER_ACCESS_URL}/healthz`.
@ -74,7 +74,7 @@ The output of this command should aid further diagnosis.
### EACS04 ### EACS04
_/healthz did not return 200 OK_ #### /healthz did not return 200 OK
**Problem:** Coder was able to execute a GET request to **Problem:** Coder was able to execute a GET request to
`${CODER_ACCESS_URL}/healthz`, but the response code was not `200 OK` as `${CODER_ACCESS_URL}/healthz`, but the response code was not `200 OK` as
@ -97,7 +97,7 @@ its configured database, and also measures the median latency over 5 attempts.
### EDB01 ### EDB01
_Database Ping Failed_ #### Database Ping Failed
**Problem:** This error code is returned if any attempt to execute this database **Problem:** This error code is returned if any attempt to execute this database
query fails. query fails.
@ -106,7 +106,7 @@ query fails.
### EDB02 ### EDB02
_Database Latency High_ #### Database Latency High
**Problem:** This code is returned if the median latency is higher than the **Problem:** This code is returned if the median latency is higher than the
[configured threshold](../../reference/cli/server.md#--health-check-threshold-database). [configured threshold](../../reference/cli/server.md#--health-check-threshold-database).
@ -138,7 +138,7 @@ following:
### EDERP01 ### EDERP01
_DERP Node Uses Websocket_ #### DERP Node Uses Websocket
**Problem:** When Coder attempts to establish a connection to one or more DERP **Problem:** When Coder attempts to establish a connection to one or more DERP
servers, it sends a specific `Upgrade: derp` HTTP header. Some load balancers servers, it sends a specific `Upgrade: derp` HTTP header. Some load balancers
@ -157,7 +157,7 @@ still be able to reach their workspaces, connection performance may be degraded.
### EDERP02 ### EDERP02
_One or more DERP nodes are unhealthy_ #### One or more DERP nodes are unhealthy
**Problem:** This is shown if Coder is unable to reach one or more configured **Problem:** This is shown if Coder is unable to reach one or more configured
DERP servers. Clients will fall back to use the remaining DERP servers, but DERP servers. Clients will fall back to use the remaining DERP servers, but
@ -176,7 +176,7 @@ curl -v "https://coder.company.com/derp"
### ESTUN01 ### ESTUN01
_No STUN servers available._ #### No STUN servers available
**Problem:** This is shown if no STUN servers are available. Coder will use STUN **Problem:** This is shown if no STUN servers are available. Coder will use STUN
to establish [direct connections](../networking/stun.md). Without at least one to establish [direct connections](../networking/stun.md). Without at least one
@ -189,7 +189,7 @@ configured port.
### ESTUN02 ### ESTUN02
_STUN returned different addresses; you may be behind a hard NAT._ #### STUN returned different addresses; you may be behind a hard NAT
**Problem:** This is a warning shown when multiple attempts to determine our **Problem:** This is a warning shown when multiple attempts to determine our
public IP address/port via STUN resulted in different `ip:port` combinations. public IP address/port via STUN resulted in different `ip:port` combinations.
@ -218,7 +218,7 @@ message over the connection, and attempt to read back that same message.
### EWS01 ### EWS01
_Failed to establish a WebSocket connection_ #### Failed to establish a WebSocket connection
**Problem:** Coder was unable to establish a WebSocket connection over its own **Problem:** Coder was unable to establish a WebSocket connection over its own
Access URL. Access URL.
@ -237,7 +237,7 @@ Access URL.
### EWS02 ### EWS02
_Failed to echo a WebSocket message_ #### Failed to echo a WebSocket message
**Problem:** Coder was able to establish a WebSocket connection, but was unable **Problem:** Coder was able to establish a WebSocket connection, but was unable
to write a message. to write a message.
@ -258,7 +258,7 @@ Coder will periodically query their availability and show their status here.
### EWP01 ### EWP01
_Error Updating Workspace Proxy Health_ #### Error Updating Workspace Proxy Health
**Problem:** Coder was unable to query the connected workspace proxies for their **Problem:** Coder was unable to query the connected workspace proxies for their
health status. health status.
@ -268,7 +268,7 @@ connectivity issue.
### EWP02 ### EWP02
_Error Fetching Workspace Proxies_ #### Error Fetching Workspace Proxies
**Problem:** Coder was unable to fetch the stored workspace proxy health data **Problem:** Coder was unable to fetch the stored workspace proxy health data
from the database. from the database.
@ -278,7 +278,7 @@ issue with Coder's configured database.
### EWP04 ### EWP04
_One or more Workspace Proxies Unhealthy_ #### One or more Workspace Proxies Unhealthy
**Problem:** One or more workspace proxies are not reachable. **Problem:** One or more workspace proxies are not reachable.
@ -287,7 +287,7 @@ workspace proxies.
### EPD01 ### EPD01
_No Provisioner Daemons Available_ #### No Provisioner Daemons Available
**Problem:** No provisioner daemons are registered with Coder. No workspaces can **Problem:** No provisioner daemons are registered with Coder. No workspaces can
be built until there is at least one provisioner daemon running. be built until there is at least one provisioner daemon running.
@ -305,7 +305,7 @@ is set to a value greater than 0.
### EPD02 ### EPD02
_Provisioner Daemon Version Mismatch_ #### Provisioner Daemon Version Mismatch
**Problem:** One or more provisioner daemons are more than one major or minor **Problem:** One or more provisioner daemons are more than one major or minor
version out of date with the main deployment. It is important that provisioner version out of date with the main deployment. It is important that provisioner
@ -320,7 +320,7 @@ version of Coder.
### EPD03 ### EPD03
_Provisioner Daemon API Version Mismatch_ #### Provisioner Daemon API Version Mismatch
**Problem:** One or more provisioner daemons are using APIs that are marked as **Problem:** One or more provisioner daemons are using APIs that are marked as
deprecated. These deprecated APIs may be removed in a future release of Coder, deprecated. These deprecated APIs may be removed in a future release of Coder,
@ -333,9 +333,9 @@ version of Coder.
> Note: This may be a transient issue if you are currently in the process of > Note: This may be a transient issue if you are currently in the process of
> updating your deployment. > updating your deployment.
## EUNKNOWN ### EUNKNOWN
_Unknown Error_ #### Unknown Error
**Problem:** This error is shown when an unexpected error occurred evaluating **Problem:** This error is shown when an unexpected error occurred evaluating
deployment health. It may resolve on its own. deployment health. It may resolve on its own.

View File

@ -8,7 +8,7 @@ If you don't have an Prometheus server installed, you can follow the Prometheus
[Getting started](https://prometheus.io/docs/prometheus/latest/getting_started/) [Getting started](https://prometheus.io/docs/prometheus/latest/getting_started/)
guide. guide.
### Setting up metrics ## Setting up metrics
To set up metrics monitoring, please read our To set up metrics monitoring, please read our
[Prometheus integration guide](../integrations/prometheus.md). The following [Prometheus integration guide](../integrations/prometheus.md). The following

View File

@ -64,7 +64,7 @@ You can modify the notification delivery behavior using the following server
flags. flags.
| Required | CLI | Env | Type | Description | Default | | Required | CLI | Env | Type | Description | Default |
| :------: | ----------------------------------- | --------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------- | ------- | |:--------:|-------------------------------------|-----------------------------------------|------------|-----------------------------------------------------------------------------------------------------------------------|---------|
| ✔️ | `--notifications-dispatch-timeout` | `CODER_NOTIFICATIONS_DISPATCH_TIMEOUT` | `duration` | How long to wait while a notification is being sent before giving up. | 1m | | ✔️ | `--notifications-dispatch-timeout` | `CODER_NOTIFICATIONS_DISPATCH_TIMEOUT` | `duration` | How long to wait while a notification is being sent before giving up. | 1m |
| ✔️ | `--notifications-method` | `CODER_NOTIFICATIONS_METHOD` | `string` | Which delivery method to use (available options: 'smtp', 'webhook'). See [Delivery Methods](#delivery-methods) below. | smtp | | ✔️ | `--notifications-method` | `CODER_NOTIFICATIONS_METHOD` | `string` | Which delivery method to use (available options: 'smtp', 'webhook'). See [Delivery Methods](#delivery-methods) below. | smtp |
| - | `--notifications-max-send-attempts` | `CODER_NOTIFICATIONS_MAX_SEND_ATTEMPTS` | `int` | The upper limit of attempts to send a notification. | 5 | | - | `--notifications-max-send-attempts` | `CODER_NOTIFICATIONS_MAX_SEND_ATTEMPTS` | `int` | The upper limit of attempts to send a notification. | 5 |
@ -90,15 +90,15 @@ existing one.
**Server Settings:** **Server Settings:**
| Required | CLI | Env | Type | Description | Default | | Required | CLI | Env | Type | Description | Default |
| :------: | ------------------- | ----------------------- | -------- | ----------------------------------------- | --------- | |:--------:|---------------------|-------------------------|----------|-------------------------------------------|-----------|
| ✔️ | `--email-from` | `CODER_EMAIL_FROM` | `string` | The sender's address to use. | | | ✔️ | `--email-from` | `CODER_EMAIL_FROM` | `string` | The sender's address to use. | |
| ✔️ | `--email-smarthost` | `CODER_EMAIL_SMARTHOST` | `string` | The SMTP relay to send messages | | ✔️ | `--email-smarthost` | `CODER_EMAIL_SMARTHOST` | `string` | The SMTP relay to send messages | |
| ✔️ | `--email-hello` | `CODER_EMAIL_HELLO` | `string` | The hostname identifying the SMTP server. | localhost | | ✔️ | `--email-hello` | `CODER_EMAIL_HELLO` | `string` | The hostname identifying the SMTP server. | localhost |
**Authentication Settings:** **Authentication Settings:**
| Required | CLI | Env | Type | Description | | Required | CLI | Env | Type | Description |
| :------: | ---------------------------- | -------------------------------- | -------- | ------------------------------------------------------------------------- | |:--------:|------------------------------|----------------------------------|----------|---------------------------------------------------------------------------|
| - | `--email-auth-username` | `CODER_EMAIL_AUTH_USERNAME` | `string` | Username to use with PLAIN/LOGIN authentication. | | - | `--email-auth-username` | `CODER_EMAIL_AUTH_USERNAME` | `string` | Username to use with PLAIN/LOGIN authentication. |
| - | `--email-auth-password` | `CODER_EMAIL_AUTH_PASSWORD` | `string` | Password to use with PLAIN/LOGIN authentication. | | - | `--email-auth-password` | `CODER_EMAIL_AUTH_PASSWORD` | `string` | Password to use with PLAIN/LOGIN authentication. |
| - | `--email-auth-password-file` | `CODER_EMAIL_AUTH_PASSWORD_FILE` | `string` | File from which to load password for use with PLAIN/LOGIN authentication. | | - | `--email-auth-password-file` | `CODER_EMAIL_AUTH_PASSWORD_FILE` | `string` | File from which to load password for use with PLAIN/LOGIN authentication. |
@ -106,14 +106,14 @@ existing one.
**TLS Settings:** **TLS Settings:**
| Required | CLI | Env | Type | Description | Default | | Required | CLI | Env | Type | Description | Default |
| :------: | --------------------------- | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | |:--------:|-----------------------------|-------------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| - | `--email-force-tls` | `CODER_EMAIL_FORCE_TLS` | `bool` | Force a TLS connection to the configured SMTP smarthost. If port 465 is used, TLS will be forced. See https://datatracker.ietf.org/doc/html/rfc8314#section-3.3. | false | | - | `--email-force-tls` | `CODER_EMAIL_FORCE_TLS` | `bool` | Force a TLS connection to the configured SMTP smarthost. If port 465 is used, TLS will be forced. See <https://datatracker.ietf.org/doc/html/rfc8314#section-3.3>. | false |
| - | `--email-tls-starttls` | `CODER_EMAIL_TLS_STARTTLS` | `bool` | Enable STARTTLS to upgrade insecure SMTP connections using TLS. Ignored if `CODER_NOTIFICATIONS_EMAIL_FORCE_TLS` is set. | false | | - | `--email-tls-starttls` | `CODER_EMAIL_TLS_STARTTLS` | `bool` | Enable STARTTLS to upgrade insecure SMTP connections using TLS. Ignored if `CODER_NOTIFICATIONS_EMAIL_FORCE_TLS` is set. | false |
| - | `--email-tls-skip-verify` | `CODER_EMAIL_TLS_SKIPVERIFY` | `bool` | Skip verification of the target server's certificate (**insecure**). | false | | - | `--email-tls-skip-verify` | `CODER_EMAIL_TLS_SKIPVERIFY` | `bool` | Skip verification of the target server's certificate (**insecure**). | false |
| - | `--email-tls-server-name` | `CODER_EMAIL_TLS_SERVERNAME` | `string` | Server name to verify against the target certificate. | | | - | `--email-tls-server-name` | `CODER_EMAIL_TLS_SERVERNAME` | `string` | Server name to verify against the target certificate. | |
| - | `--email-tls-cert-file` | `CODER_EMAIL_TLS_CERTFILE` | `string` | Certificate file to use. | | | - | `--email-tls-cert-file` | `CODER_EMAIL_TLS_CERTFILE` | `string` | Certificate file to use. | |
| - | `--email-tls-cert-key-file` | `CODER_EMAIL_TLS_CERTKEYFILE` | `string` | Certificate key file to use. | | | - | `--email-tls-cert-key-file` | `CODER_EMAIL_TLS_CERTKEYFILE` | `string` | Certificate key file to use. | |
**NOTE:** you _MUST_ use `CODER_EMAIL_FORCE_TLS` if your smarthost supports TLS **NOTE:** you _MUST_ use `CODER_EMAIL_FORCE_TLS` if your smarthost supports TLS
on a port other than `465`. on a port other than `465`.
@ -123,9 +123,11 @@ on a port other than `465`.
After setting the required fields above: After setting the required fields above:
1. Create an [App Password](https://myaccount.google.com/apppasswords) using the 1. Create an [App Password](https://myaccount.google.com/apppasswords) using the
account you wish to send from account you wish to send from.
2. Set the following configuration options:
``` 1. Set the following configuration options:
```text
CODER_EMAIL_SMARTHOST=smtp.gmail.com:465 CODER_EMAIL_SMARTHOST=smtp.gmail.com:465
CODER_EMAIL_AUTH_USERNAME=<user>@<domain> CODER_EMAIL_AUTH_USERNAME=<user>@<domain>
CODER_EMAIL_AUTH_PASSWORD="<app password created above>" CODER_EMAIL_AUTH_PASSWORD="<app password created above>"
@ -140,8 +142,9 @@ for more options.
After setting the required fields above: After setting the required fields above:
1. Setup an account on Microsoft 365 or outlook.com 1. Setup an account on Microsoft 365 or outlook.com
2. Set the following configuration options: 1. Set the following configuration options:
```
```text
CODER_EMAIL_SMARTHOST=smtp-mail.outlook.com:587 CODER_EMAIL_SMARTHOST=smtp-mail.outlook.com:587
CODER_EMAIL_TLS_STARTTLS=true CODER_EMAIL_TLS_STARTTLS=true
CODER_EMAIL_AUTH_USERNAME=<user>@<domain> CODER_EMAIL_AUTH_USERNAME=<user>@<domain>
@ -161,40 +164,40 @@ systems.
**Settings**: **Settings**:
| Required | CLI | Env | Type | Description | | Required | CLI | Env | Type | Description |
| :------: | ---------------------------------- | -------------------------------------- | ----- | --------------------------------------- | |:--------:|------------------------------------|----------------------------------------|-------|-----------------------------------------|
| ✔️ | `--notifications-webhook-endpoint` | `CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT` | `url` | The endpoint to which to send webhooks. | | ✔️ | `--notifications-webhook-endpoint` | `CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT` | `url` | The endpoint to which to send webhooks. |
Here is an example payload for Coder's webhook notification: Here is an example payload for Coder's webhook notification:
```json ```json
{ {
"_version": "1.0", "_version": "1.0",
"msg_id": "88750cad-77d4-4663-8bc0-f46855f5019b", "msg_id": "88750cad-77d4-4663-8bc0-f46855f5019b",
"payload": { "payload": {
"_version": "1.0", "_version": "1.0",
"notification_name": "Workspace Deleted", "notification_name": "Workspace Deleted",
"user_id": "4ac34fcb-8155-44d5-8301-e3cd46e88b35", "user_id": "4ac34fcb-8155-44d5-8301-e3cd46e88b35",
"user_email": "danny@coder.com", "user_email": "danny@coder.com",
"user_name": "danny", "user_name": "danny",
"user_username": "danny", "user_username": "danny",
"actions": [ "actions": [
{ {
"label": "View workspaces", "label": "View workspaces",
"url": "https://et23ntkhpueak.pit-1.try.coder.app/workspaces" "url": "https://et23ntkhpueak.pit-1.try.coder.app/workspaces"
}, },
{ {
"label": "View templates", "label": "View templates",
"url": "https://et23ntkhpueak.pit-1.try.coder.app/templates" "url": "https://et23ntkhpueak.pit-1.try.coder.app/templates"
} }
], ],
"labels": { "labels": {
"initiator": "danny", "initiator": "danny",
"name": "my-workspace", "name": "my-workspace",
"reason": "initiated by user" "reason": "initiated by user"
} }
}, },
"title": "Workspace \"my-workspace\" deleted", "title": "Workspace \"my-workspace\" deleted",
"body": "Hi danny\n\nYour workspace my-workspace was deleted.\nThe specified reason was \"initiated by user (danny)\"." "body": "Hi danny\n\nYour workspace my-workspace was deleted.\nThe specified reason was \"initiated by user (danny)\"."
} }
``` ```

View File

@ -34,9 +34,9 @@ To integrate Slack with Coder, follow these steps to create a Slack application:
3. Under "OAuth & Permissions", add the following OAuth scopes: 3. Under "OAuth & Permissions", add the following OAuth scopes:
- `chat:write`: To send messages as the app. - `chat:write`: To send messages as the app.
- `users:read`: To find the user details. - `users:read`: To find the user details.
- `users:read.email`: To find user emails. - `users:read.email`: To find user emails.
4. Install the app to your workspace and note down the **Bot User OAuth Token** 4. Install the app to your workspace and note down the **Bot User OAuth Token**
from the "OAuth & Permissions" section. from the "OAuth & Permissions" section.
@ -52,128 +52,128 @@ To build the server to receive webhooks and interact with Slack:
1. Initialize your project by running: 1. Initialize your project by running:
```bash ```bash
npm init -y npm init -y
``` ```
2. Install the Bolt library: 2. Install the Bolt library:
```bash ```bash
npm install @slack/bolt npm install @slack/bolt
``` ```
3. Create and edit the `app.js` file. Below is an example of the basic 3. Create and edit the `app.js` file. Below is an example of the basic
structure: structure:
```js ```js
const { App, LogLevel, ExpressReceiver } = require("@slack/bolt"); const { App, LogLevel, ExpressReceiver } = require("@slack/bolt");
const bodyParser = require("body-parser"); const bodyParser = require("body-parser");
const port = process.env.PORT || 6000; const port = process.env.PORT || 6000;
// Create a Bolt Receiver // Create a Bolt Receiver
const receiver = new ExpressReceiver({ const receiver = new ExpressReceiver({
signingSecret: process.env.SLACK_SIGNING_SECRET, signingSecret: process.env.SLACK_SIGNING_SECRET,
}); });
receiver.router.use(bodyParser.json()); receiver.router.use(bodyParser.json());
// Create the Bolt App, using the receiver // Create the Bolt App, using the receiver
const app = new App({ const app = new App({
token: process.env.SLACK_BOT_TOKEN, token: process.env.SLACK_BOT_TOKEN,
logLevel: LogLevel.DEBUG, logLevel: LogLevel.DEBUG,
receiver, receiver,
}); });
receiver.router.post("/v1/webhook", async (req, res) => { receiver.router.post("/v1/webhook", async (req, res) => {
try { try {
if (!req.body) { if (!req.body) {
return res.status(400).send("Error: request body is missing"); return res.status(400).send("Error: request body is missing");
} }
const { title, body } = req.body; const { title, body } = req.body;
if (!title || !body) { if (!title || !body) {
return res.status(400).send('Error: missing fields: "title", or "body"'); return res.status(400).send('Error: missing fields: "title", or "body"');
} }
const payload = req.body.payload; const payload = req.body.payload;
if (!payload) { if (!payload) {
return res.status(400).send('Error: missing "payload" field'); return res.status(400).send('Error: missing "payload" field');
} }
const { user_email, actions } = payload; const { user_email, actions } = payload;
if (!user_email || !actions) { if (!user_email || !actions) {
return res return res
.status(400) .status(400)
.send('Error: missing fields: "user_email", "actions"'); .send('Error: missing fields: "user_email", "actions"');
} }
// Get the user ID using Slack API // Get the user ID using Slack API
const userByEmail = await app.client.users.lookupByEmail({ const userByEmail = await app.client.users.lookupByEmail({
email: user_email, email: user_email,
}); });
const slackMessage = { const slackMessage = {
channel: userByEmail.user.id, channel: userByEmail.user.id,
text: body, text: body,
blocks: [ blocks: [
{ {
type: "header", type: "header",
text: { type: "plain_text", text: title }, text: { type: "plain_text", text: title },
}, },
{ {
type: "section", type: "section",
text: { type: "mrkdwn", text: body }, text: { type: "mrkdwn", text: body },
}, },
], ],
}; };
// Add action buttons if they exist // Add action buttons if they exist
if (actions && actions.length > 0) { if (actions && actions.length > 0) {
slackMessage.blocks.push({ slackMessage.blocks.push({
type: "actions", type: "actions",
elements: actions.map((action) => ({ elements: actions.map((action) => ({
type: "button", type: "button",
text: { type: "plain_text", text: action.label }, text: { type: "plain_text", text: action.label },
url: action.url, url: action.url,
})), })),
}); });
} }
// Post message to the user on Slack // Post message to the user on Slack
await app.client.chat.postMessage(slackMessage); await app.client.chat.postMessage(slackMessage);
res.status(204).send(); res.status(204).send();
} catch (error) { } catch (error) {
console.error("Error sending message:", error); console.error("Error sending message:", error);
res.status(500).send(); res.status(500).send();
} }
}); });
// Acknowledge clicks on link_button, otherwise Slack UI // Acknowledge clicks on link_button, otherwise Slack UI
// complains about missing events. // complains about missing events.
app.action("button_click", async ({ body, ack, say }) => { app.action("button_click", async ({ body, ack, say }) => {
await ack(); // no specific action needed await ack(); // no specific action needed
}); });
// Start the Bolt app // Start the Bolt app
(async () => { (async () => {
await app.start(port); await app.start(port);
console.log("⚡️ Coder Slack bot is running!"); console.log("⚡️ Coder Slack bot is running!");
})(); })();
``` ```
3. Set environment variables to identify the Slack app: 4. Set environment variables to identify the Slack app:
```bash ```bash
export SLACK_BOT_TOKEN=xoxb-... export SLACK_BOT_TOKEN=xoxb-...
export SLACK_SIGNING_SECRET=0da4b... export SLACK_SIGNING_SECRET=0da4b...
``` ```
4. Start the web application by running: 5. Start the web application by running:
```bash ```bash
node app.js node app.js
``` ```
## Enable Interactivity in Slack ## Enable Interactivity in Slack

View File

@ -21,115 +21,115 @@ following:
The process of setting up a Teams workflow consists of three key steps: The process of setting up a Teams workflow consists of three key steps:
1. Configure the Webhook Trigger. 1. Configure the Webhook Trigger.
Begin by configuring the trigger: **"When a Teams webhook request is Begin by configuring the trigger: **"When a Teams webhook request is
received"**. received"**.
Ensure the trigger access level is set to **"Anyone"**. Ensure the trigger access level is set to **"Anyone"**.
2. Setup the JSON Parsing Action. 1. Setup the JSON Parsing Action.
Next, add the **"Parse JSON"** action, linking the content to the **"Body"** Add the **"Parse JSON"** action, linking the content to the **"Body"** of the
of the received webhook request. Use the following schema to parse the received webhook request. Use the following schema to parse the notification
notification payload: payload:
```json ```json
{ {
"type": "object", "type": "object",
"properties": { "properties": {
"_version": { "_version": {
"type": "string" "type": "string"
}, },
"payload": { "payload": {
"type": "object", "type": "object",
"properties": { "properties": {
"_version": { "_version": {
"type": "string" "type": "string"
}, },
"user_email": { "user_email": {
"type": "string" "type": "string"
}, },
"actions": { "actions": {
"type": "array", "type": "array",
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
"label": { "label": {
"type": "string" "type": "string"
}, },
"url": { "url": {
"type": "string" "type": "string"
} }
}, },
"required": ["label", "url"] "required": ["label", "url"]
} }
} }
} }
}, },
"title": { "title": {
"type": "string" "type": "string"
}, },
"body": { "body": {
"type": "string" "type": "string"
} }
} }
} }
``` ```
This action parses the notification's title, body, and the recipient's email This action parses the notification's title, body, and the recipient's email
address. address.
3. Configure the Adaptive Card Action. 1. Configure the Adaptive Card Action.
Finally, set up the **"Post Adaptive Card in a chat or channel"** action Finally, set up the **"Post Adaptive Card in a chat or channel"** action with
with the following recommended settings: the following recommended settings:
**Post as**: Flow Bot **Post as**: Flow Bot
**Post in**: Chat with Flow Bot **Post in**: Chat with Flow Bot
**Recipient**: `user_email` **Recipient**: `user_email`
Use the following _Adaptive Card_ template: Use the following _Adaptive Card_ template:
```json ```json
{ {
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json", "$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard", "type": "AdaptiveCard",
"version": "1.0", "version": "1.0",
"body": [ "body": [
{ {
"type": "Image", "type": "Image",
"url": "https://coder.com/coder-logo-horizontal.png", "url": "https://coder.com/coder-logo-horizontal.png",
"height": "40px", "height": "40px",
"altText": "Coder", "altText": "Coder",
"horizontalAlignment": "center" "horizontalAlignment": "center"
}, },
{ {
"type": "TextBlock", "type": "TextBlock",
"text": "**@{replace(body('Parse_JSON')?['title'], '"', '\"')}**" "text": "**@{replace(body('Parse_JSON')?['title'], '"', '\"')}**"
}, },
{ {
"type": "TextBlock", "type": "TextBlock",
"text": "@{replace(body('Parse_JSON')?['body'], '"', '\"')}", "text": "@{replace(body('Parse_JSON')?['body'], '"', '\"')}",
"wrap": true "wrap": true
}, },
{ {
"type": "ActionSet", "type": "ActionSet",
"actions": [@{replace(replace(join(body('Parse_JSON')?['payload']?['actions'], ','), '{', '{"type": "Action.OpenUrl",'), '"label"', '"title"')}] "actions": [@{replace(replace(join(body('Parse_JSON')?['payload']?['actions'], ','), '{', '{"type": "Action.OpenUrl",'), '"label"', '"title"')}]
} }
] ]
} }
``` ```
_Notice_: The Coder `actions` format differs from the `ActionSet` schema, so _Notice_: The Coder `actions` format differs from the `ActionSet` schema, so
its properties need to be modified: include `Action.OpenUrl` type, rename its properties need to be modified: include `Action.OpenUrl` type, rename
`label` to `title`. Unfortunately, there is no straightforward solution for `label` to `title`. Unfortunately, there is no straightforward solution for
`for-each` pattern. `for-each` pattern.
Feel free to customize the payload to modify the logo, notification title, Feel free to customize the payload to modify the logo, notification title, or
or body content to suit your needs. body content to suit your needs.
## Enable Webhook Integration ## Enable Webhook Integration

View File

@ -42,7 +42,7 @@ rendezvous for the Coder nodes.
Here's an example 3-node network configuration setup: Here's an example 3-node network configuration setup:
| Name | `CODER_HTTP_ADDRESS` | `CODER_DERP_SERVER_RELAY_URL` | `CODER_ACCESS_URL` | | Name | `CODER_HTTP_ADDRESS` | `CODER_DERP_SERVER_RELAY_URL` | `CODER_ACCESS_URL` |
| --------- | -------------------- | ----------------------------- | ------------------------ | |-----------|----------------------|-------------------------------|--------------------------|
| `coder-1` | `*:80` | `http://10.0.0.1:80` | `https://coder.big.corp` | | `coder-1` | `*:80` | `http://10.0.0.1:80` | `https://coder.big.corp` |
| `coder-2` | `*:80` | `http://10.0.0.2:80` | `https://coder.big.corp` | | `coder-2` | `*:80` | `http://10.0.0.2:80` | `https://coder.big.corp` |
| `coder-3` | `*:80` | `http://10.0.0.3:80` | `https://coder.big.corp` | | `coder-3` | `*:80` | `http://10.0.0.3:80` | `https://coder.big.corp` |

View File

@ -168,7 +168,7 @@ After you have custom DERP servers, you can launch Coder with them like so:
``` ```
```bash ```bash
$ coder server --derp-config-path derpmap.json coder server --derp-config-path derpmap.json
``` ```
### Dashboard connections ### Dashboard connections

View File

@ -156,7 +156,7 @@ protocol configuration for each shared port individually.
You can access any port on the workspace and can configure the port protocol You can access any port on the workspace and can configure the port protocol
manually by appending a `s` to the port in the URL. manually by appending a `s` to the port in the URL.
``` ```text
# Uses HTTP # Uses HTTP
https://33295--agent--workspace--user--apps.example.com/ https://33295--agent--workspace--user--apps.example.com/
# Uses HTTPS # Uses HTTPS
@ -180,8 +180,8 @@ requests cannot be authenticated and you will see an error resembling the
following: following:
> Access to fetch at > Access to fetch at
> 'https://coder.example.com/api/v2/applications/auth-redirect' from origin > '<https://coder.example.com/api/v2/applications/auth-redirect>' from origin
> 'https://8000--dev--user--apps.coder.example.com' has been blocked by CORS > '<https://8000--dev--user--apps.coder.example.com>' has been blocked by CORS
> policy: No 'Access-Control-Allow-Origin' header is present on the requested > policy: No 'Access-Control-Allow-Origin' header is present on the requested
> resource. If an opaque response serves your needs, set the request's mode to > resource. If an opaque response serves your needs, set the request's mode to
> 'no-cors' to fetch the resource with CORS disabled. > 'no-cors' to fetch the resource with CORS disabled.
@ -190,7 +190,7 @@ following:
Below is a list of the cross-origin headers Coder sets with example values: Below is a list of the cross-origin headers Coder sets with example values:
``` ```text
access-control-allow-credentials: true access-control-allow-credentials: true
access-control-allow-methods: PUT access-control-allow-methods: PUT
access-control-allow-headers: X-Custom-Header access-control-allow-headers: X-Custom-Header

View File

@ -14,11 +14,11 @@ connecting with their workspace over SSH, a workspace app, port forwarding, etc.
Dashboard connections and API calls (e.g. the workspaces list) are not served Dashboard connections and API calls (e.g. the workspaces list) are not served
over workspace proxies. over workspace proxies.
# Deploy a workspace proxy ## Deploy a workspace proxy
Each workspace proxy should be a unique instance. At no point should 2 workspace Each workspace proxy should be a unique instance. At no point should two
proxy instances share the same authentication token. They only require port 443 workspace proxy instances share the same authentication token. They only require
to be open and are expected to have network connectivity to the coderd port 443 to be open and are expected to have network connectivity to the coderd
dashboard. Workspace proxies **do not** make any database connections. dashboard. Workspace proxies **do not** make any database connections.
Workspace proxies can be used in the browser by navigating to the user Workspace proxies can be used in the browser by navigating to the user

View File

@ -201,33 +201,33 @@ different organizations.
This is illustrated in the below table: This is illustrated in the below table:
| Provisioner Tags | Job Tags | Same Org | Can Run Job? | | Provisioner Tags | Job Tags | Same Org | Can Run Job? |
| ----------------------------------------------------------------- | ---------------------------------------------------------------- | -------- | ------------ | |-------------------------------------------------------------------|------------------------------------------------------------------|----------|--------------|
| scope=organization owner= | scope=organization owner= | ✅ | ✅ | | scope=organization owner= | scope=organization owner= | ✅ | ✅ |
| scope=organization owner= environment=on-prem | scope=organization owner= environment=on-prem | ✅ | ✅ | | scope=organization owner= environment=on-prem | scope=organization owner= environment=on-prem | ✅ | ✅ |
| scope=organization owner= environment=on-prem datacenter=chicago | scope=organization owner= environment=on-prem | ✅ | ✅ | | scope=organization owner= environment=on-prem datacenter=chicago | scope=organization owner= environment=on-prem | ✅ | ✅ |
| scope=organization owner= environment=on-prem datacenter=chicago | scope=organization owner= environment=on-prem datacenter=chicago | ✅ | ✅ | | scope=organization owner= environment=on-prem datacenter=chicago | scope=organization owner= environment=on-prem datacenter=chicago | ✅ | ✅ |
| scope=user owner=aaa | scope=user owner=aaa | ✅ | ✅ | | scope=user owner=aaa | scope=user owner=aaa | ✅ | ✅ |
| scope=user owner=aaa environment=on-prem | scope=user owner=aaa | ✅ | ✅ | | scope=user owner=aaa environment=on-prem | scope=user owner=aaa | ✅ | ✅ |
| scope=user owner=aaa environment=on-prem | scope=user owner=aaa environment=on-prem | ✅ | ✅ | | scope=user owner=aaa environment=on-prem | scope=user owner=aaa environment=on-prem | ✅ | ✅ |
| scope=user owner=aaa environment=on-prem datacenter=chicago | scope=user owner=aaa environment=on-prem | ✅ | ✅ | | scope=user owner=aaa environment=on-prem datacenter=chicago | scope=user owner=aaa environment=on-prem | ✅ | ✅ |
| scope=user owner=aaa environment=on-prem datacenter=chicago | scope=user owner=aaa environment=on-prem datacenter=chicago | ✅ | ✅ | | scope=user owner=aaa environment=on-prem datacenter=chicago | scope=user owner=aaa environment=on-prem datacenter=chicago | ✅ | ✅ |
| scope=organization owner= | scope=organization owner= environment=on-prem | ✅ | ❌ | | scope=organization owner= | scope=organization owner= environment=on-prem | ✅ | ❌ |
| scope=organization owner= environment=on-prem | scope=organization owner= | ✅ | ❌ | | scope=organization owner= environment=on-prem | scope=organization owner= | ✅ | ❌ |
| scope=organization owner= environment=on-prem | scope=organization owner= environment=on-prem datacenter=chicago | ✅ | ❌ | | scope=organization owner= environment=on-prem | scope=organization owner= environment=on-prem datacenter=chicago | ✅ | ❌ |
| scope=organization owner= environment=on-prem datacenter=new_york | scope=organization owner= environment=on-prem datacenter=chicago | ✅ | ❌ | | scope=organization owner= environment=on-prem datacenter=new_york | scope=organization owner= environment=on-prem datacenter=chicago | ✅ | ❌ |
| scope=user owner=aaa | scope=organization owner= | ✅ | ❌ | | scope=user owner=aaa | scope=organization owner= | ✅ | ❌ |
| scope=user owner=aaa | scope=user owner=bbb | ✅ | ❌ | | scope=user owner=aaa | scope=user owner=bbb | ✅ | ❌ |
| scope=organization owner= | scope=user owner=aaa | ✅ | ❌ | | scope=organization owner= | scope=user owner=aaa | ✅ | ❌ |
| scope=organization owner= | scope=user owner=aaa environment=on-prem | ✅ | ❌ | | scope=organization owner= | scope=user owner=aaa environment=on-prem | ✅ | ❌ |
| scope=user owner=aaa | scope=user owner=aaa environment=on-prem | ✅ | ❌ | | scope=user owner=aaa | scope=user owner=aaa environment=on-prem | ✅ | ❌ |
| scope=user owner=aaa environment=on-prem | scope=user owner=aaa environment=on-prem datacenter=chicago | ✅ | ❌ | | scope=user owner=aaa environment=on-prem | scope=user owner=aaa environment=on-prem datacenter=chicago | ✅ | ❌ |
| scope=user owner=aaa environment=on-prem datacenter=chicago | scope=user owner=aaa environment=on-prem datacenter=new_york | ✅ | ❌ | | scope=user owner=aaa environment=on-prem datacenter=chicago | scope=user owner=aaa environment=on-prem datacenter=new_york | ✅ | ❌ |
| scope=organization owner= environment=on-prem | scope=organization owner= environment=on-prem | ❌ | ❌ | | scope=organization owner= environment=on-prem | scope=organization owner= environment=on-prem | ❌ | ❌ |
> **Note to maintainers:** to generate this table, run the following command and > **Note to maintainers:** to generate this table, run the following command and
> copy the output: > copy the output:
> >
> ``` > ```go
> go test -v -count=1 ./coderd/provisionerdserver/ -test.run='^TestAcquirer_MatchTags/GenTable$' > go test -v -count=1 ./coderd/provisionerdserver/ -test.run='^TestAcquirer_MatchTags/GenTable$'
> ``` > ```

View File

@ -8,30 +8,30 @@ We track the following resources:
<!-- Code generated by 'make docs/admin/security/audit-logs.md'. DO NOT EDIT --> <!-- Code generated by 'make docs/admin/security/audit-logs.md'. DO NOT EDIT -->
| <b>Resource<b> | | | <b>Resource<b> | | |
| -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |----------------------------------------------------------|----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| APIKey<br><i>login, logout, register, create, delete</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>created_at</td><td>true</td></tr><tr><td>expires_at</td><td>true</td></tr><tr><td>hashed_secret</td><td>false</td></tr><tr><td>id</td><td>false</td></tr><tr><td>ip_address</td><td>false</td></tr><tr><td>last_used</td><td>true</td></tr><tr><td>lifetime_seconds</td><td>false</td></tr><tr><td>login_type</td><td>false</td></tr><tr><td>scope</td><td>false</td></tr><tr><td>token_name</td><td>false</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>user_id</td><td>true</td></tr></tbody></table> | | APIKey<br><i>login, logout, register, create, delete</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>created_at</td><td>true</td></tr><tr><td>expires_at</td><td>true</td></tr><tr><td>hashed_secret</td><td>false</td></tr><tr><td>id</td><td>false</td></tr><tr><td>ip_address</td><td>false</td></tr><tr><td>last_used</td><td>true</td></tr><tr><td>lifetime_seconds</td><td>false</td></tr><tr><td>login_type</td><td>false</td></tr><tr><td>scope</td><td>false</td></tr><tr><td>token_name</td><td>false</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>user_id</td><td>true</td></tr></tbody></table> |
| AuditOAuthConvertState<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>created_at</td><td>true</td></tr><tr><td>expires_at</td><td>true</td></tr><tr><td>from_login_type</td><td>true</td></tr><tr><td>to_login_type</td><td>true</td></tr><tr><td>user_id</td><td>true</td></tr></tbody></table> | | AuditOAuthConvertState<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>created_at</td><td>true</td></tr><tr><td>expires_at</td><td>true</td></tr><tr><td>from_login_type</td><td>true</td></tr><tr><td>to_login_type</td><td>true</td></tr><tr><td>user_id</td><td>true</td></tr></tbody></table> |
| Group<br><i>create, write, delete</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>avatar_url</td><td>true</td></tr><tr><td>display_name</td><td>true</td></tr><tr><td>id</td><td>true</td></tr><tr><td>members</td><td>true</td></tr><tr><td>name</td><td>true</td></tr><tr><td>organization_id</td><td>false</td></tr><tr><td>quota_allowance</td><td>true</td></tr><tr><td>source</td><td>false</td></tr></tbody></table> | | Group<br><i>create, write, delete</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>avatar_url</td><td>true</td></tr><tr><td>display_name</td><td>true</td></tr><tr><td>id</td><td>true</td></tr><tr><td>members</td><td>true</td></tr><tr><td>name</td><td>true</td></tr><tr><td>organization_id</td><td>false</td></tr><tr><td>quota_allowance</td><td>true</td></tr><tr><td>source</td><td>false</td></tr></tbody></table> |
| AuditableOrganizationMember<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>created_at</td><td>true</td></tr><tr><td>organization_id</td><td>false</td></tr><tr><td>roles</td><td>true</td></tr><tr><td>updated_at</td><td>true</td></tr><tr><td>user_id</td><td>true</td></tr><tr><td>username</td><td>true</td></tr></tbody></table> | | AuditableOrganizationMember<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>created_at</td><td>true</td></tr><tr><td>organization_id</td><td>false</td></tr><tr><td>roles</td><td>true</td></tr><tr><td>updated_at</td><td>true</td></tr><tr><td>user_id</td><td>true</td></tr><tr><td>username</td><td>true</td></tr></tbody></table> |
| CustomRole<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>created_at</td><td>false</td></tr><tr><td>display_name</td><td>true</td></tr><tr><td>id</td><td>false</td></tr><tr><td>name</td><td>true</td></tr><tr><td>org_permissions</td><td>true</td></tr><tr><td>organization_id</td><td>false</td></tr><tr><td>site_permissions</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>user_permissions</td><td>true</td></tr></tbody></table> | | CustomRole<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>created_at</td><td>false</td></tr><tr><td>display_name</td><td>true</td></tr><tr><td>id</td><td>false</td></tr><tr><td>name</td><td>true</td></tr><tr><td>org_permissions</td><td>true</td></tr><tr><td>organization_id</td><td>false</td></tr><tr><td>site_permissions</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>user_permissions</td><td>true</td></tr></tbody></table> |
| GitSSHKey<br><i>create</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>created_at</td><td>false</td></tr><tr><td>private_key</td><td>true</td></tr><tr><td>public_key</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>user_id</td><td>true</td></tr></tbody></table> | | GitSSHKey<br><i>create</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>created_at</td><td>false</td></tr><tr><td>private_key</td><td>true</td></tr><tr><td>public_key</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>user_id</td><td>true</td></tr></tbody></table> |
| GroupSyncSettings<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>auto_create_missing_groups</td><td>true</td></tr><tr><td>field</td><td>true</td></tr><tr><td>legacy_group_name_mapping</td><td>false</td></tr><tr><td>mapping</td><td>true</td></tr><tr><td>regex_filter</td><td>true</td></tr></tbody></table> | | GroupSyncSettings<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>auto_create_missing_groups</td><td>true</td></tr><tr><td>field</td><td>true</td></tr><tr><td>legacy_group_name_mapping</td><td>false</td></tr><tr><td>mapping</td><td>true</td></tr><tr><td>regex_filter</td><td>true</td></tr></tbody></table> |
| HealthSettings<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>dismissed_healthchecks</td><td>true</td></tr><tr><td>id</td><td>false</td></tr></tbody></table> | | HealthSettings<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>dismissed_healthchecks</td><td>true</td></tr><tr><td>id</td><td>false</td></tr></tbody></table> |
| License<br><i>create, delete</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>exp</td><td>true</td></tr><tr><td>id</td><td>false</td></tr><tr><td>jwt</td><td>false</td></tr><tr><td>uploaded_at</td><td>true</td></tr><tr><td>uuid</td><td>true</td></tr></tbody></table> | | License<br><i>create, delete</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>exp</td><td>true</td></tr><tr><td>id</td><td>false</td></tr><tr><td>jwt</td><td>false</td></tr><tr><td>uploaded_at</td><td>true</td></tr><tr><td>uuid</td><td>true</td></tr></tbody></table> |
| NotificationTemplate<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>actions</td><td>true</td></tr><tr><td>body_template</td><td>true</td></tr><tr><td>group</td><td>true</td></tr><tr><td>id</td><td>false</td></tr><tr><td>kind</td><td>true</td></tr><tr><td>method</td><td>true</td></tr><tr><td>name</td><td>true</td></tr><tr><td>title_template</td><td>true</td></tr></tbody></table> | | NotificationTemplate<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>actions</td><td>true</td></tr><tr><td>body_template</td><td>true</td></tr><tr><td>group</td><td>true</td></tr><tr><td>id</td><td>false</td></tr><tr><td>kind</td><td>true</td></tr><tr><td>method</td><td>true</td></tr><tr><td>name</td><td>true</td></tr><tr><td>title_template</td><td>true</td></tr></tbody></table> |
| NotificationsSettings<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>id</td><td>false</td></tr><tr><td>notifier_paused</td><td>true</td></tr></tbody></table> | | NotificationsSettings<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>id</td><td>false</td></tr><tr><td>notifier_paused</td><td>true</td></tr></tbody></table> |
| OAuth2ProviderApp<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>callback_url</td><td>true</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>icon</td><td>true</td></tr><tr><td>id</td><td>false</td></tr><tr><td>name</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr></tbody></table> | | OAuth2ProviderApp<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>callback_url</td><td>true</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>icon</td><td>true</td></tr><tr><td>id</td><td>false</td></tr><tr><td>name</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr></tbody></table> |
| OAuth2ProviderAppSecret<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>app_id</td><td>false</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>display_secret</td><td>false</td></tr><tr><td>hashed_secret</td><td>false</td></tr><tr><td>id</td><td>false</td></tr><tr><td>last_used_at</td><td>false</td></tr><tr><td>secret_prefix</td><td>false</td></tr></tbody></table> | | OAuth2ProviderAppSecret<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>app_id</td><td>false</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>display_secret</td><td>false</td></tr><tr><td>hashed_secret</td><td>false</td></tr><tr><td>id</td><td>false</td></tr><tr><td>last_used_at</td><td>false</td></tr><tr><td>secret_prefix</td><td>false</td></tr></tbody></table> |
| Organization<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>created_at</td><td>false</td></tr><tr><td>description</td><td>true</td></tr><tr><td>display_name</td><td>true</td></tr><tr><td>icon</td><td>true</td></tr><tr><td>id</td><td>false</td></tr><tr><td>is_default</td><td>true</td></tr><tr><td>name</td><td>true</td></tr><tr><td>updated_at</td><td>true</td></tr></tbody></table> | | Organization<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>created_at</td><td>false</td></tr><tr><td>description</td><td>true</td></tr><tr><td>display_name</td><td>true</td></tr><tr><td>icon</td><td>true</td></tr><tr><td>id</td><td>false</td></tr><tr><td>is_default</td><td>true</td></tr><tr><td>name</td><td>true</td></tr><tr><td>updated_at</td><td>true</td></tr></tbody></table> |
| OrganizationSyncSettings<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>assign_default</td><td>true</td></tr><tr><td>field</td><td>true</td></tr><tr><td>mapping</td><td>true</td></tr></tbody></table> | | OrganizationSyncSettings<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>assign_default</td><td>true</td></tr><tr><td>field</td><td>true</td></tr><tr><td>mapping</td><td>true</td></tr></tbody></table> |
| RoleSyncSettings<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>field</td><td>true</td></tr><tr><td>mapping</td><td>true</td></tr></tbody></table> | | RoleSyncSettings<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>field</td><td>true</td></tr><tr><td>mapping</td><td>true</td></tr></tbody></table> |
| Template<br><i>write, delete</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>active_version_id</td><td>true</td></tr><tr><td>activity_bump</td><td>true</td></tr><tr><td>allow_user_autostart</td><td>true</td></tr><tr><td>allow_user_autostop</td><td>true</td></tr><tr><td>allow_user_cancel_workspace_jobs</td><td>true</td></tr><tr><td>autostart_block_days_of_week</td><td>true</td></tr><tr><td>autostop_requirement_days_of_week</td><td>true</td></tr><tr><td>autostop_requirement_weeks</td><td>true</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>created_by</td><td>true</td></tr><tr><td>created_by_avatar_url</td><td>false</td></tr><tr><td>created_by_username</td><td>false</td></tr><tr><td>default_ttl</td><td>true</td></tr><tr><td>deleted</td><td>false</td></tr><tr><td>deprecated</td><td>true</td></tr><tr><td>description</td><td>true</td></tr><tr><td>display_name</td><td>true</td></tr><tr><td>failure_ttl</td><td>true</td></tr><tr><td>group_acl</td><td>true</td></tr><tr><td>icon</td><td>true</td></tr><tr><td>id</td><td>true</td></tr><tr><td>max_port_sharing_level</td><td>true</td></tr><tr><td>name</td><td>true</td></tr><tr><td>organization_display_name</td><td>false</td></tr><tr><td>organization_icon</td><td>false</td></tr><tr><td>organization_id</td><td>false</td></tr><tr><td>organization_name</td><td>false</td></tr><tr><td>provisioner</td><td>true</td></tr><tr><td>require_active_version</td><td>true</td></tr><tr><td>time_til_dormant</td><td>true</td></tr><tr><td>time_til_dormant_autodelete</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>user_acl</td><td>true</td></tr></tbody></table> | | Template<br><i>write, delete</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>active_version_id</td><td>true</td></tr><tr><td>activity_bump</td><td>true</td></tr><tr><td>allow_user_autostart</td><td>true</td></tr><tr><td>allow_user_autostop</td><td>true</td></tr><tr><td>allow_user_cancel_workspace_jobs</td><td>true</td></tr><tr><td>autostart_block_days_of_week</td><td>true</td></tr><tr><td>autostop_requirement_days_of_week</td><td>true</td></tr><tr><td>autostop_requirement_weeks</td><td>true</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>created_by</td><td>true</td></tr><tr><td>created_by_avatar_url</td><td>false</td></tr><tr><td>created_by_username</td><td>false</td></tr><tr><td>default_ttl</td><td>true</td></tr><tr><td>deleted</td><td>false</td></tr><tr><td>deprecated</td><td>true</td></tr><tr><td>description</td><td>true</td></tr><tr><td>display_name</td><td>true</td></tr><tr><td>failure_ttl</td><td>true</td></tr><tr><td>group_acl</td><td>true</td></tr><tr><td>icon</td><td>true</td></tr><tr><td>id</td><td>true</td></tr><tr><td>max_port_sharing_level</td><td>true</td></tr><tr><td>name</td><td>true</td></tr><tr><td>organization_display_name</td><td>false</td></tr><tr><td>organization_icon</td><td>false</td></tr><tr><td>organization_id</td><td>false</td></tr><tr><td>organization_name</td><td>false</td></tr><tr><td>provisioner</td><td>true</td></tr><tr><td>require_active_version</td><td>true</td></tr><tr><td>time_til_dormant</td><td>true</td></tr><tr><td>time_til_dormant_autodelete</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>user_acl</td><td>true</td></tr></tbody></table> |
| TemplateVersion<br><i>create, write</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>archived</td><td>true</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>created_by</td><td>true</td></tr><tr><td>created_by_avatar_url</td><td>false</td></tr><tr><td>created_by_username</td><td>false</td></tr><tr><td>external_auth_providers</td><td>false</td></tr><tr><td>id</td><td>true</td></tr><tr><td>job_id</td><td>false</td></tr><tr><td>message</td><td>false</td></tr><tr><td>name</td><td>true</td></tr><tr><td>organization_id</td><td>false</td></tr><tr><td>readme</td><td>true</td></tr><tr><td>source_example_id</td><td>false</td></tr><tr><td>template_id</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr></tbody></table> | | TemplateVersion<br><i>create, write</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>archived</td><td>true</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>created_by</td><td>true</td></tr><tr><td>created_by_avatar_url</td><td>false</td></tr><tr><td>created_by_username</td><td>false</td></tr><tr><td>external_auth_providers</td><td>false</td></tr><tr><td>id</td><td>true</td></tr><tr><td>job_id</td><td>false</td></tr><tr><td>message</td><td>false</td></tr><tr><td>name</td><td>true</td></tr><tr><td>organization_id</td><td>false</td></tr><tr><td>readme</td><td>true</td></tr><tr><td>source_example_id</td><td>false</td></tr><tr><td>template_id</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr></tbody></table> |
| User<br><i>create, write, delete</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>avatar_url</td><td>false</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>deleted</td><td>true</td></tr><tr><td>email</td><td>true</td></tr><tr><td>github_com_user_id</td><td>false</td></tr><tr><td>hashed_one_time_passcode</td><td>false</td></tr><tr><td>hashed_password</td><td>true</td></tr><tr><td>id</td><td>true</td></tr><tr><td>last_seen_at</td><td>false</td></tr><tr><td>login_type</td><td>true</td></tr><tr><td>name</td><td>true</td></tr><tr><td>one_time_passcode_expires_at</td><td>true</td></tr><tr><td>quiet_hours_schedule</td><td>true</td></tr><tr><td>rbac_roles</td><td>true</td></tr><tr><td>status</td><td>true</td></tr><tr><td>theme_preference</td><td>false</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>username</td><td>true</td></tr></tbody></table> | | User<br><i>create, write, delete</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>avatar_url</td><td>false</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>deleted</td><td>true</td></tr><tr><td>email</td><td>true</td></tr><tr><td>github_com_user_id</td><td>false</td></tr><tr><td>hashed_one_time_passcode</td><td>false</td></tr><tr><td>hashed_password</td><td>true</td></tr><tr><td>id</td><td>true</td></tr><tr><td>last_seen_at</td><td>false</td></tr><tr><td>login_type</td><td>true</td></tr><tr><td>name</td><td>true</td></tr><tr><td>one_time_passcode_expires_at</td><td>true</td></tr><tr><td>quiet_hours_schedule</td><td>true</td></tr><tr><td>rbac_roles</td><td>true</td></tr><tr><td>status</td><td>true</td></tr><tr><td>theme_preference</td><td>false</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>username</td><td>true</td></tr></tbody></table> |
| WorkspaceBuild<br><i>start, stop</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>build_number</td><td>false</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>daily_cost</td><td>false</td></tr><tr><td>deadline</td><td>false</td></tr><tr><td>id</td><td>false</td></tr><tr><td>initiator_by_avatar_url</td><td>false</td></tr><tr><td>initiator_by_username</td><td>false</td></tr><tr><td>initiator_id</td><td>false</td></tr><tr><td>job_id</td><td>false</td></tr><tr><td>max_deadline</td><td>false</td></tr><tr><td>provisioner_state</td><td>false</td></tr><tr><td>reason</td><td>false</td></tr><tr><td>template_version_id</td><td>true</td></tr><tr><td>transition</td><td>false</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>workspace_id</td><td>false</td></tr></tbody></table> | | WorkspaceBuild<br><i>start, stop</i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>build_number</td><td>false</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>daily_cost</td><td>false</td></tr><tr><td>deadline</td><td>false</td></tr><tr><td>id</td><td>false</td></tr><tr><td>initiator_by_avatar_url</td><td>false</td></tr><tr><td>initiator_by_username</td><td>false</td></tr><tr><td>initiator_id</td><td>false</td></tr><tr><td>job_id</td><td>false</td></tr><tr><td>max_deadline</td><td>false</td></tr><tr><td>provisioner_state</td><td>false</td></tr><tr><td>reason</td><td>false</td></tr><tr><td>template_version_id</td><td>true</td></tr><tr><td>transition</td><td>false</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>workspace_id</td><td>false</td></tr></tbody></table> |
| WorkspaceProxy<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>created_at</td><td>true</td></tr><tr><td>deleted</td><td>false</td></tr><tr><td>derp_enabled</td><td>true</td></tr><tr><td>derp_only</td><td>true</td></tr><tr><td>display_name</td><td>true</td></tr><tr><td>icon</td><td>true</td></tr><tr><td>id</td><td>true</td></tr><tr><td>name</td><td>true</td></tr><tr><td>region_id</td><td>true</td></tr><tr><td>token_hashed_secret</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>url</td><td>true</td></tr><tr><td>version</td><td>true</td></tr><tr><td>wildcard_hostname</td><td>true</td></tr></tbody></table> | | WorkspaceProxy<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>created_at</td><td>true</td></tr><tr><td>deleted</td><td>false</td></tr><tr><td>derp_enabled</td><td>true</td></tr><tr><td>derp_only</td><td>true</td></tr><tr><td>display_name</td><td>true</td></tr><tr><td>icon</td><td>true</td></tr><tr><td>id</td><td>true</td></tr><tr><td>name</td><td>true</td></tr><tr><td>region_id</td><td>true</td></tr><tr><td>token_hashed_secret</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr><tr><td>url</td><td>true</td></tr><tr><td>version</td><td>true</td></tr><tr><td>wildcard_hostname</td><td>true</td></tr></tbody></table> |
| WorkspaceTable<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody><tr><td>automatic_updates</td><td>true</td></tr><tr><td>autostart_schedule</td><td>true</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>deleted</td><td>false</td></tr><tr><td>deleting_at</td><td>true</td></tr><tr><td>dormant_at</td><td>true</td></tr><tr><td>favorite</td><td>true</td></tr><tr><td>id</td><td>true</td></tr><tr><td>last_used_at</td><td>false</td></tr><tr><td>name</td><td>true</td></tr><tr><td>next_start_at</td><td>true</td></tr><tr><td>organization_id</td><td>false</td></tr><tr><td>owner_id</td><td>true</td></tr><tr><td>template_id</td><td>true</td></tr><tr><td>ttl</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr></tbody></table> | | WorkspaceTable<br><i></i> | <table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody> | <tr><td>automatic_updates</td><td>true</td></tr><tr><td>autostart_schedule</td><td>true</td></tr><tr><td>created_at</td><td>false</td></tr><tr><td>deleted</td><td>false</td></tr><tr><td>deleting_at</td><td>true</td></tr><tr><td>dormant_at</td><td>true</td></tr><tr><td>favorite</td><td>true</td></tr><tr><td>id</td><td>true</td></tr><tr><td>last_used_at</td><td>false</td></tr><tr><td>name</td><td>true</td></tr><tr><td>next_start_at</td><td>true</td></tr><tr><td>organization_id</td><td>false</td></tr><tr><td>owner_id</td><td>true</td></tr><tr><td>template_id</td><td>true</td></tr><tr><td>ttl</td><td>true</td></tr><tr><td>updated_at</td><td>false</td></tr></tbody></table> |
<!-- End generated by 'make docs/admin/security/audit-logs.md'. --> <!-- End generated by 'make docs/admin/security/audit-logs.md'. -->
@ -85,34 +85,34 @@ log entry:
```json ```json
{ {
"ts": "2023-06-13T03:45:37.294730279Z", "ts": "2023-06-13T03:45:37.294730279Z",
"level": "INFO", "level": "INFO",
"msg": "audit_log", "msg": "audit_log",
"caller": "/home/runner/work/coder/coder/enterprise/audit/backends/slog.go:36", "caller": "/home/runner/work/coder/coder/enterprise/audit/backends/slog.go:36",
"func": "github.com/coder/coder/enterprise/audit/backends.slogBackend.Export", "func": "github.com/coder/coder/enterprise/audit/backends.slogBackend.Export",
"logger_names": ["coderd"], "logger_names": ["coderd"],
"fields": { "fields": {
"ID": "033a9ffa-b54d-4c10-8ec3-2aaf9e6d741a", "ID": "033a9ffa-b54d-4c10-8ec3-2aaf9e6d741a",
"Time": "2023-06-13T03:45:37.288506Z", "Time": "2023-06-13T03:45:37.288506Z",
"UserID": "6c405053-27e3-484a-9ad7-bcb64e7bfde6", "UserID": "6c405053-27e3-484a-9ad7-bcb64e7bfde6",
"OrganizationID": "00000000-0000-0000-0000-000000000000", "OrganizationID": "00000000-0000-0000-0000-000000000000",
"Ip": "{IPNet:{IP:\u003cnil\u003e Mask:\u003cnil\u003e} Valid:false}", "Ip": "{IPNet:{IP:\u003cnil\u003e Mask:\u003cnil\u003e} Valid:false}",
"UserAgent": "{String: Valid:false}", "UserAgent": "{String: Valid:false}",
"ResourceType": "workspace_build", "ResourceType": "workspace_build",
"ResourceID": "ca5647e0-ef50-4202-a246-717e04447380", "ResourceID": "ca5647e0-ef50-4202-a246-717e04447380",
"ResourceTarget": "", "ResourceTarget": "",
"Action": "start", "Action": "start",
"Diff": {}, "Diff": {},
"StatusCode": 200, "StatusCode": 200,
"AdditionalFields": { "AdditionalFields": {
"workspace_name": "linux-container", "workspace_name": "linux-container",
"build_number": "9", "build_number": "9",
"build_reason": "initiator", "build_reason": "initiator",
"workspace_owner": "" "workspace_owner": ""
}, },
"RequestID": "bb791ac3-f6ee-4da8-8ec2-f54e87013e93", "RequestID": "bb791ac3-f6ee-4da8-8ec2-f54e87013e93",
"ResourceIcon": "" "ResourceIcon": ""
} }
} }
``` ```

View File

@ -23,5 +23,5 @@ vulnerability.
--- ---
| Description | Severity | Fix | Vulnerable Versions | | Description | Severity | Fix | Vulnerable Versions |
| --------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------- | ------------------- | |-----------------------------------------------------------------------------------------------------------------------------------------------|----------|----------------------------------------------------------------|---------------------|
| [API tokens of deleted users not invalidated](https://github.com/coder/coder/blob/main/docs/admin/security/0001_user_apikeys_invalidation.md) | HIGH | [v0.23.0](https://github.com/coder/coder/releases/tag/v0.23.0) | v0.8.25 - v0.22.2 | | [API tokens of deleted users not invalidated](https://github.com/coder/coder/blob/main/docs/admin/security/0001_user_apikeys_invalidation.md) | HIGH | [v0.23.0](https://github.com/coder/coder/releases/tag/v0.23.0) | v0.8.25 - v0.22.2 |

View File

@ -9,7 +9,7 @@ This article explains how to use secrets in a workspace. To authenticate the
workspace provisioner, see the workspace provisioner, see the
<a href="../provisioners.md#authentication">provisioners documentation</a>. <a href="../provisioners.md#authentication">provisioners documentation</a>.
## Wait a minute... ## Before you begin
Your first attempt to use secrets with Coder should be your local method. You Your first attempt to use secrets with Coder should be your local method. You
can do everything you can locally and more with your Coder workspace, so can do everything you can locally and more with your Coder workspace, so

View File

@ -3,7 +3,7 @@
There are a few ways to run Docker within container-based Coder workspaces. There are a few ways to run Docker within container-based Coder workspaces.
| Method | Description | Limitations | | Method | Description | Limitations |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Sysbox container runtime](#sysbox-container-runtime) | Install the Sysbox runtime on your Kubernetes nodes or Docker host(s) for secure docker-in-docker and systemd-in-docker. Works with GKE, EKS, AKS, Docker. | Requires [compatible nodes](https://github.com/nestybox/sysbox#host-requirements). [Limitations](https://github.com/nestybox/sysbox/blob/master/docs/user-guide/limitations.md) | | [Sysbox container runtime](#sysbox-container-runtime) | Install the Sysbox runtime on your Kubernetes nodes or Docker host(s) for secure docker-in-docker and systemd-in-docker. Works with GKE, EKS, AKS, Docker. | Requires [compatible nodes](https://github.com/nestybox/sysbox#host-requirements). [Limitations](https://github.com/nestybox/sysbox/blob/master/docs/user-guide/limitations.md) |
| [Envbox](#envbox) | A container image with all the packages necessary to run an inner Sysbox container. Removes the need to setup sysbox-runc on your nodes. Works with GKE, EKS, AKS. | Requires running the outer container as privileged (the inner container that acts as the workspace is locked down). Requires compatible [nodes](https://github.com/nestybox/sysbox/blob/master/docs/distro-compat.md#sysbox-distro-compatibility). | | [Envbox](#envbox) | A container image with all the packages necessary to run an inner Sysbox container. Removes the need to setup sysbox-runc on your nodes. Works with GKE, EKS, AKS. | Requires running the outer container as privileged (the inner container that acts as the workspace is locked down). Requires compatible [nodes](https://github.com/nestybox/sysbox/blob/master/docs/distro-compat.md#sysbox-distro-compatibility). |
| [Rootless Podman](#rootless-podman) | Run Podman inside Coder workspaces. Does not require a custom runtime or privileged containers. Works with GKE, EKS, AKS, RKE, OpenShift | Requires smarter-device-manager for FUSE mounts. [See all](https://github.com/containers/podman/blob/main/rootless.md#shortcomings-of-rootless-podman) | | [Rootless Podman](#rootless-podman) | Run Podman inside Coder workspaces. Does not require a custom runtime or privileged containers. Works with GKE, EKS, AKS, RKE, OpenShift | Requires smarter-device-manager for FUSE mounts. [See all](https://github.com/containers/podman/blob/main/rootless.md#shortcomings-of-rootless-podman) |

View File

@ -52,7 +52,7 @@ coder external-auth access-token <external-auth-id>
Note: Some IDE's override the `GIT_ASKPASS` environment variable and need to be Note: Some IDE's override the `GIT_ASKPASS` environment variable and need to be
configured. configured.
**VSCode** #### VSCode
Use the Use the
[Coder](https://marketplace.visualstudio.com/items?itemName=coder.coder-remote) [Coder](https://marketplace.visualstudio.com/items?itemName=coder.coder-remote)

View File

@ -90,7 +90,7 @@ data "coder_parameter" "security_groups" {
> For the above example, to override the default values of the `security_groups` > For the above example, to override the default values of the `security_groups`
> parameter, you will need to pass the following argument to `coder create`: > parameter, you will need to pass the following argument to `coder create`:
> >
> ``` > ```shell
> --parameter "\"security_groups=[\"\"DevOps Security Group\"\",\"\"Backend Security Group\"\"]\"" > --parameter "\"security_groups=[\"\"DevOps Security Group\"\",\"\"Backend Security Group\"\"]\""
> ``` > ```
> >

View File

@ -254,28 +254,28 @@ The raw logs will look something like this:
```json ```json
{ {
"ts": "2022-02-28T20:29:38.038452202Z", "ts": "2022-02-28T20:29:38.038452202Z",
"level": "INFO", "level": "INFO",
"msg": "exec", "msg": "exec",
"fields": { "fields": {
"labels": { "labels": {
"user_email": "jessie@coder.com", "user_email": "jessie@coder.com",
"user_id": "5e876e9a-121663f01ebd1522060d5270", "user_id": "5e876e9a-121663f01ebd1522060d5270",
"username": "jessie", "username": "jessie",
"workspace_id": "621d2e52-a6987ef6c56210058ee2593c", "workspace_id": "621d2e52-a6987ef6c56210058ee2593c",
"workspace_name": "main" "workspace_name": "main"
}, },
"cmdline": "uname -a", "cmdline": "uname -a",
"event": { "event": {
"filename": "/usr/bin/uname", "filename": "/usr/bin/uname",
"argv": ["uname", "-a"], "argv": ["uname", "-a"],
"truncated": false, "truncated": false,
"pid": 920684, "pid": 920684,
"uid": 101000, "uid": 101000,
"gid": 101000, "gid": 101000,
"comm": "bash" "comm": "bash"
} }
} }
} }
``` ```

View File

@ -53,15 +53,15 @@ variables, you can employ a straightforward solution:
1. Create a `terraform.tfvars` file in in the template directory: 1. Create a `terraform.tfvars` file in in the template directory:
```tf ```tf
coder_image = newimage:tag coder_image = newimage:tag
``` ```
2. Push the new template revision using Coder CLI: 1. Push the new template revision using Coder CLI:
``` ```shell
coder templates push my-template -y # no need to use --var coder templates push my-template -y # no need to use --var
``` ```
This file serves as a mechanism to override the template settings for variables. This file serves as a mechanism to override the template settings for variables.
It can be stored in the repository for easy access and reference. Coder CLI It can be stored in the repository for easy access and reference. Coder CLI

View File

@ -26,7 +26,7 @@ data "coder_workspace_tags" "custom_workspace_tags" {
} }
``` ```
**Legend** ### Legend
- `zone` - static tag value set to `developers` - `zone` - static tag value set to `developers`
- `runtime` - supported by the string-type `coder_parameter` to select - `runtime` - supported by the string-type `coder_parameter` to select
@ -55,7 +55,7 @@ raw values from the database and evaluates them using provided template
variables and parameters. This is illustrated in the table below: variables and parameters. This is illustrated in the table below:
| Value Type | Template Import | Workspace Creation | | Value Type | Template Import | Workspace Creation |
| ---------- | -------------------------------------------------- | ----------------------- | |------------|----------------------------------------------------|-------------------------|
| Static | `{"region": "us"}` | `{"region": "us"}` | | Static | `{"region": "us"}` | `{"region": "us"}` |
| Variable | `{"az": var.az}` | `{"region": "us-east"}` | | Variable | `{"az": var.az}` | `{"region": "us-east"}` |
| Parameter | `{"cluster": data.coder_parameter.cluster.value }` | `{"cluster": "dev"}` | | Parameter | `{"cluster": data.coder_parameter.cluster.value }` | `{"cluster": "dev"}` |
@ -98,7 +98,7 @@ as immutable and set only once, during workspace creation.
You may only specify the following as inputs for `coder_workspace_tags`: You may only specify the following as inputs for `coder_workspace_tags`:
| | Example | | | Example |
| :----------------- | :-------------------------------------------- | |:-------------------|:----------------------------------------------|
| Static values | `"developers"` | | Static values | `"developers"` |
| Template variables | `var.az` | | Template variables | `var.az` |
| Coder parameters | `data.coder_parameter.runtime_selector.value` | | Coder parameters | `data.coder_parameter.runtime_selector.value` |
@ -115,7 +115,7 @@ raw queries on-the-fly without processing the entire Terraform template. This
evaluation is simpler but also limited in terms of available functions, evaluation is simpler but also limited in terms of available functions,
variables, and references to other resources. variables, and references to other resources.
**Supported syntax** #### Supported syntax
- Static string: `foobar_tag = "foobaz"` - Static string: `foobar_tag = "foobaz"`
- Formatted string: `foobar_tag = "foobaz ${data.coder_parameter.foobaz.value}"` - Formatted string: `foobar_tag = "foobaz ${data.coder_parameter.foobaz.value}"`
@ -125,7 +125,7 @@ variables, and references to other resources.
- Condition: - Condition:
`cache = data.coder_parameter.feature_cache_enabled.value == "true" ? "with-cache" : "no-cache"` `cache = data.coder_parameter.feature_cache_enabled.value == "true" ? "with-cache" : "no-cache"`
**Not supported** #### Not supported
- Function calls: `try(var.foo, "default")` - Function calls: `try(var.foo, "default")`
- Resources: `compute_instance.dev.name` - Resources: `compute_instance.dev.name`

View File

@ -121,7 +121,7 @@ their development environments:
## Example templates ## Example templates
| Template | Description | | Template | Description |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |---------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Docker dev containers](https://github.com/coder/coder/tree/main/examples/templates/docker-devcontainer) | Docker provisions a development container. | | [Docker dev containers](https://github.com/coder/coder/tree/main/examples/templates/docker-devcontainer) | Docker provisions a development container. |
| [Kubernetes dev containers](https://github.com/coder/coder/tree/main/examples/templates/kubernetes-devcontainer) | Provisions a development container on the Kubernetes cluster. | | [Kubernetes dev containers](https://github.com/coder/coder/tree/main/examples/templates/kubernetes-devcontainer) | Provisions a development container on the Kubernetes cluster. |
| [Google Compute Engine dev container](https://github.com/coder/coder/tree/main/examples/templates/gcp-devcontainer) | Runs a development container inside a single GCP instance. It also mounts the Docker socket from the VM inside the container to enable Docker inside the workspace. | | [Google Compute Engine dev container](https://github.com/coder/coder/tree/main/examples/templates/gcp-devcontainer) | Runs a development container inside a single GCP instance. It also mounts the Docker socket from the VM inside the container to enable Docker inside the workspace. |
@ -144,7 +144,3 @@ Lifecycle scripts are managed by project developers.
## Next steps ## Next steps
- [Dev container security and caching](./devcontainer-security-caching.md) - [Dev container security and caching](./devcontainer-security-caching.md)
```
```

View File

@ -3,7 +3,7 @@
Ensure Envbuilder can only pull pre-approved images and artifacts by configuring Ensure Envbuilder can only pull pre-approved images and artifacts by configuring
it with your existing HTTP proxies, firewalls, and artifact managers. it with your existing HTTP proxies, firewalls, and artifact managers.
### Configure registry authentication ## Configure registry authentication
You may need to authenticate to your container registry, such as Artifactory, or You may need to authenticate to your container registry, such as Artifactory, or
Git provider such as GitLab, to use Envbuilder. See the Git provider such as GitLab, to use Envbuilder. See the

View File

@ -1,6 +1,6 @@
## GitHub # GitHub
### Step 1: Configure the OAuth application in GitHub ## Step 1: Configure the OAuth application in GitHub
First, First,
[register a GitHub OAuth app](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/). [register a GitHub OAuth app](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/).
@ -22,7 +22,7 @@ values in the next step.
Coder will need permission to access user email addresses. Find the "Account Coder will need permission to access user email addresses. Find the "Account
Permissions" settings for your app and select "read-only" for "Email addresses". Permissions" settings for your app and select "read-only" for "Email addresses".
### Step 2: Configure Coder with the OAuth credentials ## Step 2: Configure Coder with the OAuth credentials
Navigate to your Coder host and run the following command to start up the Coder Navigate to your Coder host and run the following command to start up the Coder
server: server:

View File

@ -17,16 +17,16 @@ which templates developers can use. For example:
Roles determine which actions users can take within the platform. Roles determine which actions users can take within the platform.
| | Auditor | User Admin | Template Admin | Owner | | | Auditor | User Admin | Template Admin | Owner |
| --------------------------------------------------------------- | ------- | ---------- | -------------- | ----- | |-----------------------------------------------------------------|---------|------------|----------------|-------|
| Add and remove Users | | ✅ | | ✅ | | Add and remove Users | | ✅ | | ✅ |
| Manage groups (enterprise) (premium) | | ✅ | | ✅ | | Manage groups (enterprise) (premium) | | ✅ | | ✅ |
| Change User roles | | | | ✅ | | Change User roles | | | | ✅ |
| Manage **ALL** Templates | | | ✅ | ✅ | | Manage **ALL** Templates | | | ✅ | ✅ |
| View **ALL** Workspaces | | | ✅ | ✅ | | View **ALL** Workspaces | | | ✅ | ✅ |
| Update and delete **ALL** Workspaces | | | | ✅ | | Update and delete **ALL** Workspaces | | | | ✅ |
| Run [external provisioners](../provisioners.md) | | | ✅ | ✅ | | Run [external provisioners](../provisioners.md) | | | ✅ | ✅ |
| Execute and use **ALL** Workspaces | | | | ✅ | | Execute and use **ALL** Workspaces | | | | ✅ |
| View all user operation [Audit Logs](../security/audit-logs.md) | ✅ | | | ✅ | | View all user operation [Audit Logs](../security/audit-logs.md) | ✅ | | | ✅ |
A user may have one or more roles. All users have an implicit Member role that A user may have one or more roles. All users have an implicit Member role that
may use personal workspaces. may use personal workspaces.

View File

@ -1,3 +1,4 @@
<!-- markdownlint-disable MD024 -->
# IDP Sync # IDP Sync
<blockquote class="info"> <blockquote class="info">
@ -7,6 +8,8 @@ IDP sync is an Enterprise and Premium feature.
</blockquote> </blockquote>
## Group Sync
If your OpenID Connect provider supports group claims, you can configure Coder If your OpenID Connect provider supports group claims, you can configure Coder
to synchronize groups in your auth provider to groups within Coder. To enable to synchronize groups in your auth provider to groups within Coder. To enable
group sync, ensure that the `groups` claim is being sent by your OpenID group sync, ensure that the `groups` claim is being sent by your OpenID
@ -141,10 +144,10 @@ will be able to configure this in the UI. For now, you must use CLI commands.
```json ```json
{ {
"field": "", "field": "",
"mapping": null, "mapping": null,
"regex_filter": null, "regex_filter": null,
"auto_create_missing_groups": false "auto_create_missing_groups": false
} }
``` ```
@ -153,10 +156,10 @@ Below is an example that uses the `groups` claim and maps all groups prefixed by
```json ```json
{ {
"field": "groups", "field": "groups",
"mapping": null, "mapping": null,
"regex_filter": "^coder-.*$", "regex_filter": "^coder-.*$",
"auto_create_missing_groups": true "auto_create_missing_groups": true
} }
``` ```
@ -174,16 +177,16 @@ group:
```json ```json
{ {
"field": "groups", "field": "groups",
"mapping": { "mapping": {
"coder-admins": [ "coder-admins": [
"2ba2a4ff-ddfb-4493-b7cd-1aec2fa4c830", "2ba2a4ff-ddfb-4493-b7cd-1aec2fa4c830",
"93371154-150f-4b12-b5f0-261bb1326bb4" "93371154-150f-4b12-b5f0-261bb1326bb4"
], ],
"coder-users": ["2f4bde93-0179-4815-ba50-b757fb3d43dd"] "coder-users": ["2f4bde93-0179-4815-ba50-b757fb3d43dd"]
}, },
"regex_filter": null, "regex_filter": null,
"auto_create_missing_groups": false "auto_create_missing_groups": false
} }
``` ```
@ -209,7 +212,7 @@ Users who are not in a matching group will see the following error:
<Image height="412px" src="../../images/admin/group-allowlist.png" alt="Unauthorized group error" align="center" /> <Image height="412px" src="../../images/admin/group-allowlist.png" alt="Unauthorized group error" align="center" />
## Role sync ## Role Sync
<blockquote class="info"> <blockquote class="info">
@ -307,8 +310,8 @@ will be able to configure this in the UI. For now, you must use CLI commands.
```json ```json
{ {
"field": "", "field": "",
"mapping": null "mapping": null
} }
``` ```
@ -318,11 +321,11 @@ role:
```json ```json
{ {
"field": "roles", "field": "roles",
"mapping": { "mapping": {
"coder-admins": ["organization-admin"], "coder-admins": ["organization-admin"],
"infra-admins": ["provisioner-admin"] "infra-admins": ["provisioner-admin"]
} }
} }
``` ```
@ -372,7 +375,7 @@ dashboard:
<div class="tabs"> <div class="tabs">
### Dashboard ## Dashboard
1. Confirm that your OIDC provider is sending claims. Log in with OIDC and visit 1. Confirm that your OIDC provider is sending claims. Log in with OIDC and visit
the following URL with an `Owner` account: the following URL with an `Owner` account:
@ -412,7 +415,7 @@ dashboard:
![IdP organization sync](../../images/admin/users/organizations/idp-org-sync.png) ![IdP organization sync](../../images/admin/users/organizations/idp-org-sync.png)
### CLI ## CLI
Use the Coder CLI to show and adjust the settings. Use the Coder CLI to show and adjust the settings.
@ -455,7 +458,7 @@ settings, a user's memberships will update when they log out and log back in.
Analyzing the JSON payload: Analyzing the JSON payload:
| Field | Explanation | | Field | Explanation |
| :-------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |:----------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| field | If this field is the empty string `""`, then org-sync is disabled. </br> Org memberships must be manually configured through the UI or API. | | field | If this field is the empty string `""`, then org-sync is disabled. </br> Org memberships must be manually configured through the UI or API. |
| mapping | Mapping takes a claim from the IdP, and associates it with 1 or more organizations by UUID. </br> No validation is done, so you can put UUID's of orgs that do not exist (a noop). The UI picker will allow selecting orgs from a drop down, and convert it to a UUID for you. | | mapping | Mapping takes a claim from the IdP, and associates it with 1 or more organizations by UUID. </br> No validation is done, so you can put UUID's of orgs that do not exist (a noop). The UI picker will allow selecting orgs from a drop down, and convert it to a UUID for you. |
| organization_assign_default | This setting exists for maintaining backwards compatibility with single org deployments, either through their upgrade, or in perpetuity. </br> If this is set to 'true', all users will always be assigned to the default organization regardless of the mappings and their IdP claims. | | organization_assign_default | This setting exists for maintaining backwards compatibility with single org deployments, either through their upgrade, or in perpetuity. </br> If this is set to 'true', all users will always be assigned to the default organization regardless of the mappings and their IdP claims. |

View File

@ -76,7 +76,7 @@ the sum of their allowances.
For example: For example:
| Group Name | Quota Allowance | | Group Name | Quota Allowance |
| ---------- | --------------- | |------------|-----------------|
| Frontend | 10 | | Frontend | 10 |
| Backend | 20 | | Backend | 20 |
| Data | 30 | | Data | 30 |
@ -84,7 +84,7 @@ For example:
<br/> <br/>
| Username | Groups | Effective Budget | | Username | Groups | Effective Budget |
| -------- | ----------------- | ---------------- | |----------|-------------------|------------------|
| jill | Frontend, Backend | 30 | | jill | Frontend, Backend | 30 |
| jack | Backend, Data | 50 | | jack | Backend, Data | 50 |
| sam | Data | 30 | | sam | Data | 30 |

View File

@ -1,6 +1,6 @@
# Changelogs # Changelogs
These are the changelogs used by [generate_release_notes.sh]https://github.com/coder/coder/blob/main/scripts/release/generate_release_notes.sh) for a release. These are the changelogs used by [generate_release_notes.sh](https://github.com/coder/coder/blob/main/scripts/release/generate_release_notes.sh) for a release.
These changelogs are currently not kept in sync with GitHub releases. Use [GitHub releases](https://github.com/coder/coder/releases) for the latest information! These changelogs are currently not kept in sync with GitHub releases. Use [GitHub releases](https://github.com/coder/coder/releases) for the latest information!

View File

@ -23,9 +23,11 @@
[--block-direct-connections](https://coder.com/docs/cli/server#--block-direct-connections) [--block-direct-connections](https://coder.com/docs/cli/server#--block-direct-connections)
(#7936) (#7936)
- Search for workspaces based on last activity (#2658) - Search for workspaces based on last activity (#2658)
```text ```text
last_seen_before:"2023-01-14T23:59:59Z" last_seen_after:"2023-01-08T00:00:00Z" last_seen_before:"2023-01-14T23:59:59Z" last_seen_after:"2023-01-08T00:00:00Z"
``` ```
- Queue position of pending workspace builds are shown in the dashboard (#8244) - Queue position of pending workspace builds are shown in the dashboard (#8244)
<img width="1449" alt="Queue position" src="https://github.com/coder/coder/assets/22407953/44515a19-ddfb-4431-8c2a-203487c4efe8"> <img width="1449" alt="Queue position" src="https://github.com/coder/coder/assets/22407953/44515a19-ddfb-4431-8c2a-203487c4efe8">
- Enable Terraform debug mode via deployment configuration (#8260) - Enable Terraform debug mode via deployment configuration (#8260)

View File

@ -50,81 +50,12 @@ Agent logs can be pushed after a workspace has started (#8528)
### Documentation ### Documentation
## Changelog
### Breaking changes
Agent logs can be pushed after a workspace has started (#8528)
> ⚠️ **Warning:** You will need to
> [update](https://coder.com/docs/install) your local Coder CLI v0.27
> to connect via `coder ssh`.
### Features
- [Empeheral parameters](https://registry.terraform.io/providers/coder/coder/latest/docs/data-sources/parameter#ephemeral)
allow users to specify a value for a single build (#8415) (#8524)
![Ephemeral parameters](https://github.com/coder/coder/assets/22407953/89df0888-9abc-453a-ac54-f5d0e221b0b9)
> Upgrade to Coder Terraform Provider v0.11.1 to use ephemeral parameters in
> your templates
- Create template, if it doesn't exist with `templates push --create` (#8454)
- Workspaces now appear `unhealthy` in the dashboard and CLI if one or more
agents do not exist (#8541) (#8548)
![Workspace health](https://github.com/coder/coder/assets/22407953/edbb1d70-61b5-4b45-bfe8-51abdab417cc)
- Reverse port-forward with `coder ssh -R` (#8515)
- Helm: custom command arguments in Helm chart (#8567)
- Template version messages (#8435)
<img width="428" alt="252772262-087f1338-f1e2-49fb-81f2-358070a46484" src="https://github.com/coder/coder/assets/22407953/5f6e5e47-e61b-41f1-92fe-f624e92f8bd3">
- TTL and max TTL validation increased to 30 days (#8258)
- [Self-hosted docs](https://coder.com/docs/install/offline#offline-docs):
Host your own copy of Coder's documentation in your own environment (#8527)
(#8601)
- Add custom coder bin path for `config-ssh` (#8425)
- Admins can create workspaces for other users via the CLI (#8481)
- `coder_app` supports localhost apps running https (#8585)
- Base container image contains [jq](https://github.com/coder/coder/pull/8563)
for parsing mounted JSON secrets
### Bug fixes
- Check agent metadata every second instead of minute (#8614)
- `coder stat` fixes
- Read from alternate cgroup path (#8591)
- Improve detection of container environment (#8643)
- Unskip TestStatCPUCmd/JSON and explicitly set --host in test cmd invocation
(#8558)
- Avoid initial license reconfig if feature isn't enabled (#8586)
- Audit log records delete workspace action properly (#8494)
- Audit logs are properly paginated (#8513)
- Fix bottom border on build logs (#8554)
- Don't mark metadata with `interval: 0` as stale (#8627)
- Add some missing workspace updates (#7790)
### Documentation
- Custom API use cases (custom agent logs, CI/CD pipelines) (#8445) - Custom API use cases (custom agent logs, CI/CD pipelines) (#8445)
- Docs on using remote Docker hosts (#8479) - Docs on using remote Docker hosts (#8479)
- Added kubernetes option to workspace proxies (#8533) - Added kubernetes option to workspace proxies (#8533)
Compare: Compare:
[`v0.26.1...v0.26.2`](https://github.com/coder/coder/compare/v0.26.1...v0.27.0) [`v0.26.2...v0.27.0`](https://github.com/coder/coder/compare/v0.26.2...v0.27.0)
## Container image
- `docker pull ghcr.io/coder/coder:v0.26.2`
## Install/upgrade
Refer to our docs to [install](https://coder.com/docs/install) or
[upgrade](https://coder.com/docs/admin/upgrade) Coder, or use a
release asset below.
- Custom API use cases (custom agent logs, CI/CD pipelines) (#8445)
- Docs on using remote Docker hosts (#8479)
- Added kubernetes option to workspace proxies (#8533)
Compare:
[`v0.26.1...v0.26.2`](https://github.com/coder/coder/compare/v0.26.1...v0.27.0)
## Container image ## Container image

View File

@ -18,7 +18,7 @@ While Coder v1 is being sunset, we still wanted to avoid versioning conflicts.
What is not changing: What is not changing:
- Our feature roadmap: See what we have planned at https://coder.com/roadmap - Our feature roadmap: See what we have planned at <https://coder.com/roadmap>
- Your upgrade path: You can safely upgrade from previous coder/coder releases - Your upgrade path: You can safely upgrade from previous coder/coder releases
to v2.x releases! to v2.x releases!
- Our release cadence: We want features out as quickly as possible and feature - Our release cadence: We want features out as quickly as possible and feature
@ -33,7 +33,7 @@ What is changing:
dashboard ] dashboard ]
Questions? Feel free to ask in [our Discord](https://discord.gg/coder) or email Questions? Feel free to ask in [our Discord](https://discord.gg/coder) or email
ben@coder.com! <ben@coder.com>!
## Changelog ## Changelog

View File

@ -7,7 +7,7 @@
![Last used](https://user-images.githubusercontent.com/22407953/262407146-06cded4e-684e-4cff-86b7-4388270e7d03.png) ![Last used](https://user-images.githubusercontent.com/22407953/262407146-06cded4e-684e-4cff-86b7-4388270e7d03.png)
> You can use `last_used_before` and `last_used_after` in the workspaces > You can use `last_used_before` and `last_used_after` in the workspaces
> search with [RFC3339Nano](https://www.rfc-editor.org/rfc/rfc3339) datetime > search with [RFC3339Nano](https://www.rfc-editor.org/rfc/rfc3339) datetime
- Add `daily_cost`` to `coder ls` to show - Add `daily_cost` to `coder ls` to show
[quota](https://coder.com/docs/admin/quotas) consumption (#9200) [quota](https://coder.com/docs/admin/quotas) consumption (#9200)
(@ammario) (@ammario)
- Added `coder_app` usage to template insights (#9138) (@mafredri) - Added `coder_app` usage to template insights (#9138) (@mafredri)

View File

@ -17,11 +17,13 @@
[display apps](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#nested-schema-for-display_apps) [display apps](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#nested-schema-for-display_apps)
in your template, such as VS Code (Insiders), web terminal, SSH, etc. (#9100) in your template, such as VS Code (Insiders), web terminal, SSH, etc. (#9100)
(@sreya) To add VS Code insiders into your template, you can set: (@sreya) To add VS Code insiders into your template, you can set:
```tf ```tf
display_apps { display_apps {
vscode_insiders = true vscode_insiders = true
} }
``` ```
![Add insiders](https://user-images.githubusercontent.com/4856196/263852602-94a5cb56-b7c3-48cb-928a-3b5e0f4e964b.png) ![Add insiders](https://user-images.githubusercontent.com/4856196/263852602-94a5cb56-b7c3-48cb-928a-3b5e0f4e964b.png)
- Create a workspace from any template version (#9471) (@aslilac) - Create a workspace from any template version (#9471) (@aslilac)
- Add DataDog Go tracer (#9411) (@ammario) - Add DataDog Go tracer (#9411) (@ammario)

View File

@ -92,7 +92,7 @@
### Documentation ### Documentation
- Align CODER_HTTP_ADDRESS with document (#10779) (@JounQin) - Align CODER_HTTP_ADDRESS with document (#10779) (@JounQin)
- Migrate all deprecated `CODER_ADDRESS `to `CODER_HTTP_ADDRESS` (#10780) (@JounQin) - Migrate all deprecated `CODER_ADDRESS` to `CODER_HTTP_ADDRESS` (#10780) (@JounQin)
- Add documentation for template update policies (experimental) (#10804) (@sreya) - Add documentation for template update policies (experimental) (#10804) (@sreya)
- Fix typo in additional-clusters.md (#10868) (@bpmct) - Fix typo in additional-clusters.md (#10868) (@bpmct)
- Update FE guide (#10942) (@BrunoQuaresma) - Update FE guide (#10942) (@BrunoQuaresma)

View File

@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement ## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at opensource@coder.com. All complaints reported by contacting the project team at <opensource@coder.com>. All complaints
will be reviewed and investigated and will result in a response that is deemed will be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. The project team is obligated to necessary and appropriate to the circumstances. The project team is obligated to
maintain confidentiality with regard to the reporter of an incident. Further maintain confidentiality with regard to the reporter of an incident. Further
@ -69,9 +69,9 @@ members of the project's leadership.
This Code of Conduct is adapted from the [Contributor Covenant][homepage], This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at version 1.4, available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
[homepage]: https://www.contributor-covenant.org [homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq <https://www.contributor-covenant.org/faq>

View File

@ -1,4 +1,4 @@
# Security Policy # Security Policy
If you find a vulnerability, **DO NOT FILE AN ISSUE**. Instead, send an email to If you find a vulnerability, **DO NOT FILE AN ISSUE**. Instead, send an email to
security@coder.com. <security@coder.com>.

View File

@ -25,7 +25,7 @@ If you have questions that aren't explicitly covered by this guide, consult the
following third-party references: following third-party references:
| **Type of guidance** | **Third-party reference** | | **Type of guidance** | **Third-party reference** |
| -------------------- | -------------------------------------------------------------------------------------- | |----------------------|----------------------------------------------------------------------------------------|
| Spelling | [Merriam-Webster.com](https://www.merriam-webster.com/) | | Spelling | [Merriam-Webster.com](https://www.merriam-webster.com/) |
| Style - nontechnical | [The Chicago Manual of Style](https://www.chicagomanualofstyle.org/home.html) | | Style - nontechnical | [The Chicago Manual of Style](https://www.chicagomanualofstyle.org/home.html) |
| Style - technical | [Microsoft Writing Style Guide](https://docs.microsoft.com/en-us/style-guide/welcome/) | | Style - technical | [Microsoft Writing Style Guide](https://docs.microsoft.com/en-us/style-guide/welcome/) |

View File

@ -46,7 +46,7 @@ coder server --experiments=feature1,feature2
<!-- BEGIN: available-experimental-features --> <!-- BEGIN: available-experimental-features -->
| Feature | Description | Available in | | Feature | Description | Available in |
| --------------- | ------------------------------------------------------------------- | ------------ | |-----------------|---------------------------------------------------------------------|--------------|
| `notifications` | Sends notifications via SMTP and webhooks following certain events. | stable | | `notifications` | Sends notifications via SMTP and webhooks following certain events. | stable |
<!-- END: available-experimental-features --> <!-- END: available-experimental-features -->

View File

@ -129,17 +129,17 @@ within the component's story.
```tsx ```tsx
export const WithQuota: Story = { export const WithQuota: Story = {
parameters: { parameters: {
queries: [ queries: [
{ {
key: getWorkspaceQuotaQueryKey(MockUser.username), key: getWorkspaceQuotaQueryKey(MockUser.username),
data: { data: {
credits_consumed: 2, credits_consumed: 2,
budget: 40, budget: 40,
}, },
}, },
], ],
}, },
}; };
``` ```
@ -156,12 +156,12 @@ execution. Here's an illustrative example:"
```ts ```ts
export const getAgentListeningPorts = async ( export const getAgentListeningPorts = async (
agentID: string, agentID: string,
): Promise<TypesGen.ListeningPortsResponse> => { ): Promise<TypesGen.ListeningPortsResponse> => {
const response = await axiosInstance.get( const response = await axiosInstance.get(
`/api/v2/workspaceagents/${agentID}/listening-ports`, `/api/v2/workspaceagents/${agentID}/listening-ports`,
); );
return response.data; return response.data;
}; };
``` ```
@ -170,10 +170,10 @@ as a single function.
```ts ```ts
export const updateWorkspaceVersion = async ( export const updateWorkspaceVersion = async (
workspace: TypesGen.Workspace, workspace: TypesGen.Workspace,
): Promise<TypesGen.WorkspaceBuild> => { ): Promise<TypesGen.WorkspaceBuild> => {
const template = await getTemplate(workspace.template_id); const template = await getTemplate(workspace.template_id);
return startWorkspace(workspace.id, template.active_version_id); return startWorkspace(workspace.id, template.active_version_id);
}; };
``` ```
@ -224,10 +224,10 @@ inside the component itself using MUI's `visuallyHidden` utility function.
import { visuallyHidden } from "@mui/utils"; import { visuallyHidden } from "@mui/utils";
<Button> <Button>
<GearIcon /> <GearIcon />
<Box component="span" sx={visuallyHidden}> <Box component="span" sx={visuallyHidden}>
Settings Settings
</Box> </Box>
</Button>; </Button>;
``` ```
@ -332,8 +332,8 @@ One thing we figured out that was slowing down our tests was the use of `ByRole`
queries because of how it calculates the role attribute for every element on the queries because of how it calculates the role attribute for every element on the
`screen`. You can read more about it on the links below: `screen`. You can read more about it on the links below:
- https://stackoverflow.com/questions/69711888/react-testing-library-getbyrole-is-performing-extremely-slowly - <https://stackoverflow.com/questions/69711888/react-testing-library-getbyrole-is-performing-extremely-slowly>
- https://github.com/testing-library/dom-testing-library/issues/552#issuecomment-625172052 - <https://github.com/testing-library/dom-testing-library/issues/552#issuecomment-625172052>
Even with `ByRole` having performance issues we still want to use it but for Even with `ByRole` having performance issues we still want to use it but for
that, we have to scope the "querying" area by using the `within` command. So that, we have to scope the "querying" area by using the `within` command. So

View File

@ -12,7 +12,7 @@ This guide assumes you have full administrator privileges on Azure.
From the Azure Portal, navigate to the Virtual Machines Dashboard. Click Create, From the Azure Portal, navigate to the Virtual Machines Dashboard. Click Create,
and select creating a new Azure Virtual machine . and select creating a new Azure Virtual machine .
<img src="../../images/platforms/azure/azure1.jpg"> <img src="../../images/platforms/azure/azure1.jpg" alt="Azure VM creation page">
This will bring you to the `Create a virtual machine` page. Select the This will bring you to the `Create a virtual machine` page. Select the
subscription group of your choice, or create one if necessary. subscription group of your choice, or create one if necessary.
@ -22,14 +22,14 @@ of your choice. Change the region to something more appropriate for your current
location. For this tutorial, we will use the base selection of the Ubuntu Gen2 location. For this tutorial, we will use the base selection of the Ubuntu Gen2
Image and keep the rest of the base settings for this image the same. Image and keep the rest of the base settings for this image the same.
<img src="../../images/platforms/azure/azure2.png"> <img src="../../images/platforms/azure/azure2.png" alt="Azure VM instance details">
<img src="../../images/platforms/azure/azure3.png"> <img src="../../images/platforms/azure/azure3.png" alt="Azure VM size selection">
Up next, under `Inbound port rules` modify the Select `inbound ports` to also Up next, under `Inbound port rules` modify the Select `inbound ports` to also
take in `HTTPS` and `HTTP`. take in `HTTPS` and `HTTP`.
<img src="../../images/platforms/azure/azure4.png"> <img src="../../images/platforms/azure/azure4.png" alt="Azure VM inbound port rules">
The set up for the image is complete at this stage. Click `Review and Create` - The set up for the image is complete at this stage. Click `Review and Create` -
review the information and click `Create`. A popup will appear asking you to review the information and click `Create`. A popup will appear asking you to
@ -37,11 +37,11 @@ download the key pair for the server. Click
`Download private key and create resource` and place it into a folder of your `Download private key and create resource` and place it into a folder of your
choice on your local system. choice on your local system.
<img src="../../images/platforms/azure/azure5.png"> <img src="../../images/platforms/azure/azure5.png" alt="Azure VM key pair generation">
Click `Return to create a virtual machine`. Your VM will start up! Click `Return to create a virtual machine`. Your VM will start up!
<img src="../../images/platforms/azure/azure6.png"> <img src="../../images/platforms/azure/azure6.png" alt="Azure VM deployment complete">
Click `Go to resource` in the virtual machine and copy the public IP address. Click `Go to resource` in the virtual machine and copy the public IP address.
You will need it to SSH into the virtual machine via your local machine. You will need it to SSH into the virtual machine via your local machine.
@ -100,12 +100,12 @@ First, run `coder template init` to create your first template. Youll be give
a list of possible templates to use. This tutorial will show you how to set up a list of possible templates to use. This tutorial will show you how to set up
your Coder instance to create a Linux based machine on Azure. your Coder instance to create a Linux based machine on Azure.
<img src="../../images/platforms/azure/azure9.png"> <img src="../../images/platforms/azure/azure9.png" alt="Coder CLI template init">
Press `enter` to select `Develop in Linux on Azure` template. This will return Press `enter` to select `Develop in Linux on Azure` template. This will return
the following: the following:
<img src="../../images/platforms/azure/azure10.png"> <img src="../../images/platforms/azure/azure10.png" alt="Coder CLI template init">
To get started using the Azure template, install the Azure CLI by following the To get started using the Azure template, install the Azure CLI by following the
instructions instructions

View File

@ -7,7 +7,7 @@ environments. However, some changes to your configuration are necessary.
> offline with Kubernetes or Docker. > offline with Kubernetes or Docker.
| | Public deployments | Offline deployments | | | Public deployments | Offline deployments |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Terraform binary | By default, Coder downloads Terraform binary from [releases.hashicorp.com](https://releases.hashicorp.com) | Terraform binary must be included in `PATH` for the VM or container image. [Supported versions](https://github.com/coder/coder/blob/main/provisioner/terraform/install.go#L23-L24) | | Terraform binary | By default, Coder downloads Terraform binary from [releases.hashicorp.com](https://releases.hashicorp.com) | Terraform binary must be included in `PATH` for the VM or container image. [Supported versions](https://github.com/coder/coder/blob/main/provisioner/terraform/install.go#L23-L24) |
| Terraform registry | Coder templates will attempt to download providers from [registry.terraform.io](https://registry.terraform.io) or [custom source addresses](https://developer.hashicorp.com/terraform/language/providers/requirements#source-addresses) specified in each template | [Custom source addresses](https://developer.hashicorp.com/terraform/language/providers/requirements#source-addresses) can be specified in each Coder template, or a custom registry/mirror can be used. More details below | | Terraform registry | Coder templates will attempt to download providers from [registry.terraform.io](https://registry.terraform.io) or [custom source addresses](https://developer.hashicorp.com/terraform/language/providers/requirements#source-addresses) specified in each template | [Custom source addresses](https://developer.hashicorp.com/terraform/language/providers/requirements#source-addresses) can be specified in each Coder template, or a custom registry/mirror can be used. More details below |
| STUN | By default, Coder uses Google's public STUN server for direct workspace connections | STUN can be safely [disabled](../reference/cli/server.md#--derp-server-stun-addresses) users can still connect via [relayed connections](../admin/networking/index.md#-geo-distribution). Alternatively, you can set a [custom DERP server](../reference/cli/server.md#--derp-server-stun-addresses) | | STUN | By default, Coder uses Google's public STUN server for direct workspace connections | STUN can be safely [disabled](../reference/cli/server.md#--derp-server-stun-addresses) users can still connect via [relayed connections](../admin/networking/index.md#-geo-distribution). Alternatively, you can set a [custom DERP server](../reference/cli/server.md#--derp-server-stun-addresses) |

View File

@ -1,3 +1,5 @@
# OpenShift
## Requirements ## Requirements
- OpenShift cluster running K8s 1.19+ (OpenShift 4.7+) - OpenShift cluster running K8s 1.19+ (OpenShift 4.7+)
@ -46,13 +48,13 @@ coder:
- For `runAsUser` / `runAsGroup`, you can retrieve the correct values for - For `runAsUser` / `runAsGroup`, you can retrieve the correct values for
project UID and project GID with the following command: project UID and project GID with the following command:
```console ```console
oc get project coder -o json | jq -r '.metadata.annotations' oc get project coder -o json | jq -r '.metadata.annotations'
{ {
"openshift.io/sa.scc.supplemental-groups": "1000680000/10000", "openshift.io/sa.scc.supplemental-groups": "1000680000/10000",
"openshift.io/sa.scc.uid-range": "1000680000/10000" "openshift.io/sa.scc.uid-range": "1000680000/10000"
} }
``` ```
Alternatively, you can set these values to `null` to allow OpenShift to Alternatively, you can set these values to `null` to allow OpenShift to
automatically select the correct value for the project. automatically select the correct value for the project.

View File

@ -4,7 +4,7 @@ Coder has a number of alternate unofficial install methods. Contributions are
welcome! welcome!
| Platform Name | Status | Documentation | | Platform Name | Status | Documentation |
| --------------------------------------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------- | |-----------------------------------------------------------------------------------|------------|----------------------------------------------------------------------------------------------|
| AWS EC2 | Official | [Guide: AWS](../cloud/ec2.md) | | AWS EC2 | Official | [Guide: AWS](../cloud/ec2.md) |
| Google Compute Engine | Official | [Guide: Google Compute Engine](../cloud/compute-engine.md) | | Google Compute Engine | Official | [Guide: Google Compute Engine](../cloud/compute-engine.md) |
| Azure AKS | Unofficial | [GitHub: coder-aks](https://github.com/ericpaulsen/coder-aks) | | Azure AKS | Unofficial | [GitHub: coder-aks](https://github.com/ericpaulsen/coder-aks) |

View File

@ -7,6 +7,8 @@ We recommend enterprise customers test the compatibility of new releases with
their infrastructure on a staging environment before upgrading a production their infrastructure on a staging environment before upgrading a production
deployment. deployment.
## Release channels
We support two release channels: We support two release channels:
[mainline](https://github.com/coder/coder/releases/tag/v2.16.0) for the bleeding [mainline](https://github.com/coder/coder/releases/tag/v2.16.0) for the bleeding
edge version of Coder and edge version of Coder and
@ -53,7 +55,7 @@ pages.
## Release schedule ## Release schedule
| Release name | Release Date | Status | | Release name | Release Date | Status |
| ------------ | ------------------ | ---------------- | |--------------|--------------------|------------------|
| 2.12.x | June 04, 2024 | Not Supported | | 2.12.x | June 04, 2024 | Not Supported |
| 2.13.x | July 02, 2024 | Not Supported | | 2.13.x | July 02, 2024 | Not Supported |
| 2.14.x | August 06, 2024 | Not Supported | | 2.14.x | August 06, 2024 | Not Supported |

View File

@ -1,15 +1,10 @@
<!-- markdownlint-disable MD024 -->
# Uninstall # Uninstall
This article walks you through how to uninstall your Coder server. This article walks you through how to uninstall your Coder server.
To uninstall your Coder server, delete the following directories. To uninstall your Coder server, delete the following directories.
## Cached Coder releases
```shell
rm -rf ~/.cache/coder
```
## The Coder server binary and CLI ## The Coder server binary and CLI
<div class="tabs"> <div class="tabs">
@ -71,7 +66,7 @@ winget uninstall Coder.Coder
sudo rm /etc/coder.d/coder.env sudo rm /etc/coder.d/coder.env
``` ```
## Coder settings and the optional built-in PostgreSQL database ## Coder settings, cache, and the optional built-in PostgreSQL database
> There is a `postgres` directory within the `coderv2` directory that has the > There is a `postgres` directory within the `coderv2` directory that has the
> database engine and database. If you want to reuse the database, consider not > database engine and database. If you want to reuse the database, consider not
@ -89,6 +84,7 @@ rm -rf ~/Library/Application\ Support/coderv2
```shell ```shell
rm -rf ~/.config/coderv2 rm -rf ~/.config/coderv2
rm -rf ~/.cache/coder
``` ```
## Windows ## Windows

View File

@ -15,7 +15,7 @@ Get the first 10MiB of data from `$CODER_AGENT_LOG_DIR/coder-agent.log`.
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ | |--------|---------------------------------------------------------|-------------|--------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | |
## Get debug info for magicsock ## Get debug info for magicsock
@ -48,13 +48,13 @@ for more information.
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------- | ---- | ------- | -------- | ------------------- | |---------|------|---------|----------|---------------------|
| `state` | path | boolean | true | Debug logging state | | `state` | path | boolean | true | Debug logging state |
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ | |--------|---------------------------------------------------------|-------------|--------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | |
## Get debug manifest ## Get debug manifest
@ -72,5 +72,5 @@ Get the manifest the agent fetched from `coderd` upon startup.
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.Manifest](./schemas.md#agentsdkmanifest) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.Manifest](./schemas.md#agentsdkmanifest) |

View File

@ -1,4 +1,4 @@
## Sections # Sections
<children> <children>
This page is rendered on https://coder.com/docs/reference/agent-api. Refer to the other documents in the `agent-api/` directory. This page is rendered on https://coder.com/docs/reference/agent-api. Refer to the other documents in the `agent-api/` directory.

View File

@ -4,86 +4,86 @@
```json ```json
{ {
"agent_id": "151321db-0713-473c-ab42-2cc6ddeab1a4", "agent_id": "151321db-0713-473c-ab42-2cc6ddeab1a4",
"agent_name": "string", "agent_name": "string",
"owner_name": "string", "owner_name": "string",
"workspace_id": "8ef13a0d-a5c9-4fb4-abf2-f8f65c3830fb", "workspace_id": "8ef13a0d-a5c9-4fb4-abf2-f8f65c3830fb",
"workspace_name": "string", "workspace_name": "string",
"git_auth_configs": 1, "git_auth_configs": 1,
"vscode_port_proxy_uri": "string", "vscode_port_proxy_uri": "string",
"apps": [ "apps": [
{ {
"id": "c488c933-688a-444e-a55d-f1e88ecc78f5", "id": "c488c933-688a-444e-a55d-f1e88ecc78f5",
"url": "string", "url": "string",
"external": false, "external": false,
"slug": "string", "slug": "string",
"display_name": "string", "display_name": "string",
"icon": "string", "icon": "string",
"subdomain": false, "subdomain": false,
"sharing_level": "owner", "sharing_level": "owner",
"healthcheck": { "healthcheck": {
"url": "string", "url": "string",
"interval": 5, "interval": 5,
"threshold": 6 "threshold": 6
}, },
"health": "initializing" "health": "initializing"
} }
], ],
"derpmap": { "derpmap": {
"HomeParams": {}, "HomeParams": {},
"Regions": { "Regions": {
"1000": { "1000": {
"EmbeddedRelay": false, "EmbeddedRelay": false,
"RegionID": 1000, "RegionID": 1000,
"RegionCode": "string", "RegionCode": "string",
"RegionName": "string", "RegionName": "string",
"Nodes": [ "Nodes": [
{ {
"Name": "string", "Name": "string",
"RegionID": 1000, "RegionID": 1000,
"HostName": "string", "HostName": "string",
"STUNPort": 19302, "STUNPort": 19302,
"STUNOnly": true "STUNOnly": true
} }
] ]
} }
} }
}, },
"derp_force_websockets": false, "derp_force_websockets": false,
"environment_variables": { "environment_variables": {
"OIDC_TOKEN": "string" "OIDC_TOKEN": "string"
}, },
"directory": "string", "directory": "string",
"motd_file": "string", "motd_file": "string",
"disable_direct_connections": false, "disable_direct_connections": false,
"metadata": [ "metadata": [
{ {
"display_name": "string", "display_name": "string",
"key": "string", "key": "string",
"script": "string", "script": "string",
"interval": 10, "interval": 10,
"timeout": 1 "timeout": 1
} }
], ],
"scripts": [ "scripts": [
{ {
"log_source_id": "3e79c8da-08ae-48f4-b73e-11e194cdea06", "log_source_id": "3e79c8da-08ae-48f4-b73e-11e194cdea06",
"log_path": "string", "log_path": "string",
"script": "string", "script": "string",
"cron": "string", "cron": "string",
"run_on_start": true, "run_on_start": true,
"run_on_stop": false, "run_on_stop": false,
"start_blocks_login": true, "start_blocks_login": true,
"timeout": 0 "timeout": 0
} }
] ]
} }
``` ```
### Properties ### Properties
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| ---------------------------- | ------------------------------------------------------------------------------------------------- | -------- | ------------ | ----------- | |------------------------------|---------------------------------------------------------------------------------------------------|----------|--------------|-------------|
| `agent_id` | string | true | | | | `agent_id` | string | true | | |
| `agent_name` | string | true | | | | `agent_name` | string | true | | |
| `owner_name` | string | true | | | | `owner_name` | string | true | | |
@ -105,18 +105,18 @@
```json ```json
{ {
"display_name": "string", "display_name": "string",
"key": "string", "key": "string",
"script": "string", "script": "string",
"interval": 10, "interval": 10,
"timeout": 1 "timeout": 1
} }
``` ```
### Properties ### Properties
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| -------------- | ------- | -------- | ------------ | ----------- | |----------------|---------|----------|--------------|-------------|
| `display_name` | string | true | | | | `display_name` | string | true | | |
| `key` | string | true | | | | `key` | string | true | | |
| `script` | string | true | | | | `script` | string | true | | |

View File

@ -15,7 +15,7 @@ curl -X GET http://coder-server:8080/api/v2/derp-map \
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------------------ | ------------------- | ------ | |--------|--------------------------------------------------------------------------|---------------------|--------|
| 101 | [Switching Protocols](https://tools.ietf.org/html/rfc7231#section-6.2.2) | Switching Protocols | | | 101 | [Switching Protocols](https://tools.ietf.org/html/rfc7231#section-6.2.2) | Switching Protocols | |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -35,7 +35,7 @@ curl -X GET http://coder-server:8080/api/v2/tailnet \
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------------------ | ------------------- | ------ | |--------|--------------------------------------------------------------------------|---------------------|--------|
| 101 | [Switching Protocols](https://tools.ietf.org/html/rfc7231#section-6.2.2) | Switching Protocols | | | 101 | [Switching Protocols](https://tools.ietf.org/html/rfc7231#section-6.2.2) | Switching Protocols | |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -58,15 +58,15 @@ curl -X POST http://coder-server:8080/api/v2/workspaceagents/aws-instance-identi
```json ```json
{ {
"document": "string", "document": "string",
"signature": "string" "signature": "string"
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------------- | -------- | ----------------------- | |--------|------|----------------------------------------------------------------------------------|----------|-------------------------|
| `body` | body | [agentsdk.AWSInstanceIdentityToken](schemas.md#agentsdkawsinstanceidentitytoken) | true | Instance identity token | | `body` | body | [agentsdk.AWSInstanceIdentityToken](schemas.md#agentsdkawsinstanceidentitytoken) | true | Instance identity token |
### Example responses ### Example responses
@ -75,14 +75,14 @@ curl -X POST http://coder-server:8080/api/v2/workspaceagents/aws-instance-identi
```json ```json
{ {
"session_token": "string" "session_token": "string"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ | |--------|---------------------------------------------------------|-------------|--------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.AuthenticateResponse](schemas.md#agentsdkauthenticateresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.AuthenticateResponse](schemas.md#agentsdkauthenticateresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -105,15 +105,15 @@ curl -X POST http://coder-server:8080/api/v2/workspaceagents/azure-instance-iden
```json ```json
{ {
"encoding": "string", "encoding": "string",
"signature": "string" "signature": "string"
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | ------------------------------------------------------------------------------------ | -------- | ----------------------- | |--------|------|--------------------------------------------------------------------------------------|----------|-------------------------|
| `body` | body | [agentsdk.AzureInstanceIdentityToken](schemas.md#agentsdkazureinstanceidentitytoken) | true | Instance identity token | | `body` | body | [agentsdk.AzureInstanceIdentityToken](schemas.md#agentsdkazureinstanceidentitytoken) | true | Instance identity token |
### Example responses ### Example responses
@ -122,14 +122,14 @@ curl -X POST http://coder-server:8080/api/v2/workspaceagents/azure-instance-iden
```json ```json
{ {
"session_token": "string" "session_token": "string"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ | |--------|---------------------------------------------------------|-------------|--------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.AuthenticateResponse](schemas.md#agentsdkauthenticateresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.AuthenticateResponse](schemas.md#agentsdkauthenticateresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -152,14 +152,14 @@ curl -X POST http://coder-server:8080/api/v2/workspaceagents/google-instance-ide
```json ```json
{ {
"json_web_token": "string" "json_web_token": "string"
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------------------- | -------- | ----------------------- | |--------|------|----------------------------------------------------------------------------------------|----------|-------------------------|
| `body` | body | [agentsdk.GoogleInstanceIdentityToken](schemas.md#agentsdkgoogleinstanceidentitytoken) | true | Instance identity token | | `body` | body | [agentsdk.GoogleInstanceIdentityToken](schemas.md#agentsdkgoogleinstanceidentitytoken) | true | Instance identity token |
### Example responses ### Example responses
@ -168,14 +168,14 @@ curl -X POST http://coder-server:8080/api/v2/workspaceagents/google-instance-ide
```json ```json
{ {
"session_token": "string" "session_token": "string"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ | |--------|---------------------------------------------------------|-------------|--------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.AuthenticateResponse](schemas.md#agentsdkauthenticateresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.AuthenticateResponse](schemas.md#agentsdkauthenticateresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -196,7 +196,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/external-auth?mat
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------- | ----- | ------- | -------- | --------------------------------- | |----------|-------|---------|----------|-----------------------------------|
| `match` | query | string | true | Match | | `match` | query | string | true | Match |
| `id` | query | string | true | Provider ID | | `id` | query | string | true | Provider ID |
| `listen` | query | boolean | false | Wait for a new token to be issued | | `listen` | query | boolean | false | Wait for a new token to be issued |
@ -207,19 +207,19 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/external-auth?mat
```json ```json
{ {
"access_token": "string", "access_token": "string",
"password": "string", "password": "string",
"token_extra": {}, "token_extra": {},
"type": "string", "type": "string",
"url": "string", "url": "string",
"username": "string" "username": "string"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ | |--------|---------------------------------------------------------|-------------|--------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.ExternalAuthResponse](schemas.md#agentsdkexternalauthresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.ExternalAuthResponse](schemas.md#agentsdkexternalauthresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -240,7 +240,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/gitauth?match=str
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------- | ----- | ------- | -------- | --------------------------------- | |----------|-------|---------|----------|-----------------------------------|
| `match` | query | string | true | Match | | `match` | query | string | true | Match |
| `id` | query | string | true | Provider ID | | `id` | query | string | true | Provider ID |
| `listen` | query | boolean | false | Wait for a new token to be issued | | `listen` | query | boolean | false | Wait for a new token to be issued |
@ -251,19 +251,19 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/gitauth?match=str
```json ```json
{ {
"access_token": "string", "access_token": "string",
"password": "string", "password": "string",
"token_extra": {}, "token_extra": {},
"type": "string", "type": "string",
"url": "string", "url": "string",
"username": "string" "username": "string"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ | |--------|---------------------------------------------------------|-------------|--------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.ExternalAuthResponse](schemas.md#agentsdkexternalauthresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.ExternalAuthResponse](schemas.md#agentsdkexternalauthresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -287,15 +287,15 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/gitsshkey \
```json ```json
{ {
"private_key": "string", "private_key": "string",
"public_key": "string" "public_key": "string"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.GitSSHKey](schemas.md#agentsdkgitsshkey) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [agentsdk.GitSSHKey](schemas.md#agentsdkgitsshkey) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -318,16 +318,16 @@ curl -X POST http://coder-server:8080/api/v2/workspaceagents/me/log-source \
```json ```json
{ {
"display_name": "string", "display_name": "string",
"icon": "string", "icon": "string",
"id": "string" "id": "string"
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | ------------------------------------------------------------------------ | -------- | ------------------ | |--------|------|--------------------------------------------------------------------------|----------|--------------------|
| `body` | body | [agentsdk.PostLogSourceRequest](schemas.md#agentsdkpostlogsourcerequest) | true | Log source request | | `body` | body | [agentsdk.PostLogSourceRequest](schemas.md#agentsdkpostlogsourcerequest) | true | Log source request |
### Example responses ### Example responses
@ -336,18 +336,18 @@ curl -X POST http://coder-server:8080/api/v2/workspaceagents/me/log-source \
```json ```json
{ {
"created_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z",
"display_name": "string", "display_name": "string",
"icon": "string", "icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1" "workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------ | |--------|---------------------------------------------------------|-------------|--------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceAgentLogSource](schemas.md#codersdkworkspaceagentlogsource) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceAgentLogSource](schemas.md#codersdkworkspaceagentlogsource) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -370,21 +370,21 @@ curl -X PATCH http://coder-server:8080/api/v2/workspaceagents/me/logs \
```json ```json
{ {
"log_source_id": "string", "log_source_id": "string",
"logs": [ "logs": [
{ {
"created_at": "string", "created_at": "string",
"level": "trace", "level": "trace",
"output": "string" "output": "string"
} }
] ]
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------- | -------- | ----------- | |--------|------|----------------------------------------------------|----------|-------------|
| `body` | body | [agentsdk.PatchLogs](schemas.md#agentsdkpatchlogs) | true | logs | | `body` | body | [agentsdk.PatchLogs](schemas.md#agentsdkpatchlogs) | true | logs |
### Example responses ### Example responses
@ -393,21 +393,21 @@ curl -X PATCH http://coder-server:8080/api/v2/workspaceagents/me/logs \
```json ```json
{ {
"detail": "string", "detail": "string",
"message": "string", "message": "string",
"validations": [ "validations": [
{ {
"detail": "string", "detail": "string",
"field": "string" "field": "string"
} }
] ]
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------ | |--------|---------------------------------------------------------|-------------|--------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Response](schemas.md#codersdkresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Response](schemas.md#codersdkresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -428,7 +428,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ---------------- | ---- | ------------ | -------- | ------------------ | |------------------|------|--------------|----------|--------------------|
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID | | `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
### Example responses ### Example responses
@ -437,102 +437,106 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
```json ```json
{ {
"api_version": "string", "api_version": "string",
"apps": [ "apps": [
{ {
"command": "string", "command": "string",
"display_name": "string", "display_name": "string",
"external": true, "external": true,
"health": "disabled", "health": "disabled",
"healthcheck": { "healthcheck": {
"interval": 0, "interval": 0,
"threshold": 0, "threshold": 0,
"url": "string" "url": "string"
}, },
"hidden": true, "hidden": true,
"icon": "string", "icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string", "open_in": "string",
"sharing_level": "owner", "sharing_level": "owner",
"slug": "string", "slug": "string",
"subdomain": true, "subdomain": true,
"subdomain_name": "string", "subdomain_name": "string",
"url": "string" "url": "string"
} }
], ],
"architecture": "string", "architecture": "string",
"connection_timeout_seconds": 0, "connection_timeout_seconds": 0,
"created_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z",
"directory": "string", "directory": "string",
"disconnected_at": "2019-08-24T14:15:22Z", "disconnected_at": "2019-08-24T14:15:22Z",
"display_apps": ["vscode"], "display_apps": [
"environment_variables": { "vscode"
"property1": "string", ],
"property2": "string" "environment_variables": {
}, "property1": "string",
"expanded_directory": "string", "property2": "string"
"first_connected_at": "2019-08-24T14:15:22Z", },
"health": { "expanded_directory": "string",
"healthy": false, "first_connected_at": "2019-08-24T14:15:22Z",
"reason": "agent has lost connection" "health": {
}, "healthy": false,
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "reason": "agent has lost connection"
"instance_id": "string", },
"last_connected_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"latency": { "instance_id": "string",
"property1": { "last_connected_at": "2019-08-24T14:15:22Z",
"latency_ms": 0, "latency": {
"preferred": true "property1": {
}, "latency_ms": 0,
"property2": { "preferred": true
"latency_ms": 0, },
"preferred": true "property2": {
} "latency_ms": 0,
}, "preferred": true
"lifecycle_state": "created", }
"log_sources": [ },
{ "lifecycle_state": "created",
"created_at": "2019-08-24T14:15:22Z", "log_sources": [
"display_name": "string", {
"icon": "string", "created_at": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "display_name": "string",
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1" "icon": "string",
} "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
], "workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
"logs_length": 0, }
"logs_overflowed": true, ],
"name": "string", "logs_length": 0,
"operating_system": "string", "logs_overflowed": true,
"ready_at": "2019-08-24T14:15:22Z", "name": "string",
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f", "operating_system": "string",
"scripts": [ "ready_at": "2019-08-24T14:15:22Z",
{ "resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
"cron": "string", "scripts": [
"display_name": "string", {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "cron": "string",
"log_path": "string", "display_name": "string",
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"run_on_start": true, "log_path": "string",
"run_on_stop": true, "log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
"script": "string", "run_on_start": true,
"start_blocks_login": true, "run_on_stop": true,
"timeout": 0 "script": "string",
} "start_blocks_login": true,
], "timeout": 0
"started_at": "2019-08-24T14:15:22Z", }
"startup_script_behavior": "blocking", ],
"status": "connecting", "started_at": "2019-08-24T14:15:22Z",
"subsystems": ["envbox"], "startup_script_behavior": "blocking",
"troubleshooting_url": "string", "status": "connecting",
"updated_at": "2019-08-24T14:15:22Z", "subsystems": [
"version": "string" "envbox"
],
"troubleshooting_url": "string",
"updated_at": "2019-08-24T14:15:22Z",
"version": "string"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------ | |--------|---------------------------------------------------------|-------------|--------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceAgent](schemas.md#codersdkworkspaceagent) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceAgent](schemas.md#codersdkworkspaceagent) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -553,7 +557,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/con
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ---------------- | ---- | ------------ | -------- | ------------------ | |------------------|------|--------------|----------|--------------------|
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID | | `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
### Example responses ### Example responses
@ -562,74 +566,74 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/con
```json ```json
{ {
"derp_force_websockets": true, "derp_force_websockets": true,
"derp_map": { "derp_map": {
"homeParams": { "homeParams": {
"regionScore": { "regionScore": {
"property1": 0, "property1": 0,
"property2": 0 "property2": 0
} }
}, },
"omitDefaultRegions": true, "omitDefaultRegions": true,
"regions": { "regions": {
"property1": { "property1": {
"avoid": true, "avoid": true,
"embeddedRelay": true, "embeddedRelay": true,
"nodes": [ "nodes": [
{ {
"canPort80": true, "canPort80": true,
"certName": "string", "certName": "string",
"derpport": 0, "derpport": 0,
"forceHTTP": true, "forceHTTP": true,
"hostName": "string", "hostName": "string",
"insecureForTests": true, "insecureForTests": true,
"ipv4": "string", "ipv4": "string",
"ipv6": "string", "ipv6": "string",
"name": "string", "name": "string",
"regionID": 0, "regionID": 0,
"stunonly": true, "stunonly": true,
"stunport": 0, "stunport": 0,
"stuntestIP": "string" "stuntestIP": "string"
} }
], ],
"regionCode": "string", "regionCode": "string",
"regionID": 0, "regionID": 0,
"regionName": "string" "regionName": "string"
}, },
"property2": { "property2": {
"avoid": true, "avoid": true,
"embeddedRelay": true, "embeddedRelay": true,
"nodes": [ "nodes": [
{ {
"canPort80": true, "canPort80": true,
"certName": "string", "certName": "string",
"derpport": 0, "derpport": 0,
"forceHTTP": true, "forceHTTP": true,
"hostName": "string", "hostName": "string",
"insecureForTests": true, "insecureForTests": true,
"ipv4": "string", "ipv4": "string",
"ipv6": "string", "ipv6": "string",
"name": "string", "name": "string",
"regionID": 0, "regionID": 0,
"stunonly": true, "stunonly": true,
"stunport": 0, "stunport": 0,
"stuntestIP": "string" "stuntestIP": "string"
} }
], ],
"regionCode": "string", "regionCode": "string",
"regionID": 0, "regionID": 0,
"regionName": "string" "regionName": "string"
} }
} }
}, },
"disable_direct_connections": true "disable_direct_connections": true
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------ | |--------|---------------------------------------------------------|-------------|--------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [workspacesdk.AgentConnectionInfo](schemas.md#workspacesdkagentconnectioninfo) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [workspacesdk.AgentConnectionInfo](schemas.md#workspacesdkagentconnectioninfo) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -649,13 +653,13 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/coo
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ---------------- | ---- | ------------ | -------- | ------------------ | |------------------|------|--------------|----------|--------------------|
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID | | `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------------------ | ------------------- | ------ | |--------|--------------------------------------------------------------------------|---------------------|--------|
| 101 | [Switching Protocols](https://tools.ietf.org/html/rfc7231#section-6.2.2) | Switching Protocols | | | 101 | [Switching Protocols](https://tools.ietf.org/html/rfc7231#section-6.2.2) | Switching Protocols | |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -676,7 +680,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/lis
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ---------------- | ---- | ------------ | -------- | ------------------ | |------------------|------|--------------|----------|--------------------|
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID | | `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
### Example responses ### Example responses
@ -685,20 +689,20 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/lis
```json ```json
{ {
"ports": [ "ports": [
{ {
"network": "string", "network": "string",
"port": 0, "port": 0,
"process_name": "string" "process_name": "string"
} }
] ]
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceAgentListeningPortsResponse](schemas.md#codersdkworkspaceagentlisteningportsresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceAgentListeningPortsResponse](schemas.md#codersdkworkspaceagentlisteningportsresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -719,7 +723,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/log
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ---------------- | ----- | ------------ | -------- | -------------------------------------------- | |------------------|-------|--------------|----------|----------------------------------------------|
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID | | `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
| `before` | query | integer | false | Before log id | | `before` | query | integer | false | Before log id |
| `after` | query | integer | false | After log id | | `after` | query | integer | false | After log id |
@ -732,20 +736,20 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/log
```json ```json
[ [
{ {
"created_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z",
"id": 0, "id": 0,
"level": "trace", "level": "trace",
"output": "string", "output": "string",
"source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81" "source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81"
} }
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | --------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|-----------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.WorkspaceAgentLog](schemas.md#codersdkworkspaceagentlog) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.WorkspaceAgentLog](schemas.md#codersdkworkspaceagentlog) |
<h3 id="get-logs-by-workspace-agent-responseschema">Response Schema</h3> <h3 id="get-logs-by-workspace-agent-responseschema">Response Schema</h3>
@ -753,7 +757,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/log
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| -------------- | ------------------------------------------------ | -------- | ------------ | ----------- | |----------------|--------------------------------------------------|----------|--------------|-------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» created_at` | string(date-time) | false | | | | `» created_at` | string(date-time) | false | | |
| `» id` | integer | false | | | | `» id` | integer | false | | |
@ -764,7 +768,7 @@ Status Code **200**
#### Enumerated Values #### Enumerated Values
| Property | Value | | Property | Value |
| -------- | ------- | |----------|---------|
| `level` | `trace` | | `level` | `trace` |
| `level` | `debug` | | `level` | `debug` |
| `level` | `info` | | `level` | `info` |
@ -788,13 +792,13 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/pty
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ---------------- | ---- | ------------ | -------- | ------------------ | |------------------|------|--------------|----------|--------------------|
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID | | `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------------------ | ------------------- | ------ | |--------|--------------------------------------------------------------------------|---------------------|--------|
| 101 | [Switching Protocols](https://tools.ietf.org/html/rfc7231#section-6.2.2) | Switching Protocols | | | 101 | [Switching Protocols](https://tools.ietf.org/html/rfc7231#section-6.2.2) | Switching Protocols | |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -815,7 +819,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/sta
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ---------------- | ----- | ------------ | -------- | -------------------------------------------- | |------------------|-------|--------------|----------|----------------------------------------------|
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID | | `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
| `before` | query | integer | false | Before log id | | `before` | query | integer | false | Before log id |
| `after` | query | integer | false | After log id | | `after` | query | integer | false | After log id |
@ -828,20 +832,20 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/sta
```json ```json
[ [
{ {
"created_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z",
"id": 0, "id": 0,
"level": "trace", "level": "trace",
"output": "string", "output": "string",
"source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81" "source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81"
} }
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | --------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|-----------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.WorkspaceAgentLog](schemas.md#codersdkworkspaceagentlog) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.WorkspaceAgentLog](schemas.md#codersdkworkspaceagentlog) |
<h3 id="removed:-get-logs-by-workspace-agent-responseschema">Response Schema</h3> <h3 id="removed:-get-logs-by-workspace-agent-responseschema">Response Schema</h3>
@ -849,7 +853,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/sta
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| -------------- | ------------------------------------------------ | -------- | ------------ | ----------- | |----------------|--------------------------------------------------|----------|--------------|-------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» created_at` | string(date-time) | false | | | | `» created_at` | string(date-time) | false | | |
| `» id` | integer | false | | | | `» id` | integer | false | | |
@ -860,7 +864,7 @@ Status Code **200**
#### Enumerated Values #### Enumerated Values
| Property | Value | | Property | Value |
| -------- | ------- | |----------|---------|
| `level` | `trace` | | `level` | `trace` |
| `level` | `debug` | | `level` | `debug` |
| `level` | `info` | | `level` | `info` |

View File

@ -15,13 +15,13 @@ curl -X GET http://coder-server:8080/api/v2/applications/auth-redirect \
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ----- | ------ | -------- | -------------------- | |----------------|-------|--------|----------|----------------------|
| `redirect_uri` | query | string | false | Redirect destination | | `redirect_uri` | query | string | false | Redirect destination |
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ----------------------------------------------------------------------- | ------------------ | ------ | |--------|-------------------------------------------------------------------------|--------------------|--------|
| 307 | [Temporary Redirect](https://tools.ietf.org/html/rfc7231#section-6.4.7) | Temporary Redirect | | | 307 | [Temporary Redirect](https://tools.ietf.org/html/rfc7231#section-6.4.7) | Temporary Redirect | |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -45,14 +45,14 @@ curl -X GET http://coder-server:8080/api/v2/applications/host \
```json ```json
{ {
"host": "string" "host": "string"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.AppHostResponse](schemas.md#codersdkapphostresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.AppHostResponse](schemas.md#codersdkapphostresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).

View File

@ -16,7 +16,7 @@ curl -X GET http://coder-server:8080/api/v2/audit?limit=0 \
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------- | ----- | ------- | -------- | ------------ | |----------|-------|---------|----------|--------------|
| `q` | query | string | false | Search query | | `q` | query | string | false | Search query |
| `limit` | query | integer | true | Page limit | | `limit` | query | integer | true | Page limit |
| `offset` | query | integer | false | Page offset | | `offset` | query | integer | false | Page offset |
@ -27,73 +27,77 @@ curl -X GET http://coder-server:8080/api/v2/audit?limit=0 \
```json ```json
{ {
"audit_logs": [ "audit_logs": [
{ {
"action": "create", "action": "create",
"additional_fields": [0], "additional_fields": [
"description": "string", 0
"diff": { ],
"property1": { "description": "string",
"new": null, "diff": {
"old": null, "property1": {
"secret": true "new": null,
}, "old": null,
"property2": { "secret": true
"new": null, },
"old": null, "property2": {
"secret": true "new": null,
} "old": null,
}, "secret": true
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", }
"ip": "string", },
"is_deleted": true, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"organization": { "ip": "string",
"display_name": "string", "is_deleted": true,
"icon": "string", "organization": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "display_name": "string",
"name": "string" "icon": "string",
}, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "name": "string"
"request_id": "266ea41d-adf5-480b-af50-15b940c2b846", },
"resource_icon": "string", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f", "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
"resource_link": "string", "resource_icon": "string",
"resource_target": "string", "resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
"resource_type": "template", "resource_link": "string",
"status_code": 0, "resource_target": "string",
"time": "2019-08-24T14:15:22Z", "resource_type": "template",
"user": { "status_code": 0,
"avatar_url": "http://example.com", "time": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z", "user": {
"email": "user@example.com", "avatar_url": "http://example.com",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created_at": "2019-08-24T14:15:22Z",
"last_seen_at": "2019-08-24T14:15:22Z", "email": "user@example.com",
"login_type": "", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string", "last_seen_at": "2019-08-24T14:15:22Z",
"organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "login_type": "",
"roles": [ "name": "string",
{ "organization_ids": [
"display_name": "string", "497f6eca-6276-4993-bfeb-53cbbbba6f08"
"name": "string", ],
"organization_id": "string" "roles": [
} {
], "display_name": "string",
"status": "active", "name": "string",
"theme_preference": "string", "organization_id": "string"
"updated_at": "2019-08-24T14:15:22Z", }
"username": "string" ],
}, "status": "active",
"user_agent": "string" "theme_preference": "string",
} "updated_at": "2019-08-24T14:15:22Z",
], "username": "string"
"count": 0 },
"user_agent": "string"
}
],
"count": 0
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.AuditLogResponse](schemas.md#codersdkauditlogresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.AuditLogResponse](schemas.md#codersdkauditlogresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).

View File

@ -18,35 +18,35 @@ curl -X POST http://coder-server:8080/api/v2/authcheck \
```json ```json
{ {
"checks": { "checks": {
"property1": { "property1": {
"action": "create", "action": "create",
"object": { "object": {
"any_org": true, "any_org": true,
"organization_id": "string", "organization_id": "string",
"owner_id": "string", "owner_id": "string",
"resource_id": "string", "resource_id": "string",
"resource_type": "*" "resource_type": "*"
} }
}, },
"property2": { "property2": {
"action": "create", "action": "create",
"object": { "object": {
"any_org": true, "any_org": true,
"organization_id": "string", "organization_id": "string",
"owner_id": "string", "owner_id": "string",
"resource_id": "string", "resource_id": "string",
"resource_type": "*" "resource_type": "*"
} }
} }
} }
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | ------------------------------------------------------------------------ | -------- | --------------------- | |--------|------|--------------------------------------------------------------------------|----------|-----------------------|
| `body` | body | [codersdk.AuthorizationRequest](schemas.md#codersdkauthorizationrequest) | true | Authorization request | | `body` | body | [codersdk.AuthorizationRequest](schemas.md#codersdkauthorizationrequest) | true | Authorization request |
### Example responses ### Example responses
@ -55,15 +55,15 @@ curl -X POST http://coder-server:8080/api/v2/authcheck \
```json ```json
{ {
"property1": true, "property1": true,
"property2": true "property2": true
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.AuthorizationResponse](schemas.md#codersdkauthorizationresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.AuthorizationResponse](schemas.md#codersdkauthorizationresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -85,15 +85,15 @@ curl -X POST http://coder-server:8080/api/v2/users/login \
```json ```json
{ {
"email": "user@example.com", "email": "user@example.com",
"password": "string" "password": "string"
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------------- | -------- | ------------- | |--------|------|----------------------------------------------------------------------------------|----------|---------------|
| `body` | body | [codersdk.LoginWithPasswordRequest](schemas.md#codersdkloginwithpasswordrequest) | true | Login request | | `body` | body | [codersdk.LoginWithPasswordRequest](schemas.md#codersdkloginwithpasswordrequest) | true | Login request |
### Example responses ### Example responses
@ -102,14 +102,14 @@ curl -X POST http://coder-server:8080/api/v2/users/login \
```json ```json
{ {
"session_token": "string" "session_token": "string"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------ | ----------- | ---------------------------------------------------------------------------------- | |--------|--------------------------------------------------------------|-------------|------------------------------------------------------------------------------------|
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.LoginWithPasswordResponse](schemas.md#codersdkloginwithpasswordresponse) | | 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.LoginWithPasswordResponse](schemas.md#codersdkloginwithpasswordresponse) |
## Change password with a one-time passcode ## Change password with a one-time passcode
@ -128,22 +128,22 @@ curl -X POST http://coder-server:8080/api/v2/users/otp/change-password \
```json ```json
{ {
"email": "user@example.com", "email": "user@example.com",
"one_time_passcode": "string", "one_time_passcode": "string",
"password": "string" "password": "string"
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | ---------------------------------------------------------------------------------------------------------------- | -------- | ----------------------- | |--------|------|------------------------------------------------------------------------------------------------------------------|----------|-------------------------|
| `body` | body | [codersdk.ChangePasswordWithOneTimePasscodeRequest](schemas.md#codersdkchangepasswordwithonetimepasscoderequest) | true | Change password request | | `body` | body | [codersdk.ChangePasswordWithOneTimePasscodeRequest](schemas.md#codersdkchangepasswordwithonetimepasscoderequest) | true | Change password request |
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | ------ | |--------|-----------------------------------------------------------------|-------------|--------|
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | | | 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | |
## Request one-time passcode ## Request one-time passcode
@ -162,20 +162,20 @@ curl -X POST http://coder-server:8080/api/v2/users/otp/request \
```json ```json
{ {
"email": "user@example.com" "email": "user@example.com"
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | ------------------------------------------------------------------------------------------ | -------- | ------------------------- | |--------|------|--------------------------------------------------------------------------------------------|----------|---------------------------|
| `body` | body | [codersdk.RequestOneTimePasscodeRequest](schemas.md#codersdkrequestonetimepasscoderequest) | true | One-time passcode request | | `body` | body | [codersdk.RequestOneTimePasscodeRequest](schemas.md#codersdkrequestonetimepasscoderequest) | true | One-time passcode request |
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | ------ | |--------|-----------------------------------------------------------------|-------------|--------|
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | | | 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | |
## Validate user password ## Validate user password
@ -196,14 +196,14 @@ curl -X POST http://coder-server:8080/api/v2/users/validate-password \
```json ```json
{ {
"password": "string" "password": "string"
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------------------- | -------- | ------------------------------ | |--------|------|----------------------------------------------------------------------------------------|----------|--------------------------------|
| `body` | body | [codersdk.ValidateUserPasswordRequest](schemas.md#codersdkvalidateuserpasswordrequest) | true | Validate user password request | | `body` | body | [codersdk.ValidateUserPasswordRequest](schemas.md#codersdkvalidateuserpasswordrequest) | true | Validate user password request |
### Example responses ### Example responses
@ -212,15 +212,15 @@ curl -X POST http://coder-server:8080/api/v2/users/validate-password \
```json ```json
{ {
"details": "string", "details": "string",
"valid": true "valid": true
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|------------------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.ValidateUserPasswordResponse](schemas.md#codersdkvalidateuserpasswordresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.ValidateUserPasswordResponse](schemas.md#codersdkvalidateuserpasswordresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -243,15 +243,15 @@ curl -X POST http://coder-server:8080/api/v2/users/{user}/convert-login \
```json ```json
{ {
"password": "string", "password": "string",
"to_type": "" "to_type": ""
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | ---------------------------------------------------------------------- | -------- | -------------------- | |--------|------|------------------------------------------------------------------------|----------|----------------------|
| `user` | path | string | true | User ID, name, or me | | `user` | path | string | true | User ID, name, or me |
| `body` | body | [codersdk.ConvertLoginRequest](schemas.md#codersdkconvertloginrequest) | true | Convert request | | `body` | body | [codersdk.ConvertLoginRequest](schemas.md#codersdkconvertloginrequest) | true | Convert request |
@ -261,17 +261,17 @@ curl -X POST http://coder-server:8080/api/v2/users/{user}/convert-login \
```json ```json
{ {
"expires_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z",
"state_string": "string", "state_string": "string",
"to_type": "", "to_type": "",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5" "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------ | |--------|--------------------------------------------------------------|-------------|--------------------------------------------------------------------------------|
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.OAuthConversionResponse](schemas.md#codersdkoauthconversionresponse) | | 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.OAuthConversionResponse](schemas.md#codersdkoauthconversionresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@ curl -X GET http://coder-server:8080/api/v2/debug/coordinator \
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ | |--------|---------------------------------------------------------|-------------|--------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -36,7 +36,7 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------- | ----- | ------- | -------- | -------------------------- | |---------|-------|---------|----------|----------------------------|
| `force` | query | boolean | false | Force a healthcheck to run | | `force` | query | boolean | false | Force a healthcheck to run |
### Example responses ### Example responses
@ -45,340 +45,364 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
```json ```json
{ {
"access_url": { "access_url": {
"access_url": "string", "access_url": "string",
"dismissed": true, "dismissed": true,
"error": "string", "error": "string",
"healthy": true, "healthy": true,
"healthz_response": "string", "healthz_response": "string",
"reachable": true, "reachable": true,
"severity": "ok", "severity": "ok",
"status_code": 0, "status_code": 0,
"warnings": [ "warnings": [
{ {
"code": "EUNKNOWN", "code": "EUNKNOWN",
"message": "string" "message": "string"
} }
] ]
}, },
"coder_version": "string", "coder_version": "string",
"database": { "database": {
"dismissed": true, "dismissed": true,
"error": "string", "error": "string",
"healthy": true, "healthy": true,
"latency": "string", "latency": "string",
"latency_ms": 0, "latency_ms": 0,
"reachable": true, "reachable": true,
"severity": "ok", "severity": "ok",
"threshold_ms": 0, "threshold_ms": 0,
"warnings": [ "warnings": [
{ {
"code": "EUNKNOWN", "code": "EUNKNOWN",
"message": "string" "message": "string"
} }
] ]
}, },
"derp": { "derp": {
"dismissed": true, "dismissed": true,
"error": "string", "error": "string",
"healthy": true, "healthy": true,
"netcheck": { "netcheck": {
"captivePortal": "string", "captivePortal": "string",
"globalV4": "string", "globalV4": "string",
"globalV6": "string", "globalV6": "string",
"hairPinning": "string", "hairPinning": "string",
"icmpv4": true, "icmpv4": true,
"ipv4": true, "ipv4": true,
"ipv4CanSend": true, "ipv4CanSend": true,
"ipv6": true, "ipv6": true,
"ipv6CanSend": true, "ipv6CanSend": true,
"mappingVariesByDestIP": "string", "mappingVariesByDestIP": "string",
"oshasIPv6": true, "oshasIPv6": true,
"pcp": "string", "pcp": "string",
"pmp": "string", "pmp": "string",
"preferredDERP": 0, "preferredDERP": 0,
"regionLatency": { "regionLatency": {
"property1": 0, "property1": 0,
"property2": 0 "property2": 0
}, },
"regionV4Latency": { "regionV4Latency": {
"property1": 0, "property1": 0,
"property2": 0 "property2": 0
}, },
"regionV6Latency": { "regionV6Latency": {
"property1": 0, "property1": 0,
"property2": 0 "property2": 0
}, },
"udp": true, "udp": true,
"upnP": "string" "upnP": "string"
}, },
"netcheck_err": "string", "netcheck_err": "string",
"netcheck_logs": ["string"], "netcheck_logs": [
"regions": { "string"
"property1": { ],
"error": "string", "regions": {
"healthy": true, "property1": {
"node_reports": [ "error": "string",
{ "healthy": true,
"can_exchange_messages": true, "node_reports": [
"client_errs": [["string"]], {
"client_logs": [["string"]], "can_exchange_messages": true,
"error": "string", "client_errs": [
"healthy": true, [
"node": { "string"
"canPort80": true, ]
"certName": "string", ],
"derpport": 0, "client_logs": [
"forceHTTP": true, [
"hostName": "string", "string"
"insecureForTests": true, ]
"ipv4": "string", ],
"ipv6": "string", "error": "string",
"name": "string", "healthy": true,
"regionID": 0, "node": {
"stunonly": true, "canPort80": true,
"stunport": 0, "certName": "string",
"stuntestIP": "string" "derpport": 0,
}, "forceHTTP": true,
"node_info": { "hostName": "string",
"tokenBucketBytesBurst": 0, "insecureForTests": true,
"tokenBucketBytesPerSecond": 0 "ipv4": "string",
}, "ipv6": "string",
"round_trip_ping": "string", "name": "string",
"round_trip_ping_ms": 0, "regionID": 0,
"severity": "ok", "stunonly": true,
"stun": { "stunport": 0,
"canSTUN": true, "stuntestIP": "string"
"enabled": true, },
"error": "string" "node_info": {
}, "tokenBucketBytesBurst": 0,
"uses_websocket": true, "tokenBucketBytesPerSecond": 0
"warnings": [ },
{ "round_trip_ping": "string",
"code": "EUNKNOWN", "round_trip_ping_ms": 0,
"message": "string" "severity": "ok",
} "stun": {
] "canSTUN": true,
} "enabled": true,
], "error": "string"
"region": { },
"avoid": true, "uses_websocket": true,
"embeddedRelay": true, "warnings": [
"nodes": [ {
{ "code": "EUNKNOWN",
"canPort80": true, "message": "string"
"certName": "string", }
"derpport": 0, ]
"forceHTTP": true, }
"hostName": "string", ],
"insecureForTests": true, "region": {
"ipv4": "string", "avoid": true,
"ipv6": "string", "embeddedRelay": true,
"name": "string", "nodes": [
"regionID": 0, {
"stunonly": true, "canPort80": true,
"stunport": 0, "certName": "string",
"stuntestIP": "string" "derpport": 0,
} "forceHTTP": true,
], "hostName": "string",
"regionCode": "string", "insecureForTests": true,
"regionID": 0, "ipv4": "string",
"regionName": "string" "ipv6": "string",
}, "name": "string",
"severity": "ok", "regionID": 0,
"warnings": [ "stunonly": true,
{ "stunport": 0,
"code": "EUNKNOWN", "stuntestIP": "string"
"message": "string" }
} ],
] "regionCode": "string",
}, "regionID": 0,
"property2": { "regionName": "string"
"error": "string", },
"healthy": true, "severity": "ok",
"node_reports": [ "warnings": [
{ {
"can_exchange_messages": true, "code": "EUNKNOWN",
"client_errs": [["string"]], "message": "string"
"client_logs": [["string"]], }
"error": "string", ]
"healthy": true, },
"node": { "property2": {
"canPort80": true, "error": "string",
"certName": "string", "healthy": true,
"derpport": 0, "node_reports": [
"forceHTTP": true, {
"hostName": "string", "can_exchange_messages": true,
"insecureForTests": true, "client_errs": [
"ipv4": "string", [
"ipv6": "string", "string"
"name": "string", ]
"regionID": 0, ],
"stunonly": true, "client_logs": [
"stunport": 0, [
"stuntestIP": "string" "string"
}, ]
"node_info": { ],
"tokenBucketBytesBurst": 0, "error": "string",
"tokenBucketBytesPerSecond": 0 "healthy": true,
}, "node": {
"round_trip_ping": "string", "canPort80": true,
"round_trip_ping_ms": 0, "certName": "string",
"severity": "ok", "derpport": 0,
"stun": { "forceHTTP": true,
"canSTUN": true, "hostName": "string",
"enabled": true, "insecureForTests": true,
"error": "string" "ipv4": "string",
}, "ipv6": "string",
"uses_websocket": true, "name": "string",
"warnings": [ "regionID": 0,
{ "stunonly": true,
"code": "EUNKNOWN", "stunport": 0,
"message": "string" "stuntestIP": "string"
} },
] "node_info": {
} "tokenBucketBytesBurst": 0,
], "tokenBucketBytesPerSecond": 0
"region": { },
"avoid": true, "round_trip_ping": "string",
"embeddedRelay": true, "round_trip_ping_ms": 0,
"nodes": [ "severity": "ok",
{ "stun": {
"canPort80": true, "canSTUN": true,
"certName": "string", "enabled": true,
"derpport": 0, "error": "string"
"forceHTTP": true, },
"hostName": "string", "uses_websocket": true,
"insecureForTests": true, "warnings": [
"ipv4": "string", {
"ipv6": "string", "code": "EUNKNOWN",
"name": "string", "message": "string"
"regionID": 0, }
"stunonly": true, ]
"stunport": 0, }
"stuntestIP": "string" ],
} "region": {
], "avoid": true,
"regionCode": "string", "embeddedRelay": true,
"regionID": 0, "nodes": [
"regionName": "string" {
}, "canPort80": true,
"severity": "ok", "certName": "string",
"warnings": [ "derpport": 0,
{ "forceHTTP": true,
"code": "EUNKNOWN", "hostName": "string",
"message": "string" "insecureForTests": true,
} "ipv4": "string",
] "ipv6": "string",
} "name": "string",
}, "regionID": 0,
"severity": "ok", "stunonly": true,
"warnings": [ "stunport": 0,
{ "stuntestIP": "string"
"code": "EUNKNOWN", }
"message": "string" ],
} "regionCode": "string",
] "regionID": 0,
}, "regionName": "string"
"healthy": true, },
"provisioner_daemons": { "severity": "ok",
"dismissed": true, "warnings": [
"error": "string", {
"items": [ "code": "EUNKNOWN",
{ "message": "string"
"provisioner_daemon": { }
"api_version": "string", ]
"created_at": "2019-08-24T14:15:22Z", }
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", },
"key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5", "severity": "ok",
"last_seen_at": "2019-08-24T14:15:22Z", "warnings": [
"name": "string", {
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "code": "EUNKNOWN",
"provisioners": ["string"], "message": "string"
"tags": { }
"property1": "string", ]
"property2": "string" },
}, "healthy": true,
"version": "string" "provisioner_daemons": {
}, "dismissed": true,
"warnings": [ "error": "string",
{ "items": [
"code": "EUNKNOWN", {
"message": "string" "provisioner_daemon": {
} "api_version": "string",
] "created_at": "2019-08-24T14:15:22Z",
} "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
], "key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5",
"severity": "ok", "last_seen_at": "2019-08-24T14:15:22Z",
"warnings": [ "name": "string",
{ "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"code": "EUNKNOWN", "provisioners": [
"message": "string" "string"
} ],
] "tags": {
}, "property1": "string",
"severity": "ok", "property2": "string"
"time": "2019-08-24T14:15:22Z", },
"websocket": { "version": "string"
"body": "string", },
"code": 0, "warnings": [
"dismissed": true, {
"error": "string", "code": "EUNKNOWN",
"healthy": true, "message": "string"
"severity": "ok", }
"warnings": [ ]
{ }
"code": "EUNKNOWN", ],
"message": "string" "severity": "ok",
} "warnings": [
] {
}, "code": "EUNKNOWN",
"workspace_proxy": { "message": "string"
"dismissed": true, }
"error": "string", ]
"healthy": true, },
"severity": "ok", "severity": "ok",
"warnings": [ "time": "2019-08-24T14:15:22Z",
{ "websocket": {
"code": "EUNKNOWN", "body": "string",
"message": "string" "code": 0,
} "dismissed": true,
], "error": "string",
"workspace_proxies": { "healthy": true,
"regions": [ "severity": "ok",
{ "warnings": [
"created_at": "2019-08-24T14:15:22Z", {
"deleted": true, "code": "EUNKNOWN",
"derp_enabled": true, "message": "string"
"derp_only": true, }
"display_name": "string", ]
"healthy": true, },
"icon_url": "string", "workspace_proxy": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "dismissed": true,
"name": "string", "error": "string",
"path_app_url": "string", "healthy": true,
"status": { "severity": "ok",
"checked_at": "2019-08-24T14:15:22Z", "warnings": [
"report": { {
"errors": ["string"], "code": "EUNKNOWN",
"warnings": ["string"] "message": "string"
}, }
"status": "ok" ],
}, "workspace_proxies": {
"updated_at": "2019-08-24T14:15:22Z", "regions": [
"version": "string", {
"wildcard_hostname": "string" "created_at": "2019-08-24T14:15:22Z",
} "deleted": true,
] "derp_enabled": true,
} "derp_only": true,
} "display_name": "string",
"healthy": true,
"icon_url": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"path_app_url": "string",
"status": {
"checked_at": "2019-08-24T14:15:22Z",
"report": {
"errors": [
"string"
],
"warnings": [
"string"
]
},
"status": "ok"
},
"updated_at": "2019-08-24T14:15:22Z",
"version": "string",
"wildcard_hostname": "string"
}
]
}
}
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [healthsdk.HealthcheckReport](schemas.md#healthsdkhealthcheckreport) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [healthsdk.HealthcheckReport](schemas.md#healthsdkhealthcheckreport) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -402,14 +426,16 @@ curl -X GET http://coder-server:8080/api/v2/debug/health/settings \
```json ```json
{ {
"dismissed_healthchecks": ["DERP"] "dismissed_healthchecks": [
"DERP"
]
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [healthsdk.HealthSettings](schemas.md#healthsdkhealthsettings) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [healthsdk.HealthSettings](schemas.md#healthsdkhealthsettings) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -432,14 +458,16 @@ curl -X PUT http://coder-server:8080/api/v2/debug/health/settings \
```json ```json
{ {
"dismissed_healthchecks": ["DERP"] "dismissed_healthchecks": [
"DERP"
]
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------- | -------- | ---------------------- | |--------|------|----------------------------------------------------------------------------|----------|------------------------|
| `body` | body | [healthsdk.UpdateHealthSettings](schemas.md#healthsdkupdatehealthsettings) | true | Update health settings | | `body` | body | [healthsdk.UpdateHealthSettings](schemas.md#healthsdkupdatehealthsettings) | true | Update health settings |
### Example responses ### Example responses
@ -448,14 +476,16 @@ curl -X PUT http://coder-server:8080/api/v2/debug/health/settings \
```json ```json
{ {
"dismissed_healthchecks": ["DERP"] "dismissed_healthchecks": [
"DERP"
]
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [healthsdk.UpdateHealthSettings](schemas.md#healthsdkupdatehealthsettings) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [healthsdk.UpdateHealthSettings](schemas.md#healthsdkupdatehealthsettings) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -475,7 +505,7 @@ curl -X GET http://coder-server:8080/api/v2/debug/tailnet \
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ | |--------|---------------------------------------------------------|-------------|--------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).

File diff suppressed because it is too large Load Diff

View File

@ -18,12 +18,13 @@ curl -X POST http://coder-server:8080/api/v2/files \
```yaml ```yaml
file: string file: string
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ------ | ------ | -------- | ---------------------------------------------------------------------------------------------- | |----------------|--------|--------|----------|------------------------------------------------------------------------------------------------|
| `Content-Type` | header | string | true | Content-Type must be `application/x-tar` or `application/zip` | | `Content-Type` | header | string | true | Content-Type must be `application/x-tar` or `application/zip` |
| `body` | body | object | true | | | `body` | body | object | true | |
| `» file` | body | binary | true | File to be uploaded. If using tar format, file must conform to ustar (pax may cause problems). | | `» file` | body | binary | true | File to be uploaded. If using tar format, file must conform to ustar (pax may cause problems). |
@ -34,14 +35,14 @@ file: string
```json ```json
{ {
"hash": "19686d84-b10d-4f90-b18e-84fd3fa038fd" "hash": "19686d84-b10d-4f90-b18e-84fd3fa038fd"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------ | ----------- | ------------------------------------------------------------ | |--------|--------------------------------------------------------------|-------------|--------------------------------------------------------------|
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.UploadResponse](schemas.md#codersdkuploadresponse) | | 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.UploadResponse](schemas.md#codersdkuploadresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -61,13 +62,13 @@ curl -X GET http://coder-server:8080/api/v2/files/{fileID} \
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------- | ---- | ------------ | -------- | ----------- | |----------|------|--------------|----------|-------------|
| `fileID` | path | string(uuid) | true | File ID | | `fileID` | path | string(uuid) | true | File ID |
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ | |--------|---------------------------------------------------------|-------------|--------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).

File diff suppressed because it is too large Load Diff

View File

@ -19,20 +19,20 @@ curl -X GET http://coder-server:8080/api/v2/external-auth \
```json ```json
{ {
"authenticated": true, "authenticated": true,
"created_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z",
"expires": "2019-08-24T14:15:22Z", "expires": "2019-08-24T14:15:22Z",
"has_refresh_token": true, "has_refresh_token": true,
"provider_id": "string", "provider_id": "string",
"updated_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z",
"validate_error": "string" "validate_error": "string"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.ExternalAuthLink](schemas.md#codersdkexternalauthlink) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.ExternalAuthLink](schemas.md#codersdkexternalauthlink) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -53,7 +53,7 @@ curl -X GET http://coder-server:8080/api/v2/external-auth/{externalauth} \
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | -------------- | -------- | --------------- | |----------------|------|----------------|----------|-----------------|
| `externalauth` | path | string(string) | true | Git Provider ID | | `externalauth` | path | string(string) | true | Git Provider ID |
### Example responses ### Example responses
@ -62,38 +62,38 @@ curl -X GET http://coder-server:8080/api/v2/external-auth/{externalauth} \
```json ```json
{ {
"app_install_url": "string", "app_install_url": "string",
"app_installable": true, "app_installable": true,
"authenticated": true, "authenticated": true,
"device": true, "device": true,
"display_name": "string", "display_name": "string",
"installations": [ "installations": [
{ {
"account": { "account": {
"avatar_url": "string", "avatar_url": "string",
"id": 0, "id": 0,
"login": "string", "login": "string",
"name": "string", "name": "string",
"profile_url": "string" "profile_url": "string"
}, },
"configure_url": "string", "configure_url": "string",
"id": 0 "id": 0
} }
], ],
"user": { "user": {
"avatar_url": "string", "avatar_url": "string",
"id": 0, "id": 0,
"login": "string", "login": "string",
"name": "string", "name": "string",
"profile_url": "string" "profile_url": "string"
} }
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.ExternalAuth](schemas.md#codersdkexternalauth) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.ExternalAuth](schemas.md#codersdkexternalauth) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -113,18 +113,18 @@ curl -X DELETE http://coder-server:8080/api/v2/external-auth/{externalauth} \
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | -------------- | -------- | --------------- | |----------------|------|----------------|----------|-----------------|
| `externalauth` | path | string(string) | true | Git Provider ID | | `externalauth` | path | string(string) | true | Git Provider ID |
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ | |--------|---------------------------------------------------------|-------------|--------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get external auth device by ID. ## Get external auth device by ID
### Code samples ### Code samples
@ -140,7 +140,7 @@ curl -X GET http://coder-server:8080/api/v2/external-auth/{externalauth}/device
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | -------------- | -------- | --------------- | |----------------|------|----------------|----------|-----------------|
| `externalauth` | path | string(string) | true | Git Provider ID | | `externalauth` | path | string(string) | true | Git Provider ID |
### Example responses ### Example responses
@ -149,18 +149,18 @@ curl -X GET http://coder-server:8080/api/v2/external-auth/{externalauth}/device
```json ```json
{ {
"device_code": "string", "device_code": "string",
"expires_in": 0, "expires_in": 0,
"interval": 0, "interval": 0,
"user_code": "string", "user_code": "string",
"verification_uri": "string" "verification_uri": "string"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.ExternalAuthDevice](schemas.md#codersdkexternalauthdevice) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.ExternalAuthDevice](schemas.md#codersdkexternalauthdevice) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -180,13 +180,13 @@ curl -X POST http://coder-server:8080/api/v2/external-auth/{externalauth}/device
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | -------------- | -------- | -------------------- | |----------------|------|----------------|----------|----------------------|
| `externalauth` | path | string(string) | true | External Provider ID | | `externalauth` | path | string(string) | true | External Provider ID |
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | ------ | |--------|-----------------------------------------------------------------|-------------|--------|
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | | | 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).

View File

@ -1,20 +1,22 @@
# API
Get started with the Coder API: Get started with the Coder API:
## Quickstart ## Quickstart
Generate a token on your Coder deployment by visiting: Generate a token on your Coder deployment by visiting:
```shell ````shell
https://coder.example.com/settings/tokens https://coder.example.com/settings/tokens
``` ````
List your workspaces List your workspaces
```shell ````shell
# CLI # CLI
curl https://coder.example.com/api/v2/workspaces?q=owner:me \ curl https://coder.example.com/api/v2/workspaces?q=owner:me \
-H "Coder-Session-Token: <your-token>" -H "Coder-Session-Token: <your-token>"
``` ````
## Use cases ## Use cases

View File

@ -16,7 +16,7 @@ curl -X GET http://coder-server:8080/api/v2/insights/daus?tz_offset=0 \
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ----------- | ----- | ------- | -------- | -------------------------- | |-------------|-------|---------|----------|----------------------------|
| `tz_offset` | query | integer | true | Time-zone offset (e.g. -2) | | `tz_offset` | query | integer | true | Time-zone offset (e.g. -2) |
### Example responses ### Example responses
@ -25,20 +25,20 @@ curl -X GET http://coder-server:8080/api/v2/insights/daus?tz_offset=0 \
```json ```json
{ {
"entries": [ "entries": [
{ {
"amount": 0, "amount": 0,
"date": "string" "date": "string"
} }
], ],
"tz_hour_offset": 0 "tz_hour_offset": 0
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.DAUsResponse](schemas.md#codersdkdausresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.DAUsResponse](schemas.md#codersdkdausresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -59,7 +59,7 @@ curl -X GET http://coder-server:8080/api/v2/insights/templates?start_time=2019-0
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ----- | ----------------- | -------- | ------------ | |----------------|-------|-------------------|----------|--------------|
| `start_time` | query | string(date-time) | true | Start time | | `start_time` | query | string(date-time) | true | Start time |
| `end_time` | query | string(date-time) | true | End time | | `end_time` | query | string(date-time) | true | End time |
| `interval` | query | string | true | Interval | | `interval` | query | string | true | Interval |
@ -68,7 +68,7 @@ curl -X GET http://coder-server:8080/api/v2/insights/templates?start_time=2019-0
#### Enumerated Values #### Enumerated Values
| Parameter | Value | | Parameter | Value |
| ---------- | ------ | |------------|--------|
| `interval` | `week` | | `interval` | `week` |
| `interval` | `day` | | `interval` | `day` |
@ -78,62 +78,70 @@ curl -X GET http://coder-server:8080/api/v2/insights/templates?start_time=2019-0
```json ```json
{ {
"interval_reports": [ "interval_reports": [
{ {
"active_users": 14, "active_users": 14,
"end_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z",
"interval": "week", "interval": "week",
"start_time": "2019-08-24T14:15:22Z", "start_time": "2019-08-24T14:15:22Z",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"] "template_ids": [
} "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], ]
"report": { }
"active_users": 22, ],
"apps_usage": [ "report": {
{ "active_users": 22,
"display_name": "Visual Studio Code", "apps_usage": [
"icon": "string", {
"seconds": 80500, "display_name": "Visual Studio Code",
"slug": "vscode", "icon": "string",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "seconds": 80500,
"times_used": 2, "slug": "vscode",
"type": "builtin" "template_ids": [
} "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], ],
"end_time": "2019-08-24T14:15:22Z", "times_used": 2,
"parameters_usage": [ "type": "builtin"
{ }
"description": "string", ],
"display_name": "string", "end_time": "2019-08-24T14:15:22Z",
"name": "string", "parameters_usage": [
"options": [ {
{ "description": "string",
"description": "string", "display_name": "string",
"icon": "string", "name": "string",
"name": "string", "options": [
"value": "string" {
} "description": "string",
], "icon": "string",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "name": "string",
"type": "string", "value": "string"
"values": [ }
{ ],
"count": 0, "template_ids": [
"value": "string" "497f6eca-6276-4993-bfeb-53cbbbba6f08"
} ],
] "type": "string",
} "values": [
], {
"start_time": "2019-08-24T14:15:22Z", "count": 0,
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"] "value": "string"
} }
]
}
],
"start_time": "2019-08-24T14:15:22Z",
"template_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.TemplateInsightsResponse](schemas.md#codersdktemplateinsightsresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.TemplateInsightsResponse](schemas.md#codersdktemplateinsightsresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -154,7 +162,7 @@ curl -X GET http://coder-server:8080/api/v2/insights/user-activity?start_time=20
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ----- | ----------------- | -------- | ------------ | |----------------|-------|-------------------|----------|--------------|
| `start_time` | query | string(date-time) | true | Start time | | `start_time` | query | string(date-time) | true | Start time |
| `end_time` | query | string(date-time) | true | End time | | `end_time` | query | string(date-time) | true | End time |
| `template_ids` | query | array[string] | false | Template IDs | | `template_ids` | query | array[string] | false | Template IDs |
@ -165,27 +173,31 @@ curl -X GET http://coder-server:8080/api/v2/insights/user-activity?start_time=20
```json ```json
{ {
"report": { "report": {
"end_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z",
"start_time": "2019-08-24T14:15:22Z", "start_time": "2019-08-24T14:15:22Z",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "template_ids": [
"users": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08"
{ ],
"avatar_url": "http://example.com", "users": [
"seconds": 80500, {
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "avatar_url": "http://example.com",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5", "seconds": 80500,
"username": "string" "template_ids": [
} "497f6eca-6276-4993-bfeb-53cbbbba6f08"
] ],
} "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"username": "string"
}
]
}
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|------------------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.UserActivityInsightsResponse](schemas.md#codersdkuseractivityinsightsresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.UserActivityInsightsResponse](schemas.md#codersdkuseractivityinsightsresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -206,7 +218,7 @@ curl -X GET http://coder-server:8080/api/v2/insights/user-latency?start_time=201
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ----- | ----------------- | -------- | ------------ | |----------------|-------|-------------------|----------|--------------|
| `start_time` | query | string(date-time) | true | Start time | | `start_time` | query | string(date-time) | true | Start time |
| `end_time` | query | string(date-time) | true | End time | | `end_time` | query | string(date-time) | true | End time |
| `template_ids` | query | array[string] | false | Template IDs | | `template_ids` | query | array[string] | false | Template IDs |
@ -217,30 +229,34 @@ curl -X GET http://coder-server:8080/api/v2/insights/user-latency?start_time=201
```json ```json
{ {
"report": { "report": {
"end_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z",
"start_time": "2019-08-24T14:15:22Z", "start_time": "2019-08-24T14:15:22Z",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "template_ids": [
"users": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08"
{ ],
"avatar_url": "http://example.com", "users": [
"latency_ms": { {
"p50": 31.312, "avatar_url": "http://example.com",
"p95": 119.832 "latency_ms": {
}, "p50": 31.312,
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "p95": 119.832
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5", },
"username": "string" "template_ids": [
} "497f6eca-6276-4993-bfeb-53cbbbba6f08"
] ],
} "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"username": "string"
}
]
}
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.UserLatencyInsightsResponse](schemas.md#codersdkuserlatencyinsightsresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.UserLatencyInsightsResponse](schemas.md#codersdkuserlatencyinsightsresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).

View File

@ -16,7 +16,7 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | ------ | -------- | --------------- | |----------------|------|--------|----------|-----------------|
| `organization` | path | string | true | Organization ID | | `organization` | path | string | true | Organization ID |
### Example responses ### Example responses
@ -25,37 +25,37 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members
```json ```json
[ [
{ {
"avatar_url": "string", "avatar_url": "string",
"created_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z",
"email": "string", "email": "string",
"global_roles": [ "global_roles": [
{ {
"display_name": "string", "display_name": "string",
"name": "string", "name": "string",
"organization_id": "string" "organization_id": "string"
} }
], ],
"name": "string", "name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"roles": [ "roles": [
{ {
"display_name": "string", "display_name": "string",
"name": "string", "name": "string",
"organization_id": "string" "organization_id": "string"
} }
], ],
"updated_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5", "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"username": "string" "username": "string"
} }
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|-------------------------------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.OrganizationMemberWithUserData](schemas.md#codersdkorganizationmemberwithuserdata) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.OrganizationMemberWithUserData](schemas.md#codersdkorganizationmemberwithuserdata) |
<h3 id="list-organization-members-responseschema">Response Schema</h3> <h3 id="list-organization-members-responseschema">Response Schema</h3>
@ -63,7 +63,7 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| -------------------- | ----------------- | -------- | ------------ | ----------- | |----------------------|-------------------|----------|--------------|-------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» avatar_url` | string | false | | | | `» avatar_url` | string | false | | |
| `» created_at` | string(date-time) | false | | | | `» created_at` | string(date-time) | false | | |
@ -97,7 +97,7 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | ------------ | -------- | --------------- | |----------------|------|--------------|----------|-----------------|
| `organization` | path | string(uuid) | true | Organization ID | | `organization` | path | string(uuid) | true | Organization ID |
### Example responses ### Example responses
@ -106,41 +106,41 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members
```json ```json
[ [
{ {
"assignable": true, "assignable": true,
"built_in": true, "built_in": true,
"display_name": "string", "display_name": "string",
"name": "string", "name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"organization_permissions": [ "organization_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"site_permissions": [ "site_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"user_permissions": [ "user_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
] ]
} }
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ----------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|-------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.AssignableRoles](schemas.md#codersdkassignableroles) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.AssignableRoles](schemas.md#codersdkassignableroles) |
<h3 id="get-member-roles-by-organization-responseschema">Response Schema</h3> <h3 id="get-member-roles-by-organization-responseschema">Response Schema</h3>
@ -148,7 +148,7 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| ---------------------------- | -------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------- | |------------------------------|----------------------------------------------------------|----------|--------------|-------------------------------------------------------------------------------------------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» assignable` | boolean | false | | | | `» assignable` | boolean | false | | |
| `» built_in` | boolean | false | | Built in roles are immutable | | `» built_in` | boolean | false | | Built in roles are immutable |
@ -165,7 +165,7 @@ Status Code **200**
#### Enumerated Values #### Enumerated Values
| Property | Value | | Property | Value |
| --------------- | ------------------------- | |-----------------|---------------------------|
| `action` | `application_connect` | | `action` | `application_connect` |
| `action` | `assign` | | `action` | `assign` |
| `action` | `create` | | `action` | `create` |
@ -232,36 +232,36 @@ curl -X PUT http://coder-server:8080/api/v2/organizations/{organization}/members
```json ```json
{ {
"display_name": "string", "display_name": "string",
"name": "string", "name": "string",
"organization_permissions": [ "organization_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"site_permissions": [ "site_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"user_permissions": [ "user_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
] ]
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | ------------------------------------------------------------------ | -------- | ------------------- | |----------------|------|--------------------------------------------------------------------|----------|---------------------|
| `organization` | path | string(uuid) | true | Organization ID | | `organization` | path | string(uuid) | true | Organization ID |
| `body` | body | [codersdk.CustomRoleRequest](schemas.md#codersdkcustomrolerequest) | true | Upsert role request | | `body` | body | [codersdk.CustomRoleRequest](schemas.md#codersdkcustomrolerequest) | true | Upsert role request |
@ -271,39 +271,39 @@ curl -X PUT http://coder-server:8080/api/v2/organizations/{organization}/members
```json ```json
[ [
{ {
"display_name": "string", "display_name": "string",
"name": "string", "name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"organization_permissions": [ "organization_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"site_permissions": [ "site_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"user_permissions": [ "user_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
] ]
} }
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------- | |--------|---------------------------------------------------------|-------------|---------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Role](schemas.md#codersdkrole) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Role](schemas.md#codersdkrole) |
<h3 id="upsert-a-custom-organization-role-responseschema">Response Schema</h3> <h3 id="upsert-a-custom-organization-role-responseschema">Response Schema</h3>
@ -311,7 +311,7 @@ curl -X PUT http://coder-server:8080/api/v2/organizations/{organization}/members
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| ---------------------------- | -------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------- | |------------------------------|----------------------------------------------------------|----------|--------------|-------------------------------------------------------------------------------------------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» display_name` | string | false | | | | `» display_name` | string | false | | |
| `» name` | string | false | | | | `» name` | string | false | | |
@ -326,7 +326,7 @@ Status Code **200**
#### Enumerated Values #### Enumerated Values
| Property | Value | | Property | Value |
| --------------- | ------------------------- | |-----------------|---------------------------|
| `action` | `application_connect` | | `action` | `application_connect` |
| `action` | `assign` | | `action` | `assign` |
| `action` | `create` | | `action` | `create` |
@ -393,36 +393,36 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
```json ```json
{ {
"display_name": "string", "display_name": "string",
"name": "string", "name": "string",
"organization_permissions": [ "organization_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"site_permissions": [ "site_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"user_permissions": [ "user_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
] ]
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | ------------------------------------------------------------------ | -------- | ------------------- | |----------------|------|--------------------------------------------------------------------|----------|---------------------|
| `organization` | path | string(uuid) | true | Organization ID | | `organization` | path | string(uuid) | true | Organization ID |
| `body` | body | [codersdk.CustomRoleRequest](schemas.md#codersdkcustomrolerequest) | true | Insert role request | | `body` | body | [codersdk.CustomRoleRequest](schemas.md#codersdkcustomrolerequest) | true | Insert role request |
@ -432,39 +432,39 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
```json ```json
[ [
{ {
"display_name": "string", "display_name": "string",
"name": "string", "name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"organization_permissions": [ "organization_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"site_permissions": [ "site_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"user_permissions": [ "user_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
] ]
} }
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------- | |--------|---------------------------------------------------------|-------------|---------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Role](schemas.md#codersdkrole) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Role](schemas.md#codersdkrole) |
<h3 id="insert-a-custom-organization-role-responseschema">Response Schema</h3> <h3 id="insert-a-custom-organization-role-responseschema">Response Schema</h3>
@ -472,7 +472,7 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| ---------------------------- | -------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------- | |------------------------------|----------------------------------------------------------|----------|--------------|-------------------------------------------------------------------------------------------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» display_name` | string | false | | | | `» display_name` | string | false | | |
| `» name` | string | false | | | | `» name` | string | false | | |
@ -487,7 +487,7 @@ Status Code **200**
#### Enumerated Values #### Enumerated Values
| Property | Value | | Property | Value |
| --------------- | ------------------------- | |-----------------|---------------------------|
| `action` | `application_connect` | | `action` | `application_connect` |
| `action` | `assign` | | `action` | `assign` |
| `action` | `create` | | `action` | `create` |
@ -552,7 +552,7 @@ curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization}/memb
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | ------------ | -------- | --------------- | |----------------|------|--------------|----------|-----------------|
| `organization` | path | string(uuid) | true | Organization ID | | `organization` | path | string(uuid) | true | Organization ID |
| `roleName` | path | string | true | Role name | | `roleName` | path | string | true | Role name |
@ -562,39 +562,39 @@ curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization}/memb
```json ```json
[ [
{ {
"display_name": "string", "display_name": "string",
"name": "string", "name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"organization_permissions": [ "organization_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"site_permissions": [ "site_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"user_permissions": [ "user_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
] ]
} }
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------- | |--------|---------------------------------------------------------|-------------|---------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Role](schemas.md#codersdkrole) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Role](schemas.md#codersdkrole) |
<h3 id="delete-a-custom-organization-role-responseschema">Response Schema</h3> <h3 id="delete-a-custom-organization-role-responseschema">Response Schema</h3>
@ -602,7 +602,7 @@ curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization}/memb
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| ---------------------------- | -------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------- | |------------------------------|----------------------------------------------------------|----------|--------------|-------------------------------------------------------------------------------------------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» display_name` | string | false | | | | `» display_name` | string | false | | |
| `» name` | string | false | | | | `» name` | string | false | | |
@ -617,7 +617,7 @@ Status Code **200**
#### Enumerated Values #### Enumerated Values
| Property | Value | | Property | Value |
| --------------- | ------------------------- | |-----------------|---------------------------|
| `action` | `application_connect` | | `action` | `application_connect` |
| `action` | `assign` | | `action` | `assign` |
| `action` | `create` | | `action` | `create` |
@ -682,7 +682,7 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | ------ | -------- | -------------------- | |----------------|------|--------|----------|----------------------|
| `organization` | path | string | true | Organization ID | | `organization` | path | string | true | Organization ID |
| `user` | path | string | true | User ID, name, or me | | `user` | path | string | true | User ID, name, or me |
@ -692,24 +692,24 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
```json ```json
{ {
"created_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"roles": [ "roles": [
{ {
"display_name": "string", "display_name": "string",
"name": "string", "name": "string",
"organization_id": "string" "organization_id": "string"
} }
], ],
"updated_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5" "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.OrganizationMember](schemas.md#codersdkorganizationmember) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.OrganizationMember](schemas.md#codersdkorganizationmember) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -729,14 +729,14 @@ curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization}/memb
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | ------ | -------- | -------------------- | |----------------|------|--------|----------|----------------------|
| `organization` | path | string | true | Organization ID | | `organization` | path | string | true | Organization ID |
| `user` | path | string | true | User ID, name, or me | | `user` | path | string | true | User ID, name, or me |
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | ------ | |--------|-----------------------------------------------------------------|-------------|--------|
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | | | 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -759,14 +759,16 @@ curl -X PUT http://coder-server:8080/api/v2/organizations/{organization}/members
```json ```json
{ {
"roles": ["string"] "roles": [
"string"
]
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | ------------------------------------------------------ | -------- | -------------------- | |----------------|------|--------------------------------------------------------|----------|----------------------|
| `organization` | path | string | true | Organization ID | | `organization` | path | string | true | Organization ID |
| `user` | path | string | true | User ID, name, or me | | `user` | path | string | true | User ID, name, or me |
| `body` | body | [codersdk.UpdateRoles](schemas.md#codersdkupdateroles) | true | Update roles request | | `body` | body | [codersdk.UpdateRoles](schemas.md#codersdkupdateroles) | true | Update roles request |
@ -777,24 +779,24 @@ curl -X PUT http://coder-server:8080/api/v2/organizations/{organization}/members
```json ```json
{ {
"created_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"roles": [ "roles": [
{ {
"display_name": "string", "display_name": "string",
"name": "string", "name": "string",
"organization_id": "string" "organization_id": "string"
} }
], ],
"updated_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5" "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.OrganizationMember](schemas.md#codersdkorganizationmember) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.OrganizationMember](schemas.md#codersdkorganizationmember) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -818,41 +820,41 @@ curl -X GET http://coder-server:8080/api/v2/users/roles \
```json ```json
[ [
{ {
"assignable": true, "assignable": true,
"built_in": true, "built_in": true,
"display_name": "string", "display_name": "string",
"name": "string", "name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"organization_permissions": [ "organization_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"site_permissions": [ "site_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
], ],
"user_permissions": [ "user_permissions": [
{ {
"action": "application_connect", "action": "application_connect",
"negate": true, "negate": true,
"resource_type": "*" "resource_type": "*"
} }
] ]
} }
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ----------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|-------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.AssignableRoles](schemas.md#codersdkassignableroles) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.AssignableRoles](schemas.md#codersdkassignableroles) |
<h3 id="get-site-member-roles-responseschema">Response Schema</h3> <h3 id="get-site-member-roles-responseschema">Response Schema</h3>
@ -860,7 +862,7 @@ curl -X GET http://coder-server:8080/api/v2/users/roles \
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| ---------------------------- | -------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------- | |------------------------------|----------------------------------------------------------|----------|--------------|-------------------------------------------------------------------------------------------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» assignable` | boolean | false | | | | `» assignable` | boolean | false | | |
| `» built_in` | boolean | false | | Built in roles are immutable | | `» built_in` | boolean | false | | Built in roles are immutable |
@ -877,7 +879,7 @@ Status Code **200**
#### Enumerated Values #### Enumerated Values
| Property | Value | | Property | Value |
| --------------- | ------------------------- | |-----------------|---------------------------|
| `action` | `application_connect` | | `action` | `application_connect` |
| `action` | `assign` | | `action` | `assign` |
| `action` | `create` | | `action` | `create` |

View File

@ -19,17 +19,19 @@ curl -X GET http://coder-server:8080/api/v2/notifications/dispatch-methods \
```json ```json
[ [
{ {
"available": ["string"], "available": [
"default": "string" "string"
} ],
"default": "string"
}
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|-------------------------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.NotificationMethodsResponse](schemas.md#codersdknotificationmethodsresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.NotificationMethodsResponse](schemas.md#codersdknotificationmethodsresponse) |
<h3 id="get-notification-dispatch-methods-responseschema">Response Schema</h3> <h3 id="get-notification-dispatch-methods-responseschema">Response Schema</h3>
@ -37,7 +39,7 @@ curl -X GET http://coder-server:8080/api/v2/notifications/dispatch-methods \
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| -------------- | ------ | -------- | ------------ | ----------- | |----------------|--------|----------|--------------|-------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» available` | array | false | | | | `» available` | array | false | | |
| `» default` | string | false | | | | `» default` | string | false | | |
@ -63,14 +65,14 @@ curl -X GET http://coder-server:8080/api/v2/notifications/settings \
```json ```json
{ {
"notifier_paused": true "notifier_paused": true
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.NotificationsSettings](schemas.md#codersdknotificationssettings) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.NotificationsSettings](schemas.md#codersdknotificationssettings) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -93,14 +95,14 @@ curl -X PUT http://coder-server:8080/api/v2/notifications/settings \
```json ```json
{ {
"notifier_paused": true "notifier_paused": true
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------- | -------- | ------------------------------ | |--------|------|----------------------------------------------------------------------------|----------|--------------------------------|
| `body` | body | [codersdk.NotificationsSettings](schemas.md#codersdknotificationssettings) | true | Notifications settings request | | `body` | body | [codersdk.NotificationsSettings](schemas.md#codersdknotificationssettings) | true | Notifications settings request |
### Example responses ### Example responses
@ -109,14 +111,14 @@ curl -X PUT http://coder-server:8080/api/v2/notifications/settings \
```json ```json
{ {
"notifier_paused": true "notifier_paused": true
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------- | |--------|-----------------------------------------------------------------|--------------|----------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.NotificationsSettings](schemas.md#codersdknotificationssettings) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.NotificationsSettings](schemas.md#codersdknotificationssettings) |
| 304 | [Not Modified](https://tools.ietf.org/html/rfc7232#section-4.1) | Not Modified | | | 304 | [Not Modified](https://tools.ietf.org/html/rfc7232#section-4.1) | Not Modified | |
@ -141,23 +143,23 @@ curl -X GET http://coder-server:8080/api/v2/notifications/templates/system \
```json ```json
[ [
{ {
"actions": "string", "actions": "string",
"body_template": "string", "body_template": "string",
"group": "string", "group": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"kind": "string", "kind": "string",
"method": "string", "method": "string",
"name": "string", "name": "string",
"title_template": "string" "title_template": "string"
} }
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | --------------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|-----------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.NotificationTemplate](schemas.md#codersdknotificationtemplate) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.NotificationTemplate](schemas.md#codersdknotificationtemplate) |
<h3 id="get-system-notification-templates-responseschema">Response Schema</h3> <h3 id="get-system-notification-templates-responseschema">Response Schema</h3>
@ -165,7 +167,7 @@ curl -X GET http://coder-server:8080/api/v2/notifications/templates/system \
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| ------------------ | ------------ | -------- | ------------ | ----------- | |--------------------|--------------|----------|--------------|-------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» actions` | string | false | | | | `» actions` | string | false | | |
| `» body_template` | string | false | | | | `» body_template` | string | false | | |
@ -194,7 +196,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/notifications/preferenc
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | ------ | -------- | -------------------- | |--------|------|--------|----------|----------------------|
| `user` | path | string | true | User ID, name, or me | | `user` | path | string | true | User ID, name, or me |
### Example responses ### Example responses
@ -203,18 +205,18 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/notifications/preferenc
```json ```json
[ [
{ {
"disabled": true, "disabled": true,
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"updated_at": "2019-08-24T14:15:22Z" "updated_at": "2019-08-24T14:15:22Z"
} }
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|---------------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.NotificationPreference](schemas.md#codersdknotificationpreference) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.NotificationPreference](schemas.md#codersdknotificationpreference) |
<h3 id="get-user-notification-preferences-responseschema">Response Schema</h3> <h3 id="get-user-notification-preferences-responseschema">Response Schema</h3>
@ -222,7 +224,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/notifications/preferenc
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| -------------- | ----------------- | -------- | ------------ | ----------- | |----------------|-------------------|----------|--------------|-------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» disabled` | boolean | false | | | | `» disabled` | boolean | false | | |
| `» id` | string(uuid) | false | | | | `» id` | string(uuid) | false | | |
@ -248,17 +250,17 @@ curl -X PUT http://coder-server:8080/api/v2/users/{user}/notifications/preferenc
```json ```json
{ {
"template_disabled_map": { "template_disabled_map": {
"property1": true, "property1": true,
"property2": true "property2": true
} }
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------------------------------- | -------- | -------------------- | |--------|------|----------------------------------------------------------------------------------------------------|----------|----------------------|
| `user` | path | string | true | User ID, name, or me | | `user` | path | string | true | User ID, name, or me |
| `body` | body | [codersdk.UpdateUserNotificationPreferences](schemas.md#codersdkupdateusernotificationpreferences) | true | Preferences | | `body` | body | [codersdk.UpdateUserNotificationPreferences](schemas.md#codersdkupdateusernotificationpreferences) | true | Preferences |
@ -268,18 +270,18 @@ curl -X PUT http://coder-server:8080/api/v2/users/{user}/notifications/preferenc
```json ```json
[ [
{ {
"disabled": true, "disabled": true,
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"updated_at": "2019-08-24T14:15:22Z" "updated_at": "2019-08-24T14:15:22Z"
} }
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|---------------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.NotificationPreference](schemas.md#codersdknotificationpreference) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.NotificationPreference](schemas.md#codersdknotificationpreference) |
<h3 id="update-user-notification-preferences-responseschema">Response Schema</h3> <h3 id="update-user-notification-preferences-responseschema">Response Schema</h3>
@ -287,7 +289,7 @@ curl -X PUT http://coder-server:8080/api/v2/users/{user}/notifications/preferenc
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| -------------- | ----------------- | -------- | ------------ | ----------- | |----------------|-------------------|----------|--------------|-------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» disabled` | boolean | false | | | | `» disabled` | boolean | false | | |
| `» id` | string(uuid) | false | | | | `» id` | string(uuid) | false | | |

View File

@ -18,14 +18,14 @@ curl -X POST http://coder-server:8080/api/v2/licenses \
```json ```json
{ {
"license": "string" "license": "string"
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | ------------------------------------------------------------------ | -------- | ------------------- | |--------|------|--------------------------------------------------------------------|----------|---------------------|
| `body` | body | [codersdk.AddLicenseRequest](schemas.md#codersdkaddlicenserequest) | true | Add license request | | `body` | body | [codersdk.AddLicenseRequest](schemas.md#codersdkaddlicenserequest) | true | Add license request |
### Example responses ### Example responses
@ -34,17 +34,17 @@ curl -X POST http://coder-server:8080/api/v2/licenses \
```json ```json
{ {
"claims": {}, "claims": {},
"id": 0, "id": 0,
"uploaded_at": "2019-08-24T14:15:22Z", "uploaded_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f" "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------ | ----------- | ---------------------------------------------- | |--------|--------------------------------------------------------------|-------------|------------------------------------------------|
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.License](schemas.md#codersdklicense) | | 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.License](schemas.md#codersdklicense) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -68,21 +68,21 @@ curl -X POST http://coder-server:8080/api/v2/licenses/refresh-entitlements \
```json ```json
{ {
"detail": "string", "detail": "string",
"message": "string", "message": "string",
"validations": [ "validations": [
{ {
"detail": "string", "detail": "string",
"field": "string" "field": "string"
} }
] ]
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------ | ----------- | ------------------------------------------------ | |--------|--------------------------------------------------------------|-------------|--------------------------------------------------|
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.Response](schemas.md#codersdkresponse) | | 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.Response](schemas.md#codersdkresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -106,23 +106,23 @@ curl -X GET http://coder-server:8080/api/v2/organizations \
```json ```json
[ [
{ {
"created_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z",
"description": "string", "description": "string",
"display_name": "string", "display_name": "string",
"icon": "string", "icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"is_default": true, "is_default": true,
"name": "string", "name": "string",
"updated_at": "2019-08-24T14:15:22Z" "updated_at": "2019-08-24T14:15:22Z"
} }
] ]
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ----------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|-------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Organization](schemas.md#codersdkorganization) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Organization](schemas.md#codersdkorganization) |
<h3 id="get-organizations-responseschema">Response Schema</h3> <h3 id="get-organizations-responseschema">Response Schema</h3>
@ -130,7 +130,7 @@ curl -X GET http://coder-server:8080/api/v2/organizations \
Status Code **200** Status Code **200**
| Name | Type | Required | Restrictions | Description | | Name | Type | Required | Restrictions | Description |
| ---------------- | ----------------- | -------- | ------------ | ----------- | |------------------|-------------------|----------|--------------|-------------|
| `[array item]` | array | false | | | | `[array item]` | array | false | | |
| `» created_at` | string(date-time) | true | | | | `» created_at` | string(date-time) | true | | |
| `» description` | string | false | | | | `» description` | string | false | | |
@ -161,17 +161,17 @@ curl -X POST http://coder-server:8080/api/v2/organizations \
```json ```json
{ {
"description": "string", "description": "string",
"display_name": "string", "display_name": "string",
"icon": "string", "icon": "string",
"name": "string" "name": "string"
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ------ | ---- | ---------------------------------------------------------------------------------- | -------- | --------------------------- | |--------|------|------------------------------------------------------------------------------------|----------|-----------------------------|
| `body` | body | [codersdk.CreateOrganizationRequest](schemas.md#codersdkcreateorganizationrequest) | true | Create organization request | | `body` | body | [codersdk.CreateOrganizationRequest](schemas.md#codersdkcreateorganizationrequest) | true | Create organization request |
### Example responses ### Example responses
@ -180,21 +180,21 @@ curl -X POST http://coder-server:8080/api/v2/organizations \
```json ```json
{ {
"created_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z",
"description": "string", "description": "string",
"display_name": "string", "display_name": "string",
"icon": "string", "icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"is_default": true, "is_default": true,
"name": "string", "name": "string",
"updated_at": "2019-08-24T14:15:22Z" "updated_at": "2019-08-24T14:15:22Z"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------ | ----------- | -------------------------------------------------------- | |--------|--------------------------------------------------------------|-------------|----------------------------------------------------------|
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.Organization](schemas.md#codersdkorganization) | | 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.Organization](schemas.md#codersdkorganization) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -215,7 +215,7 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization} \
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | ------------ | -------- | --------------- | |----------------|------|--------------|----------|-----------------|
| `organization` | path | string(uuid) | true | Organization ID | | `organization` | path | string(uuid) | true | Organization ID |
### Example responses ### Example responses
@ -224,21 +224,21 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization} \
```json ```json
{ {
"created_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z",
"description": "string", "description": "string",
"display_name": "string", "display_name": "string",
"icon": "string", "icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"is_default": true, "is_default": true,
"name": "string", "name": "string",
"updated_at": "2019-08-24T14:15:22Z" "updated_at": "2019-08-24T14:15:22Z"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Organization](schemas.md#codersdkorganization) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Organization](schemas.md#codersdkorganization) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -259,7 +259,7 @@ curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization} \
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | ------ | -------- | ----------------------- | |----------------|------|--------|----------|-------------------------|
| `organization` | path | string | true | Organization ID or name | | `organization` | path | string | true | Organization ID or name |
### Example responses ### Example responses
@ -268,21 +268,21 @@ curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization} \
```json ```json
{ {
"detail": "string", "detail": "string",
"message": "string", "message": "string",
"validations": [ "validations": [
{ {
"detail": "string", "detail": "string",
"field": "string" "field": "string"
} }
] ]
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------ | |--------|---------------------------------------------------------|-------------|--------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Response](schemas.md#codersdkresponse) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Response](schemas.md#codersdkresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -305,17 +305,17 @@ curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization} \
```json ```json
{ {
"description": "string", "description": "string",
"display_name": "string", "display_name": "string",
"icon": "string", "icon": "string",
"name": "string" "name": "string"
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| -------------- | ---- | ---------------------------------------------------------------------------------- | -------- | -------------------------- | |----------------|------|------------------------------------------------------------------------------------|----------|----------------------------|
| `organization` | path | string | true | Organization ID or name | | `organization` | path | string | true | Organization ID or name |
| `body` | body | [codersdk.UpdateOrganizationRequest](schemas.md#codersdkupdateorganizationrequest) | true | Patch organization request | | `body` | body | [codersdk.UpdateOrganizationRequest](schemas.md#codersdkupdateorganizationrequest) | true | Patch organization request |
@ -325,21 +325,21 @@ curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization} \
```json ```json
{ {
"created_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z",
"description": "string", "description": "string",
"display_name": "string", "display_name": "string",
"icon": "string", "icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"is_default": true, "is_default": true,
"name": "string", "name": "string",
"updated_at": "2019-08-24T14:15:22Z" "updated_at": "2019-08-24T14:15:22Z"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|----------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Organization](schemas.md#codersdkorganization) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Organization](schemas.md#codersdkorganization) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).

View File

@ -17,22 +17,22 @@ curl -X DELETE http://coder-server:8080/api/v2/workspaces/{workspace}/port-share
```json ```json
{ {
"agent_name": "string", "agent_name": "string",
"port": 0 "port": 0
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ----------- | ---- | -------------------------------------------------------------------------------------------------------- | -------- | --------------------------------- | |-------------|------|----------------------------------------------------------------------------------------------------------|----------|-----------------------------------|
| `workspace` | path | string(uuid) | true | Workspace ID | | `workspace` | path | string(uuid) | true | Workspace ID |
| `body` | body | [codersdk.DeleteWorkspaceAgentPortShareRequest](schemas.md#codersdkdeleteworkspaceagentportsharerequest) | true | Delete port sharing level request | | `body` | body | [codersdk.DeleteWorkspaceAgentPortShareRequest](schemas.md#codersdkdeleteworkspaceagentportsharerequest) | true | Delete port sharing level request |
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ | |--------|---------------------------------------------------------|-------------|--------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).
@ -55,17 +55,17 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/port-share \
```json ```json
{ {
"agent_name": "string", "agent_name": "string",
"port": 0, "port": 0,
"protocol": "http", "protocol": "http",
"share_level": "owner" "share_level": "owner"
} }
``` ```
### Parameters ### Parameters
| Name | In | Type | Required | Description | | Name | In | Type | Required | Description |
| ----------- | ---- | -------------------------------------------------------------------------------------------------------- | -------- | --------------------------------- | |-------------|------|----------------------------------------------------------------------------------------------------------|----------|-----------------------------------|
| `workspace` | path | string(uuid) | true | Workspace ID | | `workspace` | path | string(uuid) | true | Workspace ID |
| `body` | body | [codersdk.UpsertWorkspaceAgentPortShareRequest](schemas.md#codersdkupsertworkspaceagentportsharerequest) | true | Upsert port sharing level request | | `body` | body | [codersdk.UpsertWorkspaceAgentPortShareRequest](schemas.md#codersdkupsertworkspaceagentportsharerequest) | true | Upsert port sharing level request |
@ -75,18 +75,18 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/port-share \
```json ```json
{ {
"agent_name": "string", "agent_name": "string",
"port": 0, "port": 0,
"protocol": "http", "protocol": "http",
"share_level": "owner", "share_level": "owner",
"workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9" "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9"
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------ | |--------|---------------------------------------------------------|-------------|--------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceAgentPortShare](schemas.md#codersdkworkspaceagentportshare) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceAgentPortShare](schemas.md#codersdkworkspaceagentportshare) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -19,24 +19,24 @@ curl -X GET http://coder-server:8080/api/v2/regions \
```json ```json
{ {
"regions": [ "regions": [
{ {
"display_name": "string", "display_name": "string",
"healthy": true, "healthy": true,
"icon_url": "string", "icon_url": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string", "name": "string",
"path_app_url": "string", "path_app_url": "string",
"wildcard_hostname": "string" "wildcard_hostname": "string"
} }
] ]
} }
``` ```
### Responses ### Responses
| Status | Meaning | Description | Schema | | Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------- | |--------|---------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.RegionsResponse-codersdk_Region](schemas.md#codersdkregionsresponse-codersdk_region) | | 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.RegionsResponse-codersdk_Region](schemas.md#codersdkregionsresponse-codersdk_region) |
To perform this operation, you must be authenticated. [Learn more](authentication.md). To perform this operation, you must be authenticated. [Learn more](authentication.md).

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,4 @@
<!-- DO NOT EDIT | GENERATED CONTENT --> <!-- DO NOT EDIT | GENERATED CONTENT -->
# autoupdate # autoupdate
Toggle auto-update policy for a workspace Toggle auto-update policy for a workspace
@ -15,7 +14,7 @@ coder autoupdate [flags] <workspace> <always|never>
### -y, --yes ### -y, --yes
| | | | | |
| ---- | ----------------- | |------|-------------------|
| Type | <code>bool</code> | | Type | <code>bool</code> |
Bypass prompts. Bypass prompts.

View File

@ -1,5 +1,4 @@
<!-- DO NOT EDIT | GENERATED CONTENT --> <!-- DO NOT EDIT | GENERATED CONTENT -->
# completion # completion
Install or update shell completion scripts for the detected or chosen shell. Install or update shell completion scripts for the detected or chosen shell.
@ -15,7 +14,7 @@ coder completion [flags]
### -s, --shell ### -s, --shell
| | | | | |
| ---- | ---------------------------------------- | |------|------------------------------------------|
| Type | <code>bash\|fish\|zsh\|powershell</code> | | Type | <code>bash\|fish\|zsh\|powershell</code> |
The shell to install completion for. The shell to install completion for.
@ -23,7 +22,7 @@ The shell to install completion for.
### -p, --print ### -p, --print
| | | | | |
| ---- | ----------------- | |------|-------------------|
| Type | <code>bool</code> | | Type | <code>bool</code> |
Print the completion script instead of installing it. Print the completion script instead of installing it.

View File

@ -1,5 +1,4 @@
<!-- DO NOT EDIT | GENERATED CONTENT --> <!-- DO NOT EDIT | GENERATED CONTENT -->
# config-ssh # config-ssh
Add an SSH Host entry for your workspaces "ssh coder.workspace" Add an SSH Host entry for your workspaces "ssh coder.workspace"
@ -28,7 +27,7 @@ workspaces:
### --ssh-config-file ### --ssh-config-file
| | | | | |
| ----------- | ----------------------------------- | |-------------|-------------------------------------|
| Type | <code>string</code> | | Type | <code>string</code> |
| Environment | <code>$CODER_SSH_CONFIG_FILE</code> | | Environment | <code>$CODER_SSH_CONFIG_FILE</code> |
| Default | <code>~/.ssh/config</code> | | Default | <code>~/.ssh/config</code> |
@ -38,7 +37,7 @@ Specifies the path to an SSH config.
### --coder-binary-path ### --coder-binary-path
| | | | | |
| ----------- | ------------------------------------------ | |-------------|--------------------------------------------|
| Type | <code>string</code> | | Type | <code>string</code> |
| Environment | <code>$CODER_SSH_CONFIG_BINARY_PATH</code> | | Environment | <code>$CODER_SSH_CONFIG_BINARY_PATH</code> |
@ -47,7 +46,7 @@ Optionally specify the absolute path to the coder binary used in ProxyCommand. B
### -o, --ssh-option ### -o, --ssh-option
| | | | | |
| ----------- | ----------------------------------- | |-------------|-------------------------------------|
| Type | <code>string-array</code> | | Type | <code>string-array</code> |
| Environment | <code>$CODER_SSH_CONFIG_OPTS</code> | | Environment | <code>$CODER_SSH_CONFIG_OPTS</code> |
@ -56,7 +55,7 @@ Specifies additional SSH options to embed in each host stanza.
### -n, --dry-run ### -n, --dry-run
| | | | | |
| ----------- | ------------------------------- | |-------------|---------------------------------|
| Type | <code>bool</code> | | Type | <code>bool</code> |
| Environment | <code>$CODER_SSH_DRY_RUN</code> | | Environment | <code>$CODER_SSH_DRY_RUN</code> |
@ -65,7 +64,7 @@ Perform a trial run with no changes made, showing a diff at the end.
### --use-previous-options ### --use-previous-options
| | | | | |
| ----------- | -------------------------------------------- | |-------------|----------------------------------------------|
| Type | <code>bool</code> | | Type | <code>bool</code> |
| Environment | <code>$CODER_SSH_USE_PREVIOUS_OPTIONS</code> | | Environment | <code>$CODER_SSH_USE_PREVIOUS_OPTIONS</code> |
@ -74,7 +73,7 @@ Specifies whether or not to keep options from previous run of config-ssh.
### --ssh-host-prefix ### --ssh-host-prefix
| | | | | |
| ----------- | --------------------------------------------- | |-------------|-----------------------------------------------|
| Type | <code>string</code> | | Type | <code>string</code> |
| Environment | <code>$CODER_CONFIGSSH_SSH_HOST_PREFIX</code> | | Environment | <code>$CODER_CONFIGSSH_SSH_HOST_PREFIX</code> |
@ -83,7 +82,7 @@ Override the default host prefix.
### --wait ### --wait
| | | | | |
| ----------- | ---------------------------------- | |-------------|------------------------------------|
| Type | <code>yes\|no\|auto</code> | | Type | <code>yes\|no\|auto</code> |
| Environment | <code>$CODER_CONFIGSSH_WAIT</code> | | Environment | <code>$CODER_CONFIGSSH_WAIT</code> |
| Default | <code>auto</code> | | Default | <code>auto</code> |
@ -93,7 +92,7 @@ Specifies whether or not to wait for the startup script to finish executing. Aut
### --disable-autostart ### --disable-autostart
| | | | | |
| ----------- | ----------------------------------------------- | |-------------|-------------------------------------------------|
| Type | <code>bool</code> | | Type | <code>bool</code> |
| Environment | <code>$CODER_CONFIGSSH_DISABLE_AUTOSTART</code> | | Environment | <code>$CODER_CONFIGSSH_DISABLE_AUTOSTART</code> |
| Default | <code>false</code> | | Default | <code>false</code> |
@ -103,7 +102,7 @@ Disable starting the workspace automatically when connecting via SSH.
### -y, --yes ### -y, --yes
| | | | | |
| ---- | ----------------- | |------|-------------------|
| Type | <code>bool</code> | | Type | <code>bool</code> |
Bypass prompts. Bypass prompts.

View File

@ -1,5 +1,4 @@
<!-- DO NOT EDIT | GENERATED CONTENT --> <!-- DO NOT EDIT | GENERATED CONTENT -->
# create # create
Create a workspace Create a workspace
@ -23,7 +22,7 @@ coder create [flags] [workspace]
### -t, --template ### -t, --template
| | | | | |
| ----------- | --------------------------------- | |-------------|-----------------------------------|
| Type | <code>string</code> | | Type | <code>string</code> |
| Environment | <code>$CODER_TEMPLATE_NAME</code> | | Environment | <code>$CODER_TEMPLATE_NAME</code> |
@ -32,7 +31,7 @@ Specify a template name.
### --template-version ### --template-version
| | | | | |
| ----------- | ------------------------------------ | |-------------|--------------------------------------|
| Type | <code>string</code> | | Type | <code>string</code> |
| Environment | <code>$CODER_TEMPLATE_VERSION</code> | | Environment | <code>$CODER_TEMPLATE_VERSION</code> |
@ -41,7 +40,7 @@ Specify a template version name.
### --start-at ### --start-at
| | | | | |
| ----------- | -------------------------------------- | |-------------|----------------------------------------|
| Type | <code>string</code> | | Type | <code>string</code> |
| Environment | <code>$CODER_WORKSPACE_START_AT</code> | | Environment | <code>$CODER_WORKSPACE_START_AT</code> |
@ -50,7 +49,7 @@ Specify the workspace autostart schedule. Check coder schedule start --help for
### --stop-after ### --stop-after
| | | | | |
| ----------- | ---------------------------------------- | |-------------|------------------------------------------|
| Type | <code>duration</code> | | Type | <code>duration</code> |
| Environment | <code>$CODER_WORKSPACE_STOP_AFTER</code> | | Environment | <code>$CODER_WORKSPACE_STOP_AFTER</code> |
@ -59,7 +58,7 @@ Specify a duration after which the workspace should shut down (e.g. 8h).
### --automatic-updates ### --automatic-updates
| | | | | |
| ----------- | ----------------------------------------------- | |-------------|-------------------------------------------------|
| Type | <code>string</code> | | Type | <code>string</code> |
| Environment | <code>$CODER_WORKSPACE_AUTOMATIC_UPDATES</code> | | Environment | <code>$CODER_WORKSPACE_AUTOMATIC_UPDATES</code> |
| Default | <code>never</code> | | Default | <code>never</code> |
@ -69,7 +68,7 @@ Specify automatic updates setting for the workspace (accepts 'always' or 'never'
### --copy-parameters-from ### --copy-parameters-from
| | | | | |
| ----------- | -------------------------------------------------- | |-------------|----------------------------------------------------|
| Type | <code>string</code> | | Type | <code>string</code> |
| Environment | <code>$CODER_WORKSPACE_COPY_PARAMETERS_FROM</code> | | Environment | <code>$CODER_WORKSPACE_COPY_PARAMETERS_FROM</code> |
@ -78,7 +77,7 @@ Specify the source workspace name to copy parameters from.
### -y, --yes ### -y, --yes
| | | | | |
| ---- | ----------------- | |------|-------------------|
| Type | <code>bool</code> | | Type | <code>bool</code> |
Bypass prompts. Bypass prompts.
@ -86,7 +85,7 @@ Bypass prompts.
### --parameter ### --parameter
| | | | | |
| ----------- | ---------------------------------- | |-------------|------------------------------------|
| Type | <code>string-array</code> | | Type | <code>string-array</code> |
| Environment | <code>$CODER_RICH_PARAMETER</code> | | Environment | <code>$CODER_RICH_PARAMETER</code> |
@ -95,7 +94,7 @@ Rich parameter value in the format "name=value".
### --rich-parameter-file ### --rich-parameter-file
| | | | | |
| ----------- | --------------------------------------- | |-------------|-----------------------------------------|
| Type | <code>string</code> | | Type | <code>string</code> |
| Environment | <code>$CODER_RICH_PARAMETER_FILE</code> | | Environment | <code>$CODER_RICH_PARAMETER_FILE</code> |
@ -104,7 +103,7 @@ Specify a file path with values for rich parameters defined in the template. The
### --parameter-default ### --parameter-default
| | | | | |
| ----------- | ------------------------------------------ | |-------------|--------------------------------------------|
| Type | <code>string-array</code> | | Type | <code>string-array</code> |
| Environment | <code>$CODER_RICH_PARAMETER_DEFAULT</code> | | Environment | <code>$CODER_RICH_PARAMETER_DEFAULT</code> |
@ -113,7 +112,7 @@ Rich parameter default values in the format "name=value".
### -O, --org ### -O, --org
| | | | | |
| ----------- | -------------------------------- | |-------------|----------------------------------|
| Type | <code>string</code> | | Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> | | Environment | <code>$CODER_ORGANIZATION</code> |

View File

@ -1,12 +1,11 @@
<!-- DO NOT EDIT | GENERATED CONTENT --> <!-- DO NOT EDIT | GENERATED CONTENT -->
# delete # delete
Delete a workspace Delete a workspace
Aliases: Aliases:
- rm * rm
## Usage ## Usage
@ -27,7 +26,7 @@ coder delete [flags] <workspace>
### --orphan ### --orphan
| | | | | |
| ---- | ----------------- | |------|-------------------|
| Type | <code>bool</code> | | Type | <code>bool</code> |
Delete a workspace without deleting its resources. This can delete a workspace in a broken state, but may also lead to unaccounted cloud resources. Delete a workspace without deleting its resources. This can delete a workspace in a broken state, but may also lead to unaccounted cloud resources.
@ -35,7 +34,7 @@ Delete a workspace without deleting its resources. This can delete a workspace i
### -y, --yes ### -y, --yes
| | | | | |
| ---- | ----------------- | |------|-------------------|
| Type | <code>bool</code> | | Type | <code>bool</code> |
Bypass prompts. Bypass prompts.

Some files were not shown because too many files have changed in this diff Show More