docs: move api and cli docs routes to reference/ (#14241)

This commit is contained in:
Muhammad Atif Ali
2024-08-13 18:39:46 +03:00
committed by GitHub
parent 6f9b1a39f4
commit 48f29a1995
145 changed files with 4121 additions and 3448 deletions
+6
View File
@@ -0,0 +1,6 @@
# Reference
Autogenerated documentation around Coder.
- [REST API](./api)
- [Command Line](./cli)
+27
View File
@@ -0,0 +1,27 @@
Get started with the Coder API:
## Quickstart
Generate a token on your Coder deployment by visiting:
```shell
https://coder.example.com/settings/tokens
```
List your workspaces
```shell
# CLI
curl https://coder.example.com/api/v2/workspaces?q=owner:me \
-H "Coder-Session-Token: <your-token>"
```
## Use cases
See some common [use cases](../../admin/automation.md#use-cases) for the REST API.
## Sections
<children>
This page is rendered on https://coder.com/docs/reference/api. Refer to the other documents in the `api/` directory.
</children>
+846
View File
@@ -0,0 +1,846 @@
# Agents
## Get DERP map updates
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/derp-map \
-H 'Coder-Session-Token: API_KEY'
```
`GET /derp-map`
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------------------ | ------------------- | ------ |
| 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).
## Authenticate agent on AWS instance
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/workspaceagents/aws-instance-identity \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /workspaceagents/aws-instance-identity`
> Body parameter
```json
{
"document": "string",
"signature": "string"
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------------- | -------- | ----------------------- |
| `body` | body | [agentsdk.AWSInstanceIdentityToken](schemas.md#agentsdkawsinstanceidentitytoken) | true | Instance identity token |
### Example responses
> 200 Response
```json
{
"session_token": "string"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ |
| 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).
## Authenticate agent on Azure instance
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/workspaceagents/azure-instance-identity \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /workspaceagents/azure-instance-identity`
> Body parameter
```json
{
"encoding": "string",
"signature": "string"
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | ------------------------------------------------------------------------------------ | -------- | ----------------------- |
| `body` | body | [agentsdk.AzureInstanceIdentityToken](schemas.md#agentsdkazureinstanceidentitytoken) | true | Instance identity token |
### Example responses
> 200 Response
```json
{
"session_token": "string"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ |
| 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).
## Authenticate agent on Google Cloud instance
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/workspaceagents/google-instance-identity \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /workspaceagents/google-instance-identity`
> Body parameter
```json
{
"json_web_token": "string"
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------------------- | -------- | ----------------------- |
| `body` | body | [agentsdk.GoogleInstanceIdentityToken](schemas.md#agentsdkgoogleinstanceidentitytoken) | true | Instance identity token |
### Example responses
> 200 Response
```json
{
"session_token": "string"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ |
| 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).
## Get workspace agent external auth
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/external-auth?match=string&id=string \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /workspaceagents/me/external-auth`
### Parameters
| Name | In | Type | Required | Description |
| -------- | ----- | ------- | -------- | --------------------------------- |
| `match` | query | string | true | Match |
| `id` | query | string | true | Provider ID |
| `listen` | query | boolean | false | Wait for a new token to be issued |
### Example responses
> 200 Response
```json
{
"access_token": "string",
"password": "string",
"token_extra": {},
"type": "string",
"url": "string",
"username": "string"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ |
| 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).
## Removed: Get workspace agent git auth
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/gitauth?match=string&id=string \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /workspaceagents/me/gitauth`
### Parameters
| Name | In | Type | Required | Description |
| -------- | ----- | ------- | -------- | --------------------------------- |
| `match` | query | string | true | Match |
| `id` | query | string | true | Provider ID |
| `listen` | query | boolean | false | Wait for a new token to be issued |
### Example responses
> 200 Response
```json
{
"access_token": "string",
"password": "string",
"token_extra": {},
"type": "string",
"url": "string",
"username": "string"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ |
| 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).
## Get workspace agent Git SSH key
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/gitsshkey \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /workspaceagents/me/gitsshkey`
### Example responses
> 200 Response
```json
{
"private_key": "string",
"public_key": "string"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------- |
| 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).
## Post workspace agent log source
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/workspaceagents/me/log-source \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /workspaceagents/me/log-source`
> Body parameter
```json
{
"display_name": "string",
"icon": "string",
"id": "string"
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | ------------------------------------------------------------------------ | -------- | ------------------ |
| `body` | body | [agentsdk.PostLogSourceRequest](schemas.md#agentsdkpostlogsourcerequest) | true | Log source request |
### Example responses
> 200 Response
```json
{
"created_at": "2019-08-24T14:15:22Z",
"display_name": "string",
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------ |
| 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).
## Patch workspace agent logs
### Code samples
```shell
# Example request using curl
curl -X PATCH http://coder-server:8080/api/v2/workspaceagents/me/logs \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`PATCH /workspaceagents/me/logs`
> Body parameter
```json
{
"log_source_id": "string",
"logs": [
{
"created_at": "string",
"level": "trace",
"output": "string"
}
]
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------- | -------- | ----------- |
| `body` | body | [agentsdk.PatchLogs](schemas.md#agentsdkpatchlogs) | true | logs |
### Example responses
> 200 Response
```json
{
"detail": "string",
"message": "string",
"validations": [
{
"detail": "string",
"field": "string"
}
]
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------ |
| 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).
## Get workspace agent by ID
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /workspaceagents/{workspaceagent}`
### Parameters
| Name | In | Type | Required | Description |
| ---------------- | ---- | ------------ | -------- | ------------------ |
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
### Example responses
> 200 Response
```json
{
"api_version": "string",
"apps": [
{
"command": "string",
"display_name": "string",
"external": true,
"health": "disabled",
"healthcheck": {
"interval": 0,
"threshold": 0,
"url": "string"
},
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
"subdomain_name": "string",
"url": "string"
}
],
"architecture": "string",
"connection_timeout_seconds": 0,
"created_at": "2019-08-24T14:15:22Z",
"directory": "string",
"disconnected_at": "2019-08-24T14:15:22Z",
"display_apps": ["vscode"],
"environment_variables": {
"property1": "string",
"property2": "string"
},
"expanded_directory": "string",
"first_connected_at": "2019-08-24T14:15:22Z",
"health": {
"healthy": false,
"reason": "agent has lost connection"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"instance_id": "string",
"last_connected_at": "2019-08-24T14:15:22Z",
"latency": {
"property1": {
"latency_ms": 0,
"preferred": true
},
"property2": {
"latency_ms": 0,
"preferred": true
}
},
"lifecycle_state": "created",
"log_sources": [
{
"created_at": "2019-08-24T14:15:22Z",
"display_name": "string",
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
}
],
"logs_length": 0,
"logs_overflowed": true,
"name": "string",
"operating_system": "string",
"ready_at": "2019-08-24T14:15:22Z",
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
"scripts": [
{
"cron": "string",
"log_path": "string",
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
"run_on_start": true,
"run_on_stop": true,
"script": "string",
"start_blocks_login": true,
"timeout": 0
}
],
"started_at": "2019-08-24T14:15:22Z",
"startup_script_behavior": "blocking",
"status": "connecting",
"subsystems": ["envbox"],
"troubleshooting_url": "string",
"updated_at": "2019-08-24T14:15:22Z",
"version": "string"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------ |
| 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).
## Get connection info for workspace agent
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/connection \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /workspaceagents/{workspaceagent}/connection`
### Parameters
| Name | In | Type | Required | Description |
| ---------------- | ---- | ------------ | -------- | ------------------ |
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
### Example responses
> 200 Response
```json
{
"derp_force_websockets": true,
"derp_map": {
"homeParams": {
"regionScore": {
"property1": 0,
"property2": 0
}
},
"omitDefaultRegions": true,
"regions": {
"property1": {
"avoid": true,
"embeddedRelay": true,
"nodes": [
{
"canPort80": true,
"certName": "string",
"derpport": 0,
"forceHTTP": true,
"hostName": "string",
"insecureForTests": true,
"ipv4": "string",
"ipv6": "string",
"name": "string",
"regionID": 0,
"stunonly": true,
"stunport": 0,
"stuntestIP": "string"
}
],
"regionCode": "string",
"regionID": 0,
"regionName": "string"
},
"property2": {
"avoid": true,
"embeddedRelay": true,
"nodes": [
{
"canPort80": true,
"certName": "string",
"derpport": 0,
"forceHTTP": true,
"hostName": "string",
"insecureForTests": true,
"ipv4": "string",
"ipv6": "string",
"name": "string",
"regionID": 0,
"stunonly": true,
"stunport": 0,
"stuntestIP": "string"
}
],
"regionCode": "string",
"regionID": 0,
"regionName": "string"
}
}
},
"disable_direct_connections": true
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------ |
| 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).
## Coordinate workspace agent
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/coordinate \
-H 'Coder-Session-Token: API_KEY'
```
`GET /workspaceagents/{workspaceagent}/coordinate`
### Parameters
| Name | In | Type | Required | Description |
| ---------------- | ---- | ------------ | -------- | ------------------ |
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------------------ | ------------------- | ------ |
| 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).
## Get listening ports for workspace agent
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/listening-ports \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /workspaceagents/{workspaceagent}/listening-ports`
### Parameters
| Name | In | Type | Required | Description |
| ---------------- | ---- | ------------ | -------- | ------------------ |
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
### Example responses
> 200 Response
```json
{
"ports": [
{
"network": "string",
"port": 0,
"process_name": "string"
}
]
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------- |
| 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).
## Get logs by workspace agent
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/logs \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /workspaceagents/{workspaceagent}/logs`
### Parameters
| Name | In | Type | Required | Description |
| ---------------- | ----- | ------------ | -------- | -------------------------------------------- |
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
| `before` | query | integer | false | Before log id |
| `after` | query | integer | false | After log id |
| `follow` | query | boolean | false | Follow log stream |
| `no_compression` | query | boolean | false | Disable compression for WebSocket connection |
### Example responses
> 200 Response
```json
[
{
"created_at": "2019-08-24T14:15:22Z",
"id": 0,
"level": "trace",
"output": "string",
"source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81"
}
]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | --------------------------------------------------------------------------- |
| 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>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| -------------- | ------------------------------------------------ | -------- | ------------ | ----------- |
| `[array item]` | array | false | | |
| `» created_at` | string(date-time) | false | | |
| `» id` | integer | false | | |
| `» level` | [codersdk.LogLevel](schemas.md#codersdkloglevel) | false | | |
| `» output` | string | false | | |
| `» source_id` | string(uuid) | false | | |
#### Enumerated Values
| Property | Value |
| -------- | ------- |
| `level` | `trace` |
| `level` | `debug` |
| `level` | `info` |
| `level` | `warn` |
| `level` | `error` |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Open PTY to workspace agent
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/pty \
-H 'Coder-Session-Token: API_KEY'
```
`GET /workspaceagents/{workspaceagent}/pty`
### Parameters
| Name | In | Type | Required | Description |
| ---------------- | ---- | ------------ | -------- | ------------------ |
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------------------ | ------------------- | ------ |
| 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).
## Removed: Get logs by workspace agent
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/startup-logs \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /workspaceagents/{workspaceagent}/startup-logs`
### Parameters
| Name | In | Type | Required | Description |
| ---------------- | ----- | ------------ | -------- | -------------------------------------------- |
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
| `before` | query | integer | false | Before log id |
| `after` | query | integer | false | After log id |
| `follow` | query | boolean | false | Follow log stream |
| `no_compression` | query | boolean | false | Disable compression for WebSocket connection |
### Example responses
> 200 Response
```json
[
{
"created_at": "2019-08-24T14:15:22Z",
"id": 0,
"level": "trace",
"output": "string",
"source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81"
}
]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | --------------------------------------------------------------------------- |
| 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>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| -------------- | ------------------------------------------------ | -------- | ------------ | ----------- |
| `[array item]` | array | false | | |
| `» created_at` | string(date-time) | false | | |
| `» id` | integer | false | | |
| `» level` | [codersdk.LogLevel](schemas.md#codersdkloglevel) | false | | |
| `» output` | string | false | | |
| `» source_id` | string(uuid) | false | | |
#### Enumerated Values
| Property | Value |
| -------- | ------- |
| `level` | `trace` |
| `level` | `debug` |
| `level` | `info` |
| `level` | `warn` |
| `level` | `error` |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
+58
View File
@@ -0,0 +1,58 @@
# Applications
## Redirect to URI with encrypted API key
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/applications/auth-redirect \
-H 'Coder-Session-Token: API_KEY'
```
`GET /applications/auth-redirect`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ----- | ------ | -------- | -------------------- |
| `redirect_uri` | query | string | false | Redirect destination |
### Responses
| Status | Meaning | Description | Schema |
| ------ | ----------------------------------------------------------------------- | ------------------ | ------ |
| 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).
## Get applications host
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/applications/host \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /applications/host`
### Example responses
> 200 Response
```json
{
"host": "string"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------- |
| 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).
+99
View File
@@ -0,0 +1,99 @@
# Audit
## Get audit logs
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/audit?limit=0 \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /audit`
### Parameters
| Name | In | Type | Required | Description |
| -------- | ----- | ------- | -------- | ------------ |
| `q` | query | string | false | Search query |
| `limit` | query | integer | true | Page limit |
| `offset` | query | integer | false | Page offset |
### Example responses
> 200 Response
```json
{
"audit_logs": [
{
"action": "create",
"additional_fields": [0],
"description": "string",
"diff": {
"property1": {
"new": null,
"old": null,
"secret": true
},
"property2": {
"new": null,
"old": null,
"secret": true
}
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"ip": "string",
"is_deleted": true,
"organization": {
"display_name": "string",
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string"
},
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
"resource_icon": "string",
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
"resource_link": "string",
"resource_target": "string",
"resource_type": "template",
"status_code": 0,
"time": "2019-08-24T14:15:22Z",
"user": {
"avatar_url": "http://example.com",
"created_at": "2019-08-24T14:15:22Z",
"email": "user@example.com",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"last_seen_at": "2019-08-24T14:15:22Z",
"login_type": "",
"name": "string",
"organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
"roles": [
{
"display_name": "string",
"name": "string",
"organization_id": "string"
}
],
"status": "active",
"theme_preference": "string",
"updated_at": "2019-08-24T14:15:22Z",
"username": "string"
},
"user_agent": "string"
}
],
"count": 0
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------- |
| 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).
+14
View File
@@ -0,0 +1,14 @@
# Authentication
Long-lived tokens can be generated to perform actions on behalf of your user account:
```shell
coder tokens create
```
You can use tokens with the Coder's REST API using the `Coder-Session-Token` HTTP header.
```console
curl 'http://coder-server:8080/api/v2/workspaces' \
-H 'Coder-Session-Token: *****'
```
+164
View File
@@ -0,0 +1,164 @@
# Authorization
## Check authorization
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/authcheck \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /authcheck`
> Body parameter
```json
{
"checks": {
"property1": {
"action": "create",
"object": {
"any_org": true,
"organization_id": "string",
"owner_id": "string",
"resource_id": "string",
"resource_type": "*"
}
},
"property2": {
"action": "create",
"object": {
"any_org": true,
"organization_id": "string",
"owner_id": "string",
"resource_id": "string",
"resource_type": "*"
}
}
}
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | ------------------------------------------------------------------------ | -------- | --------------------- |
| `body` | body | [codersdk.AuthorizationRequest](schemas.md#codersdkauthorizationrequest) | true | Authorization request |
### Example responses
> 200 Response
```json
{
"property1": true,
"property2": true
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------- |
| 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).
## Log in user
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/users/login \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
```
`POST /users/login`
> Body parameter
```json
{
"email": "user@example.com",
"password": "string"
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------------- | -------- | ------------- |
| `body` | body | [codersdk.LoginWithPasswordRequest](schemas.md#codersdkloginwithpasswordrequest) | true | Login request |
### Example responses
> 201 Response
```json
{
"session_token": "string"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------ | ----------- | ---------------------------------------------------------------------------------- |
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.LoginWithPasswordResponse](schemas.md#codersdkloginwithpasswordresponse) |
## Convert user from password to oauth authentication
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/users/{user}/convert-login \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /users/{user}/convert-login`
> Body parameter
```json
{
"password": "string",
"to_type": ""
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | ---------------------------------------------------------------------- | -------- | -------------------- |
| `user` | path | string | true | User ID, name, or me |
| `body` | body | [codersdk.ConvertLoginRequest](schemas.md#codersdkconvertloginrequest) | true | Convert request |
### Example responses
> 201 Response
```json
{
"expires_at": "2019-08-24T14:15:22Z",
"state_string": "string",
"to_type": "",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |
| 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).
+1544
View File
File diff suppressed because it is too large Load Diff
+480
View File
@@ -0,0 +1,480 @@
# Debug
## Debug Info Wireguard Coordinator
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/debug/coordinator \
-H 'Coder-Session-Token: API_KEY'
```
`GET /debug/coordinator`
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ |
| 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).
## Debug Info Deployment Health
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/debug/health \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /debug/health`
### Parameters
| Name | In | Type | Required | Description |
| ------- | ----- | ------- | -------- | -------------------------- |
| `force` | query | boolean | false | Force a healthcheck to run |
### Example responses
> 200 Response
```json
{
"access_url": {
"access_url": "string",
"dismissed": true,
"error": "string",
"healthy": true,
"healthz_response": "string",
"reachable": true,
"severity": "ok",
"status_code": 0,
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
},
"coder_version": "string",
"database": {
"dismissed": true,
"error": "string",
"healthy": true,
"latency": "string",
"latency_ms": 0,
"reachable": true,
"severity": "ok",
"threshold_ms": 0,
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
},
"derp": {
"dismissed": true,
"error": "string",
"healthy": true,
"netcheck": {
"captivePortal": "string",
"globalV4": "string",
"globalV6": "string",
"hairPinning": "string",
"icmpv4": true,
"ipv4": true,
"ipv4CanSend": true,
"ipv6": true,
"ipv6CanSend": true,
"mappingVariesByDestIP": "string",
"oshasIPv6": true,
"pcp": "string",
"pmp": "string",
"preferredDERP": 0,
"regionLatency": {
"property1": 0,
"property2": 0
},
"regionV4Latency": {
"property1": 0,
"property2": 0
},
"regionV6Latency": {
"property1": 0,
"property2": 0
},
"udp": true,
"upnP": "string"
},
"netcheck_err": "string",
"netcheck_logs": ["string"],
"regions": {
"property1": {
"error": "string",
"healthy": true,
"node_reports": [
{
"can_exchange_messages": true,
"client_errs": [["string"]],
"client_logs": [["string"]],
"error": "string",
"healthy": true,
"node": {
"canPort80": true,
"certName": "string",
"derpport": 0,
"forceHTTP": true,
"hostName": "string",
"insecureForTests": true,
"ipv4": "string",
"ipv6": "string",
"name": "string",
"regionID": 0,
"stunonly": true,
"stunport": 0,
"stuntestIP": "string"
},
"node_info": {
"tokenBucketBytesBurst": 0,
"tokenBucketBytesPerSecond": 0
},
"round_trip_ping": "string",
"round_trip_ping_ms": 0,
"severity": "ok",
"stun": {
"canSTUN": true,
"enabled": true,
"error": "string"
},
"uses_websocket": true,
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
}
],
"region": {
"avoid": true,
"embeddedRelay": true,
"nodes": [
{
"canPort80": true,
"certName": "string",
"derpport": 0,
"forceHTTP": true,
"hostName": "string",
"insecureForTests": true,
"ipv4": "string",
"ipv6": "string",
"name": "string",
"regionID": 0,
"stunonly": true,
"stunport": 0,
"stuntestIP": "string"
}
],
"regionCode": "string",
"regionID": 0,
"regionName": "string"
},
"severity": "ok",
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
},
"property2": {
"error": "string",
"healthy": true,
"node_reports": [
{
"can_exchange_messages": true,
"client_errs": [["string"]],
"client_logs": [["string"]],
"error": "string",
"healthy": true,
"node": {
"canPort80": true,
"certName": "string",
"derpport": 0,
"forceHTTP": true,
"hostName": "string",
"insecureForTests": true,
"ipv4": "string",
"ipv6": "string",
"name": "string",
"regionID": 0,
"stunonly": true,
"stunport": 0,
"stuntestIP": "string"
},
"node_info": {
"tokenBucketBytesBurst": 0,
"tokenBucketBytesPerSecond": 0
},
"round_trip_ping": "string",
"round_trip_ping_ms": 0,
"severity": "ok",
"stun": {
"canSTUN": true,
"enabled": true,
"error": "string"
},
"uses_websocket": true,
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
}
],
"region": {
"avoid": true,
"embeddedRelay": true,
"nodes": [
{
"canPort80": true,
"certName": "string",
"derpport": 0,
"forceHTTP": true,
"hostName": "string",
"insecureForTests": true,
"ipv4": "string",
"ipv6": "string",
"name": "string",
"regionID": 0,
"stunonly": true,
"stunport": 0,
"stuntestIP": "string"
}
],
"regionCode": "string",
"regionID": 0,
"regionName": "string"
},
"severity": "ok",
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
}
},
"severity": "ok",
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
},
"healthy": true,
"provisioner_daemons": {
"dismissed": true,
"error": "string",
"items": [
{
"provisioner_daemon": {
"api_version": "string",
"created_at": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"last_seen_at": "2019-08-24T14:15:22Z",
"name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"provisioners": ["string"],
"tags": {
"property1": "string",
"property2": "string"
},
"version": "string"
},
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
}
],
"severity": "ok",
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
},
"severity": "ok",
"time": "2019-08-24T14:15:22Z",
"websocket": {
"body": "string",
"code": 0,
"dismissed": true,
"error": "string",
"healthy": true,
"severity": "ok",
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
},
"workspace_proxy": {
"dismissed": true,
"error": "string",
"healthy": true,
"severity": "ok",
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
],
"workspace_proxies": {
"regions": [
{
"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
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------- |
| 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).
## Get health settings
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/debug/health/settings \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /debug/health/settings`
### Example responses
> 200 Response
```json
{
"dismissed_healthchecks": ["DERP"]
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------- |
| 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).
## Update health settings
### Code samples
```shell
# Example request using curl
curl -X PUT http://coder-server:8080/api/v2/debug/health/settings \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`PUT /debug/health/settings`
> Body parameter
```json
{
"dismissed_healthchecks": ["DERP"]
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------- | -------- | ---------------------- |
| `body` | body | [healthsdk.UpdateHealthSettings](schemas.md#healthsdkupdatehealthsettings) | true | Update health settings |
### Example responses
> 200 Response
```json
{
"dismissed_healthchecks": ["DERP"]
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------- |
| 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).
## Debug Info Tailnet
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/debug/tailnet \
-H 'Coder-Session-Token: API_KEY'
```
`GET /debug/tailnet`
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ |
| 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).
+2569
View File
File diff suppressed because it is too large Load Diff
+73
View File
@@ -0,0 +1,73 @@
# Files
## Upload file
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/files \
-H 'Accept: application/json' \
-H 'Content-Type: application/x-tar' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /files`
> Body parameter
```yaml
file: string
```
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ------ | ------ | -------- | ---------------------------------------------------------------------------------------------- |
| `Content-Type` | header | string | true | Content-Type must be `application/x-tar` or `application/zip` |
| `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). |
### Example responses
> 201 Response
```json
{
"hash": "19686d84-b10d-4f90-b18e-84fd3fa038fd"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------ | ----------- | ------------------------------------------------------------ |
| 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).
## Get file by ID
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/files/{fileID} \
-H 'Coder-Session-Token: API_KEY'
```
`GET /files/{fileID}`
### Parameters
| Name | In | Type | Required | Description |
| -------- | ---- | ------------ | -------- | ----------- |
| `fileID` | path | string(uuid) | true | File ID |
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ |
| 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).
+735
View File
@@ -0,0 +1,735 @@
# General
## API root handler
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/ \
-H 'Accept: application/json'
```
`GET /`
### Example responses
> 200 Response
```json
{
"detail": "string",
"message": "string",
"validations": [
{
"detail": "string",
"field": "string"
}
]
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------ |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Response](schemas.md#codersdkresponse) |
## Build info
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/buildinfo \
-H 'Accept: application/json'
```
`GET /buildinfo`
### Example responses
> 200 Response
```json
{
"agent_api_version": "string",
"dashboard_url": "string",
"deployment_id": "string",
"external_url": "string",
"telemetry": true,
"upgrade_message": "string",
"version": "string",
"workspace_proxy": true
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------ |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.BuildInfoResponse](schemas.md#codersdkbuildinforesponse) |
## Report CSP violations
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/csp/reports \
-H 'Content-Type: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /csp/reports`
> Body parameter
```json
{
"csp-report": {}
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | ---------------------------------------------------- | -------- | ---------------- |
| `body` | body | [coderd.cspViolation](schemas.md#coderdcspviolation) | true | Violation report |
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ |
| 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).
## Get deployment config
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/deployment/config \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /deployment/config`
### Example responses
> 200 Response
```json
{
"config": {
"access_url": {
"forceQuery": true,
"fragment": "string",
"host": "string",
"omitHost": true,
"opaque": "string",
"path": "string",
"rawFragment": "string",
"rawPath": "string",
"rawQuery": "string",
"scheme": "string",
"user": {}
},
"address": {
"host": "string",
"port": "string"
},
"agent_fallback_troubleshooting_url": {
"forceQuery": true,
"fragment": "string",
"host": "string",
"omitHost": true,
"opaque": "string",
"path": "string",
"rawFragment": "string",
"rawPath": "string",
"rawQuery": "string",
"scheme": "string",
"user": {}
},
"agent_stat_refresh_interval": 0,
"allow_workspace_renames": true,
"autobuild_poll_interval": 0,
"browser_only": true,
"cache_directory": "string",
"cli_upgrade_message": "string",
"config": "string",
"config_ssh": {
"deploymentName": "string",
"sshconfigOptions": ["string"]
},
"dangerous": {
"allow_all_cors": true,
"allow_path_app_sharing": true,
"allow_path_app_site_owner_access": true
},
"derp": {
"config": {
"block_direct": true,
"force_websockets": true,
"path": "string",
"url": "string"
},
"server": {
"enable": true,
"region_code": "string",
"region_id": 0,
"region_name": "string",
"relay_url": {
"forceQuery": true,
"fragment": "string",
"host": "string",
"omitHost": true,
"opaque": "string",
"path": "string",
"rawFragment": "string",
"rawPath": "string",
"rawQuery": "string",
"scheme": "string",
"user": {}
},
"stun_addresses": ["string"]
}
},
"disable_owner_workspace_exec": true,
"disable_password_auth": true,
"disable_path_apps": true,
"docs_url": {
"forceQuery": true,
"fragment": "string",
"host": "string",
"omitHost": true,
"opaque": "string",
"path": "string",
"rawFragment": "string",
"rawPath": "string",
"rawQuery": "string",
"scheme": "string",
"user": {}
},
"enable_terraform_debug_mode": true,
"experiments": ["string"],
"external_auth": {
"value": [
{
"app_install_url": "string",
"app_installations_url": "string",
"auth_url": "string",
"client_id": "string",
"device_code_url": "string",
"device_flow": true,
"display_icon": "string",
"display_name": "string",
"id": "string",
"no_refresh": true,
"regex": "string",
"scopes": ["string"],
"token_url": "string",
"type": "string",
"validate_url": "string"
}
]
},
"external_token_encryption_keys": ["string"],
"healthcheck": {
"refresh": 0,
"threshold_database": 0
},
"http_address": "string",
"in_memory_database": true,
"job_hang_detector_interval": 0,
"logging": {
"human": "string",
"json": "string",
"log_filter": ["string"],
"stackdriver": "string"
},
"metrics_cache_refresh_interval": 0,
"notifications": {
"dispatch_timeout": 0,
"email": {
"auth": {
"identity": "string",
"password": "string",
"password_file": "string",
"username": "string"
},
"force_tls": true,
"from": "string",
"hello": "string",
"smarthost": {
"host": "string",
"port": "string"
},
"tls": {
"ca_file": "string",
"cert_file": "string",
"insecure_skip_verify": true,
"key_file": "string",
"server_name": "string",
"start_tls": true
}
},
"fetch_interval": 0,
"lease_count": 0,
"lease_period": 0,
"max_send_attempts": 0,
"method": "string",
"retry_interval": 0,
"sync_buffer_size": 0,
"sync_interval": 0,
"webhook": {
"endpoint": {
"forceQuery": true,
"fragment": "string",
"host": "string",
"omitHost": true,
"opaque": "string",
"path": "string",
"rawFragment": "string",
"rawPath": "string",
"rawQuery": "string",
"scheme": "string",
"user": {}
}
}
},
"oauth2": {
"github": {
"allow_everyone": true,
"allow_signups": true,
"allowed_orgs": ["string"],
"allowed_teams": ["string"],
"client_id": "string",
"client_secret": "string",
"enterprise_base_url": "string"
}
},
"oidc": {
"allow_signups": true,
"auth_url_params": {},
"client_cert_file": "string",
"client_id": "string",
"client_key_file": "string",
"client_secret": "string",
"email_domain": ["string"],
"email_field": "string",
"group_allow_list": ["string"],
"group_auto_create": true,
"group_mapping": {},
"group_regex_filter": {},
"groups_field": "string",
"icon_url": {
"forceQuery": true,
"fragment": "string",
"host": "string",
"omitHost": true,
"opaque": "string",
"path": "string",
"rawFragment": "string",
"rawPath": "string",
"rawQuery": "string",
"scheme": "string",
"user": {}
},
"ignore_email_verified": true,
"ignore_user_info": true,
"issuer_url": "string",
"name_field": "string",
"scopes": ["string"],
"sign_in_text": "string",
"signups_disabled_text": "string",
"skip_issuer_checks": true,
"user_role_field": "string",
"user_role_mapping": {},
"user_roles_default": ["string"],
"username_field": "string"
},
"pg_auth": "string",
"pg_connection_url": "string",
"pprof": {
"address": {
"host": "string",
"port": "string"
},
"enable": true
},
"prometheus": {
"address": {
"host": "string",
"port": "string"
},
"aggregate_agent_stats_by": ["string"],
"collect_agent_stats": true,
"collect_db_metrics": true,
"enable": true
},
"provisioner": {
"daemon_poll_interval": 0,
"daemon_poll_jitter": 0,
"daemon_psk": "string",
"daemon_types": ["string"],
"daemons": 0,
"force_cancel_interval": 0
},
"proxy_health_status_interval": 0,
"proxy_trusted_headers": ["string"],
"proxy_trusted_origins": ["string"],
"rate_limit": {
"api": 0,
"disable_all": true
},
"redirect_to_access_url": true,
"scim_api_key": "string",
"secure_auth_cookie": true,
"session_lifetime": {
"default_duration": 0,
"disable_expiry_refresh": true,
"max_token_lifetime": 0
},
"ssh_keygen_algorithm": "string",
"strict_transport_security": 0,
"strict_transport_security_options": ["string"],
"support": {
"links": {
"value": [
{
"icon": "bug",
"name": "string",
"target": "string"
}
]
}
},
"swagger": {
"enable": true
},
"telemetry": {
"enable": true,
"trace": true,
"url": {
"forceQuery": true,
"fragment": "string",
"host": "string",
"omitHost": true,
"opaque": "string",
"path": "string",
"rawFragment": "string",
"rawPath": "string",
"rawQuery": "string",
"scheme": "string",
"user": {}
}
},
"terms_of_service_url": "string",
"tls": {
"address": {
"host": "string",
"port": "string"
},
"allow_insecure_ciphers": true,
"cert_file": ["string"],
"client_auth": "string",
"client_ca_file": "string",
"client_cert_file": "string",
"client_key_file": "string",
"enable": true,
"key_file": ["string"],
"min_version": "string",
"redirect_http": true,
"supported_ciphers": ["string"]
},
"trace": {
"capture_logs": true,
"data_dog": true,
"enable": true,
"honeycomb_api_key": "string"
},
"update_check": true,
"user_quiet_hours_schedule": {
"allow_user_custom": true,
"default_schedule": "string"
},
"verbose": true,
"web_terminal_renderer": "string",
"wgtunnel_host": "string",
"wildcard_access_url": "string",
"write_config": true
},
"options": [
{
"annotations": {
"property1": "string",
"property2": "string"
},
"default": "string",
"description": "string",
"env": "string",
"flag": "string",
"flag_shorthand": "string",
"group": {
"description": "string",
"name": "string",
"parent": {
"description": "string",
"name": "string",
"parent": {},
"yaml": "string"
},
"yaml": "string"
},
"hidden": true,
"name": "string",
"required": true,
"use_instead": [{}],
"value": null,
"value_source": "",
"yaml": "string"
}
]
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.DeploymentConfig](schemas.md#codersdkdeploymentconfig) |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## SSH Config
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/deployment/ssh \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /deployment/ssh`
### Example responses
> 200 Response
```json
{
"hostname_prefix": "string",
"ssh_config_options": {
"property1": "string",
"property2": "string"
}
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------ |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.SSHConfigResponse](schemas.md#codersdksshconfigresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get deployment stats
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/deployment/stats \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /deployment/stats`
### Example responses
> 200 Response
```json
{
"aggregated_from": "2019-08-24T14:15:22Z",
"collected_at": "2019-08-24T14:15:22Z",
"next_update_at": "2019-08-24T14:15:22Z",
"session_count": {
"jetbrains": 0,
"reconnecting_pty": 0,
"ssh": 0,
"vscode": 0
},
"workspaces": {
"building": 0,
"connection_latency_ms": {
"p50": 0,
"p95": 0
},
"failed": 0,
"pending": 0,
"running": 0,
"rx_bytes": 0,
"stopped": 0,
"tx_bytes": 0
}
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.DeploymentStats](schemas.md#codersdkdeploymentstats) |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get enabled experiments
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/experiments \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /experiments`
### Example responses
> 200 Response
```json
["example"]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Experiment](schemas.md#codersdkexperiment) |
<h3 id="get-enabled-experiments-responseschema">Response Schema</h3>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| -------------- | ----- | -------- | ------------ | ----------- |
| `[array item]` | array | false | | |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get safe experiments
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/experiments/available \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /experiments/available`
### Example responses
> 200 Response
```json
["example"]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Experiment](schemas.md#codersdkexperiment) |
<h3 id="get-safe-experiments-responseschema">Response Schema</h3>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| -------------- | ----- | -------- | ------------ | ----------- |
| `[array item]` | array | false | | |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Update check
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/updatecheck \
-H 'Accept: application/json'
```
`GET /updatecheck`
### Example responses
> 200 Response
```json
{
"current": true,
"url": "string",
"version": "string"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.UpdateCheckResponse](schemas.md#codersdkupdatecheckresponse) |
## Get token config
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/users/{user}/keys/tokens/tokenconfig \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /users/{user}/keys/tokens/tokenconfig`
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | ------ | -------- | -------------------- |
| `user` | path | string | true | User ID, name, or me |
### Example responses
> 200 Response
```json
{
"max_token_lifetime": 0
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------ |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.TokenConfig](schemas.md#codersdktokenconfig) |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
+192
View File
@@ -0,0 +1,192 @@
# Git
## Get user external auths
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/external-auth \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /external-auth`
### Example responses
> 200 Response
```json
{
"authenticated": true,
"created_at": "2019-08-24T14:15:22Z",
"expires": "2019-08-24T14:15:22Z",
"has_refresh_token": true,
"provider_id": "string",
"updated_at": "2019-08-24T14:15:22Z",
"validate_error": "string"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------- |
| 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).
## Get external auth by ID
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/external-auth/{externalauth} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /external-auth/{externalauth}`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | -------------- | -------- | --------------- |
| `externalauth` | path | string(string) | true | Git Provider ID |
### Example responses
> 200 Response
```json
{
"app_install_url": "string",
"app_installable": true,
"authenticated": true,
"device": true,
"display_name": "string",
"installations": [
{
"account": {
"avatar_url": "string",
"id": 0,
"login": "string",
"name": "string",
"profile_url": "string"
},
"configure_url": "string",
"id": 0
}
],
"user": {
"avatar_url": "string",
"id": 0,
"login": "string",
"name": "string",
"profile_url": "string"
}
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------- |
| 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).
## Delete external auth user link by ID
### Code samples
```shell
# Example request using curl
curl -X DELETE http://coder-server:8080/api/v2/external-auth/{externalauth} \
-H 'Coder-Session-Token: API_KEY'
```
`DELETE /external-auth/{externalauth}`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | -------------- | -------- | --------------- |
| `externalauth` | path | string(string) | true | Git Provider ID |
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ |
| 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).
## Get external auth device by ID.
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/external-auth/{externalauth}/device \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /external-auth/{externalauth}/device`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | -------------- | -------- | --------------- |
| `externalauth` | path | string(string) | true | Git Provider ID |
### Example responses
> 200 Response
```json
{
"device_code": "string",
"expires_in": 0,
"interval": 0,
"user_code": "string",
"verification_uri": "string"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------- |
| 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).
## Post external auth device by ID
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/external-auth/{externalauth}/device \
-H 'Coder-Session-Token: API_KEY'
```
`POST /external-auth/{externalauth}/device`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | -------------- | -------- | -------------------- |
| `externalauth` | path | string(string) | true | External Provider ID |
### Responses
| Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | ------ |
| 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).
+246
View File
@@ -0,0 +1,246 @@
# Insights
## Get deployment DAUs
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/insights/daus?tz_offset=0 \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /insights/daus`
### Parameters
| Name | In | Type | Required | Description |
| ----------- | ----- | ------- | -------- | -------------------------- |
| `tz_offset` | query | integer | true | Time-zone offset (e.g. -2) |
### Example responses
> 200 Response
```json
{
"entries": [
{
"amount": 0,
"date": "string"
}
],
"tz_hour_offset": 0
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------- |
| 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).
## Get insights about templates
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/insights/templates?start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z&interval=week \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /insights/templates`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ----- | ----------------- | -------- | ------------ |
| `start_time` | query | string(date-time) | true | Start time |
| `end_time` | query | string(date-time) | true | End time |
| `interval` | query | string | true | Interval |
| `template_ids` | query | array[string] | false | Template IDs |
#### Enumerated Values
| Parameter | Value |
| ---------- | ------ |
| `interval` | `week` |
| `interval` | `day` |
### Example responses
> 200 Response
```json
{
"interval_reports": [
{
"active_users": 14,
"end_time": "2019-08-24T14:15:22Z",
"interval": "week",
"start_time": "2019-08-24T14:15:22Z",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"]
}
],
"report": {
"active_users": 22,
"apps_usage": [
{
"display_name": "Visual Studio Code",
"icon": "string",
"seconds": 80500,
"slug": "vscode",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
"times_used": 2,
"type": "builtin"
}
],
"end_time": "2019-08-24T14:15:22Z",
"parameters_usage": [
{
"description": "string",
"display_name": "string",
"name": "string",
"options": [
{
"description": "string",
"icon": "string",
"name": "string",
"value": "string"
}
],
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
"type": "string",
"values": [
{
"count": 0,
"value": "string"
}
]
}
],
"start_time": "2019-08-24T14:15:22Z",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"]
}
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------- |
| 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).
## Get insights about user activity
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/insights/user-activity?start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /insights/user-activity`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ----- | ----------------- | -------- | ------------ |
| `start_time` | query | string(date-time) | true | Start time |
| `end_time` | query | string(date-time) | true | End time |
| `template_ids` | query | array[string] | false | Template IDs |
### Example responses
> 200 Response
```json
{
"report": {
"end_time": "2019-08-24T14:15:22Z",
"start_time": "2019-08-24T14:15:22Z",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
"users": [
{
"avatar_url": "http://example.com",
"seconds": 80500,
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"username": "string"
}
]
}
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------- |
| 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).
## Get insights about user latency
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/insights/user-latency?start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /insights/user-latency`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ----- | ----------------- | -------- | ------------ |
| `start_time` | query | string(date-time) | true | Start time |
| `end_time` | query | string(date-time) | true | End time |
| `template_ids` | query | array[string] | false | Template IDs |
### Example responses
> 200 Response
```json
{
"report": {
"end_time": "2019-08-24T14:15:22Z",
"start_time": "2019-08-24T14:15:22Z",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
"users": [
{
"avatar_url": "http://example.com",
"latency_ms": {
"p50": 31.312,
"p95": 119.832
},
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"username": "string"
}
]
}
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------- |
| 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).
+754
View File
@@ -0,0 +1,754 @@
# Members
## List organization members
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /organizations/{organization}/members`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | ------ | -------- | --------------- |
| `organization` | path | string | true | Organization ID |
### Example responses
> 200 Response
```json
[
{
"avatar_url": "string",
"created_at": "2019-08-24T14:15:22Z",
"email": "string",
"global_roles": [
{
"display_name": "string",
"name": "string",
"organization_id": "string"
}
],
"name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"roles": [
{
"display_name": "string",
"name": "string",
"organization_id": "string"
}
],
"updated_at": "2019-08-24T14:15:22Z",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"username": "string"
}
]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------- |
| 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>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| -------------------- | ----------------- | -------- | ------------ | ----------- |
| `[array item]` | array | false | | |
| `» avatar_url` | string | false | | |
| `» created_at` | string(date-time) | false | | |
| `» email` | string | false | | |
| `» global_roles` | array | false | | |
| `»» display_name` | string | false | | |
| `»» name` | string | false | | |
| `»» organization_id` | string | false | | |
| `» name` | string | false | | |
| `» organization_id` | string(uuid) | false | | |
| `» roles` | array | false | | |
| `» updated_at` | string(date-time) | false | | |
| `» user_id` | string(uuid) | false | | |
| `» username` | string | false | | |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get member roles by organization
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members/roles \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /organizations/{organization}/members/roles`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | ------------ | -------- | --------------- |
| `organization` | path | string(uuid) | true | Organization ID |
### Example responses
> 200 Response
```json
[
{
"assignable": true,
"built_in": true,
"display_name": "string",
"name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"organization_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
],
"site_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
],
"user_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
]
}
]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ----------------------------------------------------------------------- |
| 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>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| ---------------------------- | -------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------- |
| `[array item]` | array | false | | |
| `» assignable` | boolean | false | | |
| `» built_in` | boolean | false | | Built in roles are immutable |
| `» display_name` | string | false | | |
| `» name` | string | false | | |
| `» organization_id` | string(uuid) | false | | |
| `» organization_permissions` | array | false | | Organization permissions are specific for the organization in the field 'OrganizationID' above. |
| `»» action` | [codersdk.RBACAction](schemas.md#codersdkrbacaction) | false | | |
| `»» negate` | boolean | false | | Negate makes this a negative permission |
| `»» resource_type` | [codersdk.RBACResource](schemas.md#codersdkrbacresource) | false | | |
| `» site_permissions` | array | false | | |
| `» user_permissions` | array | false | | |
#### Enumerated Values
| Property | Value |
| --------------- | ------------------------- |
| `action` | `application_connect` |
| `action` | `assign` |
| `action` | `create` |
| `action` | `delete` |
| `action` | `read` |
| `action` | `read_personal` |
| `action` | `ssh` |
| `action` | `update` |
| `action` | `update_personal` |
| `action` | `use` |
| `action` | `view_insights` |
| `action` | `start` |
| `action` | `stop` |
| `resource_type` | `*` |
| `resource_type` | `api_key` |
| `resource_type` | `assign_org_role` |
| `resource_type` | `assign_role` |
| `resource_type` | `audit_log` |
| `resource_type` | `debug_info` |
| `resource_type` | `deployment_config` |
| `resource_type` | `deployment_stats` |
| `resource_type` | `file` |
| `resource_type` | `group` |
| `resource_type` | `group_member` |
| `resource_type` | `license` |
| `resource_type` | `notification_preference` |
| `resource_type` | `notification_template` |
| `resource_type` | `oauth2_app` |
| `resource_type` | `oauth2_app_code_token` |
| `resource_type` | `oauth2_app_secret` |
| `resource_type` | `organization` |
| `resource_type` | `organization_member` |
| `resource_type` | `provisioner_daemon` |
| `resource_type` | `provisioner_keys` |
| `resource_type` | `replicas` |
| `resource_type` | `system` |
| `resource_type` | `tailnet_coordinator` |
| `resource_type` | `template` |
| `resource_type` | `user` |
| `resource_type` | `workspace` |
| `resource_type` | `workspace_dormant` |
| `resource_type` | `workspace_proxy` |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Upsert a custom organization role
### Code samples
```shell
# Example request using curl
curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization}/members/roles \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`PATCH /organizations/{organization}/members/roles`
> Body parameter
```json
{
"display_name": "string",
"name": "string",
"organization_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
],
"site_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
],
"user_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
]
}
```
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | ---------------------------------------------------------------- | -------- | ------------------- |
| `organization` | path | string(uuid) | true | Organization ID |
| `body` | body | [codersdk.PatchRoleRequest](schemas.md#codersdkpatchrolerequest) | true | Upsert role request |
### Example responses
> 200 Response
```json
[
{
"display_name": "string",
"name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"organization_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
],
"site_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
],
"user_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
]
}
]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------- |
| 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>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| ---------------------------- | -------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------- |
| `[array item]` | array | false | | |
| `» display_name` | string | false | | |
| `» name` | string | false | | |
| `» organization_id` | string(uuid) | false | | |
| `» organization_permissions` | array | false | | Organization permissions are specific for the organization in the field 'OrganizationID' above. |
| `»» action` | [codersdk.RBACAction](schemas.md#codersdkrbacaction) | false | | |
| `»» negate` | boolean | false | | Negate makes this a negative permission |
| `»» resource_type` | [codersdk.RBACResource](schemas.md#codersdkrbacresource) | false | | |
| `» site_permissions` | array | false | | |
| `» user_permissions` | array | false | | |
#### Enumerated Values
| Property | Value |
| --------------- | ------------------------- |
| `action` | `application_connect` |
| `action` | `assign` |
| `action` | `create` |
| `action` | `delete` |
| `action` | `read` |
| `action` | `read_personal` |
| `action` | `ssh` |
| `action` | `update` |
| `action` | `update_personal` |
| `action` | `use` |
| `action` | `view_insights` |
| `action` | `start` |
| `action` | `stop` |
| `resource_type` | `*` |
| `resource_type` | `api_key` |
| `resource_type` | `assign_org_role` |
| `resource_type` | `assign_role` |
| `resource_type` | `audit_log` |
| `resource_type` | `debug_info` |
| `resource_type` | `deployment_config` |
| `resource_type` | `deployment_stats` |
| `resource_type` | `file` |
| `resource_type` | `group` |
| `resource_type` | `group_member` |
| `resource_type` | `license` |
| `resource_type` | `notification_preference` |
| `resource_type` | `notification_template` |
| `resource_type` | `oauth2_app` |
| `resource_type` | `oauth2_app_code_token` |
| `resource_type` | `oauth2_app_secret` |
| `resource_type` | `organization` |
| `resource_type` | `organization_member` |
| `resource_type` | `provisioner_daemon` |
| `resource_type` | `provisioner_keys` |
| `resource_type` | `replicas` |
| `resource_type` | `system` |
| `resource_type` | `tailnet_coordinator` |
| `resource_type` | `template` |
| `resource_type` | `user` |
| `resource_type` | `workspace` |
| `resource_type` | `workspace_dormant` |
| `resource_type` | `workspace_proxy` |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Delete a custom organization role
### Code samples
```shell
# Example request using curl
curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization}/members/roles/{roleName} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`DELETE /organizations/{organization}/members/roles/{roleName}`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | ------------ | -------- | --------------- |
| `organization` | path | string(uuid) | true | Organization ID |
| `roleName` | path | string | true | Role name |
### Example responses
> 200 Response
```json
[
{
"display_name": "string",
"name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"organization_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
],
"site_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
],
"user_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
]
}
]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------- |
| 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>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| ---------------------------- | -------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------- |
| `[array item]` | array | false | | |
| `» display_name` | string | false | | |
| `» name` | string | false | | |
| `» organization_id` | string(uuid) | false | | |
| `» organization_permissions` | array | false | | Organization permissions are specific for the organization in the field 'OrganizationID' above. |
| `»» action` | [codersdk.RBACAction](schemas.md#codersdkrbacaction) | false | | |
| `»» negate` | boolean | false | | Negate makes this a negative permission |
| `»» resource_type` | [codersdk.RBACResource](schemas.md#codersdkrbacresource) | false | | |
| `» site_permissions` | array | false | | |
| `» user_permissions` | array | false | | |
#### Enumerated Values
| Property | Value |
| --------------- | ------------------------- |
| `action` | `application_connect` |
| `action` | `assign` |
| `action` | `create` |
| `action` | `delete` |
| `action` | `read` |
| `action` | `read_personal` |
| `action` | `ssh` |
| `action` | `update` |
| `action` | `update_personal` |
| `action` | `use` |
| `action` | `view_insights` |
| `action` | `start` |
| `action` | `stop` |
| `resource_type` | `*` |
| `resource_type` | `api_key` |
| `resource_type` | `assign_org_role` |
| `resource_type` | `assign_role` |
| `resource_type` | `audit_log` |
| `resource_type` | `debug_info` |
| `resource_type` | `deployment_config` |
| `resource_type` | `deployment_stats` |
| `resource_type` | `file` |
| `resource_type` | `group` |
| `resource_type` | `group_member` |
| `resource_type` | `license` |
| `resource_type` | `notification_preference` |
| `resource_type` | `notification_template` |
| `resource_type` | `oauth2_app` |
| `resource_type` | `oauth2_app_code_token` |
| `resource_type` | `oauth2_app_secret` |
| `resource_type` | `organization` |
| `resource_type` | `organization_member` |
| `resource_type` | `provisioner_daemon` |
| `resource_type` | `provisioner_keys` |
| `resource_type` | `replicas` |
| `resource_type` | `system` |
| `resource_type` | `tailnet_coordinator` |
| `resource_type` | `template` |
| `resource_type` | `user` |
| `resource_type` | `workspace` |
| `resource_type` | `workspace_dormant` |
| `resource_type` | `workspace_proxy` |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Add organization member
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/members/{user} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /organizations/{organization}/members/{user}`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | ------ | -------- | -------------------- |
| `organization` | path | string | true | Organization ID |
| `user` | path | string | true | User ID, name, or me |
### Example responses
> 200 Response
```json
{
"created_at": "2019-08-24T14:15:22Z",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"roles": [
{
"display_name": "string",
"name": "string",
"organization_id": "string"
}
],
"updated_at": "2019-08-24T14:15:22Z",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------- |
| 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).
## Remove organization member
### Code samples
```shell
# Example request using curl
curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization}/members/{user} \
-H 'Coder-Session-Token: API_KEY'
```
`DELETE /organizations/{organization}/members/{user}`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | ------ | -------- | -------------------- |
| `organization` | path | string | true | Organization ID |
| `user` | path | string | true | User ID, name, or me |
### Responses
| Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | ------ |
| 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).
## Assign role to organization member
### Code samples
```shell
# Example request using curl
curl -X PUT http://coder-server:8080/api/v2/organizations/{organization}/members/{user}/roles \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`PUT /organizations/{organization}/members/{user}/roles`
> Body parameter
```json
{
"roles": ["string"]
}
```
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | ------------------------------------------------------ | -------- | -------------------- |
| `organization` | path | string | true | Organization ID |
| `user` | path | string | true | User ID, name, or me |
| `body` | body | [codersdk.UpdateRoles](schemas.md#codersdkupdateroles) | true | Update roles request |
### Example responses
> 200 Response
```json
{
"created_at": "2019-08-24T14:15:22Z",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"roles": [
{
"display_name": "string",
"name": "string",
"organization_id": "string"
}
],
"updated_at": "2019-08-24T14:15:22Z",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------- |
| 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).
## Get site member roles
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/users/roles \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /users/roles`
### Example responses
> 200 Response
```json
[
{
"assignable": true,
"built_in": true,
"display_name": "string",
"name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"organization_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
],
"site_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
],
"user_permissions": [
{
"action": "application_connect",
"negate": true,
"resource_type": "*"
}
]
}
]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ----------------------------------------------------------------------- |
| 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>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| ---------------------------- | -------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------- |
| `[array item]` | array | false | | |
| `» assignable` | boolean | false | | |
| `» built_in` | boolean | false | | Built in roles are immutable |
| `» display_name` | string | false | | |
| `» name` | string | false | | |
| `» organization_id` | string(uuid) | false | | |
| `» organization_permissions` | array | false | | Organization permissions are specific for the organization in the field 'OrganizationID' above. |
| `»» action` | [codersdk.RBACAction](schemas.md#codersdkrbacaction) | false | | |
| `»» negate` | boolean | false | | Negate makes this a negative permission |
| `»» resource_type` | [codersdk.RBACResource](schemas.md#codersdkrbacresource) | false | | |
| `» site_permissions` | array | false | | |
| `» user_permissions` | array | false | | |
#### Enumerated Values
| Property | Value |
| --------------- | ------------------------- |
| `action` | `application_connect` |
| `action` | `assign` |
| `action` | `create` |
| `action` | `delete` |
| `action` | `read` |
| `action` | `read_personal` |
| `action` | `ssh` |
| `action` | `update` |
| `action` | `update_personal` |
| `action` | `use` |
| `action` | `view_insights` |
| `action` | `start` |
| `action` | `stop` |
| `resource_type` | `*` |
| `resource_type` | `api_key` |
| `resource_type` | `assign_org_role` |
| `resource_type` | `assign_role` |
| `resource_type` | `audit_log` |
| `resource_type` | `debug_info` |
| `resource_type` | `deployment_config` |
| `resource_type` | `deployment_stats` |
| `resource_type` | `file` |
| `resource_type` | `group` |
| `resource_type` | `group_member` |
| `resource_type` | `license` |
| `resource_type` | `notification_preference` |
| `resource_type` | `notification_template` |
| `resource_type` | `oauth2_app` |
| `resource_type` | `oauth2_app_code_token` |
| `resource_type` | `oauth2_app_secret` |
| `resource_type` | `organization` |
| `resource_type` | `organization_member` |
| `resource_type` | `provisioner_daemon` |
| `resource_type` | `provisioner_keys` |
| `resource_type` | `replicas` |
| `resource_type` | `system` |
| `resource_type` | `tailnet_coordinator` |
| `resource_type` | `template` |
| `resource_type` | `user` |
| `resource_type` | `workspace` |
| `resource_type` | `workspace_dormant` |
| `resource_type` | `workspace_proxy` |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
+296
View File
@@ -0,0 +1,296 @@
# Notifications
## Get notification dispatch methods
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/notifications/dispatch-methods \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /notifications/dispatch-methods`
### Example responses
> 200 Response
```json
[
{
"available": ["string"],
"default": "string"
}
]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------- |
| 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>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| -------------- | ------ | -------- | ------------ | ----------- |
| `[array item]` | array | false | | |
| `» available` | array | false | | |
| `» default` | string | false | | |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get notifications settings
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/notifications/settings \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /notifications/settings`
### Example responses
> 200 Response
```json
{
"notifier_paused": true
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------- |
| 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).
## Update notifications settings
### Code samples
```shell
# Example request using curl
curl -X PUT http://coder-server:8080/api/v2/notifications/settings \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`PUT /notifications/settings`
> Body parameter
```json
{
"notifier_paused": true
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------- | -------- | ------------------------------ |
| `body` | body | [codersdk.NotificationsSettings](schemas.md#codersdknotificationssettings) | true | Notifications settings request |
### Example responses
> 200 Response
```json
{
"notifier_paused": true
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------- |
| 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 | |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get system notification templates
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/notifications/templates/system \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /notifications/templates/system`
### Example responses
> 200 Response
```json
[
{
"actions": "string",
"body_template": "string",
"group": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"kind": "string",
"method": "string",
"name": "string",
"title_template": "string"
}
]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | --------------------------------------------------------------------------------- |
| 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>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| ------------------ | ------------ | -------- | ------------ | ----------- |
| `[array item]` | array | false | | |
| `» actions` | string | false | | |
| `» body_template` | string | false | | |
| `» group` | string | false | | |
| `» id` | string(uuid) | false | | |
| `» kind` | string | false | | |
| `» method` | string | false | | |
| `» name` | string | false | | |
| `» title_template` | string | false | | |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get user notification preferences
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/users/{user}/notifications/preferences \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /users/{user}/notifications/preferences`
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | ------ | -------- | -------------------- |
| `user` | path | string | true | User ID, name, or me |
### Example responses
> 200 Response
```json
[
{
"disabled": true,
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"updated_at": "2019-08-24T14:15:22Z"
}
]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------- |
| 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>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| -------------- | ----------------- | -------- | ------------ | ----------- |
| `[array item]` | array | false | | |
| `» disabled` | boolean | false | | |
| `» id` | string(uuid) | false | | |
| `» updated_at` | string(date-time) | false | | |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Update user notification preferences
### Code samples
```shell
# Example request using curl
curl -X PUT http://coder-server:8080/api/v2/users/{user}/notifications/preferences \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`PUT /users/{user}/notifications/preferences`
> Body parameter
```json
{
"template_disabled_map": {
"property1": true,
"property2": true
}
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | -------------------------------------------------------------------------------------------------- | -------- | -------------------- |
| `user` | path | string | true | User ID, name, or me |
| `body` | body | [codersdk.UpdateUserNotificationPreferences](schemas.md#codersdkupdateusernotificationpreferences) | true | Preferences |
### Example responses
> 200 Response
```json
[
{
"disabled": true,
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"updated_at": "2019-08-24T14:15:22Z"
}
]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------- |
| 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>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| -------------- | ----------------- | -------- | ------------ | ----------- |
| `[array item]` | array | false | | |
| `» disabled` | boolean | false | | |
| `» id` | string(uuid) | false | | |
| `» updated_at` | string(date-time) | false | | |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
+345
View File
@@ -0,0 +1,345 @@
# Organizations
## Add new license
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/licenses \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /licenses`
> Body parameter
```json
{
"license": "string"
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | ------------------------------------------------------------------ | -------- | ------------------- |
| `body` | body | [codersdk.AddLicenseRequest](schemas.md#codersdkaddlicenserequest) | true | Add license request |
### Example responses
> 201 Response
```json
{
"claims": {},
"id": 0,
"uploaded_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------ | ----------- | ---------------------------------------------- |
| 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).
## Update license entitlements
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/licenses/refresh-entitlements \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /licenses/refresh-entitlements`
### Example responses
> 201 Response
```json
{
"detail": "string",
"message": "string",
"validations": [
{
"detail": "string",
"field": "string"
}
]
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------ | ----------- | ------------------------------------------------ |
| 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).
## Get organizations
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/organizations \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /organizations`
### Example responses
> 200 Response
```json
[
{
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"display_name": "string",
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"is_default": true,
"name": "string",
"updated_at": "2019-08-24T14:15:22Z"
}
]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ----------------------------------------------------------------- |
| 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>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| ---------------- | ----------------- | -------- | ------------ | ----------- |
| `[array item]` | array | false | | |
| `» created_at` | string(date-time) | true | | |
| `» description` | string | false | | |
| `» display_name` | string | false | | |
| `» icon` | string | false | | |
| `» id` | string(uuid) | true | | |
| `» is_default` | boolean | true | | |
| `» name` | string | false | | |
| `» updated_at` | string(date-time) | true | | |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Create organization
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/organizations \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /organizations`
> Body parameter
```json
{
"description": "string",
"display_name": "string",
"icon": "string",
"name": "string"
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | ---------------------------------------------------------------------------------- | -------- | --------------------------- |
| `body` | body | [codersdk.CreateOrganizationRequest](schemas.md#codersdkcreateorganizationrequest) | true | Create organization request |
### Example responses
> 201 Response
```json
{
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"display_name": "string",
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"is_default": true,
"name": "string",
"updated_at": "2019-08-24T14:15:22Z"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------------ | ----------- | -------------------------------------------------------- |
| 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).
## Get organization by ID
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/organizations/{organization} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /organizations/{organization}`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | ------------ | -------- | --------------- |
| `organization` | path | string(uuid) | true | Organization ID |
### Example responses
> 200 Response
```json
{
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"display_name": "string",
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"is_default": true,
"name": "string",
"updated_at": "2019-08-24T14:15:22Z"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------- |
| 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).
## Delete organization
### Code samples
```shell
# Example request using curl
curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`DELETE /organizations/{organization}`
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | ------ | -------- | ----------------------- |
| `organization` | path | string | true | Organization ID or name |
### Example responses
> 200 Response
```json
{
"detail": "string",
"message": "string",
"validations": [
{
"detail": "string",
"field": "string"
}
]
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------ |
| 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).
## Update organization
### Code samples
```shell
# Example request using curl
curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`PATCH /organizations/{organization}`
> Body parameter
```json
{
"description": "string",
"display_name": "string",
"icon": "string",
"name": "string"
}
```
### Parameters
| Name | In | Type | Required | Description |
| -------------- | ---- | ---------------------------------------------------------------------------------- | -------- | -------------------------- |
| `organization` | path | string | true | Organization ID or name |
| `body` | body | [codersdk.UpdateOrganizationRequest](schemas.md#codersdkupdateorganizationrequest) | true | Patch organization request |
### Example responses
> 200 Response
```json
{
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"display_name": "string",
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"is_default": true,
"name": "string",
"updated_at": "2019-08-24T14:15:22Z"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------- |
| 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).
+92
View File
@@ -0,0 +1,92 @@
# PortSharing
## Get workspace agent port shares
### Code samples
```shell
# Example request using curl
curl -X DELETE http://coder-server:8080/api/v2/workspaces/{workspace}/port-share \
-H 'Content-Type: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`DELETE /workspaces/{workspace}/port-share`
> Body parameter
```json
{
"agent_name": "string",
"port": 0
}
```
### Parameters
| Name | In | Type | Required | Description |
| ----------- | ---- | -------------------------------------------------------------------------------------------------------- | -------- | --------------------------------- |
| `workspace` | path | string(uuid) | true | Workspace ID |
| `body` | body | [codersdk.DeleteWorkspaceAgentPortShareRequest](schemas.md#codersdkdeleteworkspaceagentportsharerequest) | true | Delete port sharing level request |
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ |
| 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).
## Upsert workspace agent port share
### Code samples
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/port-share \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /workspaces/{workspace}/port-share`
> Body parameter
```json
{
"agent_name": "string",
"port": 0,
"protocol": "http",
"share_level": "owner"
}
```
### Parameters
| Name | In | Type | Required | Description |
| ----------- | ---- | -------------------------------------------------------------------------------------------------------- | -------- | --------------------------------- |
| `workspace` | path | string(uuid) | true | Workspace ID |
| `body` | body | [codersdk.UpsertWorkspaceAgentPortShareRequest](schemas.md#codersdkupsertworkspaceagentportsharerequest) | true | Upsert port sharing level request |
### Example responses
> 200 Response
```json
{
"agent_name": "string",
"port": 0,
"protocol": "http",
"share_level": "owner",
"workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9"
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------ |
| 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).
+9739
View File
File diff suppressed because it is too large Load Diff
+2821
View File
File diff suppressed because it is too large Load Diff
+1390
View File
File diff suppressed because it is too large Load Diff
+42
View File
@@ -0,0 +1,42 @@
# WorkspaceProxies
## Get site-wide regions for workspace connections
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/regions \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /regions`
### Example responses
> 200 Response
```json
{
"regions": [
{
"display_name": "string",
"healthy": true,
"icon_url": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"path_app_url": "string",
"wildcard_hostname": "string"
}
]
}
```
### Responses
| 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) |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
+1703
View File
File diff suppressed because it is too large Load Diff
+168
View File
@@ -0,0 +1,168 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# coder
## Usage
```console
coder [global-flags] <subcommand>
```
## Description
```console
Coder — A tool for provisioning self-hosted development environments with Terraform.
- Start a Coder server:
$ coder server
- Get started by creating a template from an example:
$ coder templates init
```
## Subcommands
| Name | Purpose |
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [<code>dotfiles</code>](./dotfiles.md) | Personalize your workspace by applying a canonical dotfiles repository |
| [<code>external-auth</code>](./external-auth.md) | Manage external authentication |
| [<code>login</code>](./login.md) | Authenticate with Coder deployment |
| [<code>logout</code>](./logout.md) | Unauthenticate your local session |
| [<code>netcheck</code>](./netcheck.md) | Print network debug information for DERP and STUN |
| [<code>notifications</code>](./notifications.md) | Manage Coder notifications |
| [<code>port-forward</code>](./port-forward.md) | Forward ports from a workspace to the local machine. For reverse port forwarding, use "coder ssh -R". |
| [<code>publickey</code>](./publickey.md) | Output your Coder public key used for Git operations |
| [<code>reset-password</code>](./reset-password.md) | Directly connect to the database to reset a user's password |
| [<code>state</code>](./state.md) | Manually manage Terraform state to fix broken workspaces |
| [<code>templates</code>](./templates.md) | Manage templates |
| [<code>tokens</code>](./tokens.md) | Manage personal access tokens |
| [<code>users</code>](./users.md) | Manage users |
| [<code>version</code>](./version.md) | Show coder version |
| [<code>autoupdate</code>](./autoupdate.md) | Toggle auto-update policy for a workspace |
| [<code>config-ssh</code>](./config-ssh.md) | Add an SSH Host entry for your workspaces "ssh coder.workspace" |
| [<code>create</code>](./create.md) | Create a workspace |
| [<code>delete</code>](./delete.md) | Delete a workspace |
| [<code>favorite</code>](./favorite.md) | Add a workspace to your favorites |
| [<code>list</code>](./list.md) | List workspaces |
| [<code>open</code>](./open.md) | Open a workspace |
| [<code>ping</code>](./ping.md) | Ping a workspace |
| [<code>rename</code>](./rename.md) | Rename a workspace |
| [<code>restart</code>](./restart.md) | Restart a workspace |
| [<code>schedule</code>](./schedule.md) | Schedule automated start and stop times for workspaces |
| [<code>show</code>](./show.md) | Display details of a workspace's resources and agents |
| [<code>speedtest</code>](./speedtest.md) | Run upload and download tests from your machine to a workspace |
| [<code>ssh</code>](./ssh.md) | Start a shell into a workspace |
| [<code>start</code>](./start.md) | Start a workspace |
| [<code>stat</code>](./stat.md) | Show resource usage for the current workspace. |
| [<code>stop</code>](./stop.md) | Stop a workspace |
| [<code>unfavorite</code>](./unfavorite.md) | Remove a workspace from your favorites |
| [<code>update</code>](./update.md) | Will update and start a given workspace if it is out of date |
| [<code>whoami</code>](./whoami.md) | Fetch authenticated user info for Coder deployment |
| [<code>support</code>](./support.md) | Commands for troubleshooting issues with a Coder deployment. |
| [<code>server</code>](./server.md) | Start a Coder server |
| [<code>features</code>](./features.md) | List Enterprise features |
| [<code>licenses</code>](./licenses.md) | Add, delete, and list licenses |
| [<code>groups</code>](./groups.md) | Manage groups |
| [<code>provisionerd</code>](./provisionerd.md) | Manage provisioner daemons |
## Options
### --url
| | |
| ----------- | ----------------------- |
| Type | <code>url</code> |
| Environment | <code>$CODER_URL</code> |
URL to a deployment.
### --debug-options
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Print all options, how they're set, then exit.
### --token
| | |
| ----------- | --------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_SESSION_TOKEN</code> |
Specify an authentication token. For security reasons setting CODER_SESSION_TOKEN is preferred.
### --no-version-warning
| | |
| ----------- | -------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_NO_VERSION_WARNING</code> |
Suppress warning when client and server versions do not match.
### --no-feature-warning
| | |
| ----------- | -------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_NO_FEATURE_WARNING</code> |
Suppress warnings about unlicensed features.
### --header
| | |
| ----------- | -------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_HEADER</code> |
Additional HTTP headers added to all requests. Provide as key=value. Can be specified multiple times.
### --header-command
| | |
| ----------- | ---------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_HEADER_COMMAND</code> |
An external command that outputs additional HTTP headers added to all requests. The command must output each header as `key=value` on its own line.
### -v, --verbose
| | |
| ----------- | --------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_VERBOSE</code> |
Enable verbose output.
### --disable-direct-connections
| | |
| ----------- | ---------------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_DISABLE_DIRECT_CONNECTIONS</code> |
Disable direct (P2P) connections to workspaces.
### --disable-network-telemetry
| | |
| ----------- | --------------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_DISABLE_NETWORK_TELEMETRY</code> |
Disable network telemetry. Network telemetry is collected when connecting to workspaces using the CLI, and is forwarded to the server. If telemetry is also enabled on the server, it may be sent to Coder. Network telemetry is used to measure network quality and detect regressions.
### --global-config
| | |
| ----------- | ------------------------------ |
| Type | <code>string</code> |
| Environment | <code>$CODER_CONFIG_DIR</code> |
| Default | <code>~/.config/coderv2</code> |
Path to the global `coder` config directory.
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# autoupdate
Toggle auto-update policy for a workspace
## Usage
```console
coder autoupdate [flags] <workspace> <always|never>
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+109
View File
@@ -0,0 +1,109 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# config-ssh
Add an SSH Host entry for your workspaces "ssh coder.workspace"
## Usage
```console
coder config-ssh [flags]
```
## Description
```console
- You can use -o (or --ssh-option) so set SSH options to be used for all your
workspaces:
$ coder config-ssh -o ForwardAgent=yes
- You can use --dry-run (or -n) to see the changes that would be made:
$ coder config-ssh --dry-run
```
## Options
### --ssh-config-file
| | |
| ----------- | ----------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_SSH_CONFIG_FILE</code> |
| Default | <code>~/.ssh/config</code> |
Specifies the path to an SSH config.
### --coder-binary-path
| | |
| ----------- | ------------------------------------------ |
| Type | <code>string</code> |
| Environment | <code>$CODER_SSH_CONFIG_BINARY_PATH</code> |
Optionally specify the absolute path to the coder binary used in ProxyCommand. By default, the binary invoking this command ('config ssh') is used.
### -o, --ssh-option
| | |
| ----------- | ----------------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_SSH_CONFIG_OPTS</code> |
Specifies additional SSH options to embed in each host stanza.
### -n, --dry-run
| | |
| ----------- | ------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_SSH_DRY_RUN</code> |
Perform a trial run with no changes made, showing a diff at the end.
### --use-previous-options
| | |
| ----------- | -------------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_SSH_USE_PREVIOUS_OPTIONS</code> |
Specifies whether or not to keep options from previous run of config-ssh.
### --ssh-host-prefix
| | |
| ----------- | --------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_CONFIGSSH_SSH_HOST_PREFIX</code> |
Override the default host prefix.
### --wait
| | |
| ----------- | ---------------------------------- |
| Type | <code>enum[yes\|no\|auto]</code> |
| Environment | <code>$CODER_CONFIGSSH_WAIT</code> |
| Default | <code>auto</code> |
Specifies whether or not to wait for the startup script to finish executing. Auto means that the agent startup script behavior configured in the workspace template is used.
### --disable-autostart
| | |
| ----------- | ----------------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_CONFIGSSH_DISABLE_AUTOSTART</code> |
| Default | <code>false</code> |
Disable starting the workspace automatically when connecting via SSH.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+111
View File
@@ -0,0 +1,111 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# create
Create a workspace
## Usage
```console
coder create [flags] [name]
```
## Description
```console
- Create a workspace for another user (if you have permission):
$ coder create <username>/<workspace_name>
```
## Options
### -t, --template
| | |
| ----------- | --------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_TEMPLATE_NAME</code> |
Specify a template name.
### --start-at
| | |
| ----------- | -------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_WORKSPACE_START_AT</code> |
Specify the workspace autostart schedule. Check coder schedule start --help for the syntax.
### --stop-after
| | |
| ----------- | ---------------------------------------- |
| Type | <code>duration</code> |
| Environment | <code>$CODER_WORKSPACE_STOP_AFTER</code> |
Specify a duration after which the workspace should shut down (e.g. 8h).
### --automatic-updates
| | |
| ----------- | ----------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_WORKSPACE_AUTOMATIC_UPDATES</code> |
| Default | <code>never</code> |
Specify automatic updates setting for the workspace (accepts 'always' or 'never').
### --copy-parameters-from
| | |
| ----------- | -------------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_WORKSPACE_COPY_PARAMETERS_FROM</code> |
Specify the source workspace name to copy parameters from.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
### --parameter
| | |
| ----------- | ---------------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_RICH_PARAMETER</code> |
Rich parameter value in the format "name=value".
### --rich-parameter-file
| | |
| ----------- | --------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_RICH_PARAMETER_FILE</code> |
Specify a file path with values for rich parameters defined in the template.
### --parameter-default
| | |
| ----------- | ------------------------------------------ |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_RICH_PARAMETER_DEFAULT</code> |
Rich parameter default values in the format "name=value".
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
+33
View File
@@ -0,0 +1,33 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# delete
Delete a workspace
Aliases:
- rm
## Usage
```console
coder delete [flags] <workspace>
```
## Options
### --orphan
| | |
| ---- | ----------------- |
| 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.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+56
View File
@@ -0,0 +1,56 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# dotfiles
Personalize your workspace by applying a canonical dotfiles repository
## Usage
```console
coder dotfiles [flags] <git_repo_url>
```
## Description
```console
- Check out and install a dotfiles repository without prompts:
$ coder dotfiles --yes git@github.com:example/dotfiles.git
```
## Options
### --symlink-dir
| | |
| ----------- | ------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_SYMLINK_DIR</code> |
Specifies the directory for the dotfiles symlink destinations. If empty, will use $HOME.
### -b, --branch
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Specifies which branch to clone. If empty, will default to cloning the default branch or using the existing branch in the cloned repo on disk.
### --repo-dir
| | |
| ----------- | ------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_DOTFILES_REPO_DIR</code> |
| Default | <code>dotfiles</code> |
Specifies the directory for the dotfiles repository, relative to global config directory.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+23
View File
@@ -0,0 +1,23 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# external-auth
Manage external authentication
## Usage
```console
coder external-auth
```
## Description
```console
Authenticate with external services inside of a workspace.
```
## Subcommands
| Name | Purpose |
| ------------------------------------------------------------ | ----------------------------------- |
| [<code>access-token</code>](./external-auth_access-token.md) | Print auth for an external provider |
+43
View File
@@ -0,0 +1,43 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# external-auth access-token
Print auth for an external provider
## Usage
```console
coder external-auth access-token [flags] <provider>
```
## Description
```console
Print an access-token for an external auth provider. The access-token will be validated and sent to stdout with exit code 0. If a valid access-token cannot be obtained, the URL to authenticate will be sent to stdout with exit code 1
- Ensure that the user is authenticated with GitHub before cloning.:
$ #!/usr/bin/env sh
OUTPUT=$(coder external-auth access-token github)
if [ $? -eq 0 ]; then
echo "Authenticated with GitHub"
else
echo "Please authenticate with GitHub:"
echo $OUTPUT
fi
- Obtain an extra property of an access token for additional metadata.:
$ coder external-auth access-token slack --extra "authed_user.id"
```
## Options
### --extra
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Extract a field from the "extra" properties of the OAuth token.
+16
View File
@@ -0,0 +1,16 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# favorite
Add a workspace to your favorites
Aliases:
- fav
- favourite
## Usage
```console
coder favorite <workspace>
```
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# features
List Enterprise features
Aliases:
- feature
## Usage
```console
coder features
```
## Subcommands
| Name | Purpose |
| --------------------------------------- | ------- |
| [<code>list</code>](./features_list.md) | |
+33
View File
@@ -0,0 +1,33 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# features list
Aliases:
- ls
## Usage
```console
coder features list [flags]
```
## Options
### -c, --column
| | |
| ------- | -------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>Name,Entitlement,Enabled,Limit,Actual</code> |
Specify a column to filter in the table. Available columns are: Name, Entitlement, Enabled, Limit, Actual.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
Output format. Available formats are: table, json.
+24
View File
@@ -0,0 +1,24 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# groups
Manage groups
Aliases:
- group
## Usage
```console
coder groups
```
## Subcommands
| Name | Purpose |
| ----------------------------------------- | ------------------- |
| [<code>create</code>](./groups_create.md) | Create a user group |
| [<code>list</code>](./groups_list.md) | List user groups |
| [<code>edit</code>](./groups_edit.md) | Edit a user group |
| [<code>delete</code>](./groups_delete.md) | Delete a user group |
+40
View File
@@ -0,0 +1,40 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# groups create
Create a user group
## Usage
```console
coder groups create [flags] <name>
```
## Options
### -u, --avatar-url
| | |
| ----------- | ------------------------------ |
| Type | <code>string</code> |
| Environment | <code>$CODER_AVATAR_URL</code> |
Set an avatar for a group.
### --display-name
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_DISPLAY_NAME</code> |
Optional human friendly name for the group.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
+26
View File
@@ -0,0 +1,26 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# groups delete
Delete a user group
Aliases:
- rm
## Usage
```console
coder groups delete [flags] <name>
```
## Options
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
+63
View File
@@ -0,0 +1,63 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# groups edit
Edit a user group
## Usage
```console
coder groups edit [flags] <name>
```
## Options
### -n, --name
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Update the group name.
### -u, --avatar-url
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Update the group avatar.
### --display-name
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_DISPLAY_NAME</code> |
Optional human friendly name for the group.
### -a, --add-users
| | |
| ---- | ------------------------- |
| Type | <code>string-array</code> |
Add users to the group. Accepts emails or IDs.
### -r, --rm-users
| | |
| ---- | ------------------------- |
| Type | <code>string-array</code> |
Remove users to the group. Accepts emails or IDs.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
+40
View File
@@ -0,0 +1,40 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# groups list
List user groups
## Usage
```console
coder groups list [flags]
```
## Options
### -c, --column
| | |
| ------- | ----------------------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>name,display name,organization id,members,avatar url</code> |
Columns to display in table output. Available columns: name, display name, organization id, members, avatar url.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
+23
View File
@@ -0,0 +1,23 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# licenses
Add, delete, and list licenses
Aliases:
- license
## Usage
```console
coder licenses
```
## Subcommands
| Name | Purpose |
| ------------------------------------------- | --------------------------------- |
| [<code>add</code>](./licenses_add.md) | Add license to Coder deployment |
| [<code>list</code>](./licenses_list.md) | List licenses (including expired) |
| [<code>delete</code>](./licenses_delete.md) | Delete license by ID |
+37
View File
@@ -0,0 +1,37 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# licenses add
Add license to Coder deployment
## Usage
```console
coder licenses add [flags] [-f file | -l license]
```
## Options
### -f, --file
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Load license from file.
### -l, --license
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
License string.
### --debug
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Output license claims for debugging.
+16
View File
@@ -0,0 +1,16 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# licenses delete
Delete license by ID
Aliases:
- del
- rm
## Usage
```console
coder licenses delete <id>
```
+35
View File
@@ -0,0 +1,35 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# licenses list
List licenses (including expired)
Aliases:
- ls
## Usage
```console
coder licenses list [flags]
```
## Options
### -c, --column
| | |
| ------- | ---------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>ID,UUID,Expires At,Uploaded At,Features</code> |
Columns to display in table output. Available columns: id, uuid, uploaded at, features, expires at, trial.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
+52
View File
@@ -0,0 +1,52 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# list
List workspaces
Aliases:
- ls
## Usage
```console
coder list [flags]
```
## Options
### -a, --all
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Specifies whether all workspaces will be listed or not.
### --search
| | |
| ------- | --------------------- |
| Type | <code>string</code> |
| Default | <code>owner:me</code> |
Search for a workspace with a query.
### -c, --column
| | |
| ------- | -------------------------------------------------------------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>workspace,template,status,healthy,last built,current version,outdated,starts at,stops after</code> |
Columns to display in table output. Available columns: favorite, workspace, organization id, organization name, template, status, healthy, last built, current version, outdated, starts at, starts next, stops after, stops next, daily cost.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
+66
View File
@@ -0,0 +1,66 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# login
Authenticate with Coder deployment
## Usage
```console
coder login [flags] [<url>]
```
## Options
### --first-user-email
| | |
| ----------- | ------------------------------------ |
| Type | <code>string</code> |
| Environment | <code>$CODER_FIRST_USER_EMAIL</code> |
Specifies an email address to use if creating the first user for the deployment.
### --first-user-username
| | |
| ----------- | --------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_FIRST_USER_USERNAME</code> |
Specifies a username to use if creating the first user for the deployment.
### --first-user-full-name
| | |
| ----------- | ---------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_FIRST_USER_FULL_NAME</code> |
Specifies a human-readable name for the first user of the deployment.
### --first-user-password
| | |
| ----------- | --------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_FIRST_USER_PASSWORD</code> |
Specifies a password to use if creating the first user for the deployment.
### --first-user-trial
| | |
| ----------- | ------------------------------------ |
| Type | <code>bool</code> |
| Environment | <code>$CODER_FIRST_USER_TRIAL</code> |
Specifies whether a trial license should be provisioned for the Coder deployment or not.
### --use-token-as-session
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
By default, the CLI will generate a new session token when logging in. This flag will instead use the provided token as the session token.
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# logout
Unauthenticate your local session
## Usage
```console
coder logout [flags]
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+11
View File
@@ -0,0 +1,11 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# netcheck
Print network debug information for DERP and STUN
## Usage
```console
coder netcheck
```
+37
View File
@@ -0,0 +1,37 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# notifications
Manage Coder notifications
Aliases:
- notification
## Usage
```console
coder notifications
```
## Description
```console
Administrators can use these commands to change notification settings.
- Pause Coder notifications. Administrators can temporarily stop notifiers from
dispatching messages in case of the target outage (for example: unavailable SMTP
server or Webhook not responding).:
$ coder notifications pause
- Resume Coder notifications:
$ coder notifications resume
```
## Subcommands
| Name | Purpose |
| ------------------------------------------------ | -------------------- |
| [<code>pause</code>](./notifications_pause.md) | Pause notifications |
| [<code>resume</code>](./notifications_resume.md) | Resume notifications |
+11
View File
@@ -0,0 +1,11 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# notifications pause
Pause notifications
## Usage
```console
coder notifications pause
```
+11
View File
@@ -0,0 +1,11 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# notifications resume
Resume notifications
## Usage
```console
coder notifications resume
```
+17
View File
@@ -0,0 +1,17 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# open
Open a workspace
## Usage
```console
coder open
```
## Subcommands
| Name | Purpose |
| --------------------------------------- | ----------------------------------- |
| [<code>vscode</code>](./open_vscode.md) | Open a workspace in VS Code Desktop |
+22
View File
@@ -0,0 +1,22 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# open vscode
Open a workspace in VS Code Desktop
## Usage
```console
coder open vscode [flags] <workspace> [<directory in workspace>]
```
## Options
### --generate-token
| | |
| ----------- | ---------------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_OPEN_VSCODE_GENERATE_TOKEN</code> |
Generate an auth token and include it in the vscode:// URI. This is for automagical configuration of VS Code Desktop and not needed if already configured. This flag does not need to be specified when running this command on a local machine unless automatic open fails.
+40
View File
@@ -0,0 +1,40 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# ping
Ping a workspace
## Usage
```console
coder ping [flags] <workspace>
```
## Options
### --wait
| | |
| ------- | --------------------- |
| Type | <code>duration</code> |
| Default | <code>1s</code> |
Specifies how long to wait between pings.
### -t, --timeout
| | |
| ------- | --------------------- |
| Type | <code>duration</code> |
| Default | <code>5s</code> |
Specifies how long to wait for a ping to complete.
### -n, --num
| | |
| ------- | ---------------- |
| Type | <code>int</code> |
| Default | <code>10</code> |
Specifies the number of pings to perform.
+71
View File
@@ -0,0 +1,71 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# port-forward
Forward ports from a workspace to the local machine. For reverse port forwarding, use "coder ssh -R".
Aliases:
- tunnel
## Usage
```console
coder port-forward [flags] <workspace>
```
## Description
```console
- Port forward a single TCP port from 1234 in the workspace to port 5678 on your
local machine:
$ coder port-forward <workspace> --tcp 5678:1234
- Port forward a single UDP port from port 9000 to port 9000 on your local
machine:
$ coder port-forward <workspace> --udp 9000
- Port forward multiple TCP ports and a UDP port:
$ coder port-forward <workspace> --tcp 8080:8080 --tcp 9000:3000 --udp 5353:53
- Port forward multiple ports (TCP or UDP) in condensed syntax:
$ coder port-forward <workspace> --tcp 8080,9000:3000,9090-9092,10000-10002:10010-10012
- Port forward specifying the local address to bind to:
$ coder port-forward <workspace> --tcp 1.2.3.4:8080:8080
```
## Options
### -p, --tcp
| | |
| ----------- | ------------------------------------ |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_PORT_FORWARD_TCP</code> |
Forward TCP port(s) from the workspace to the local machine.
### --udp
| | |
| ----------- | ------------------------------------ |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_PORT_FORWARD_UDP</code> |
Forward UDP port(s) from the workspace to the local machine. The UDP connection has TCP-like semantics to support stateful UDP protocols.
### --disable-autostart
| | |
| ----------- | ----------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_SSH_DISABLE_AUTOSTART</code> |
| Default | <code>false</code> |
Disable starting the workspace automatically when connecting via SSH.
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# provisionerd
Manage provisioner daemons
Aliases:
- provisioner
## Usage
```console
coder provisionerd
```
## Subcommands
| Name | Purpose |
| --------------------------------------------- | ------------------------ |
| [<code>start</code>](./provisionerd_start.md) | Run a provisioner daemon |
+146
View File
@@ -0,0 +1,146 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# provisionerd start
Run a provisioner daemon
## Usage
```console
coder provisionerd start [flags]
```
## Options
### -c, --cache-dir
| | |
| ----------- | ----------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_CACHE_DIRECTORY</code> |
| Default | <code>~/.cache/coder</code> |
Directory to store cached data.
### -t, --tag
| | |
| ----------- | ------------------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_PROVISIONERD_TAGS</code> |
Tags to filter provisioner jobs by.
### --poll-interval
| | |
| ----------- | ---------------------------------------------- |
| Type | <code>duration</code> |
| Environment | <code>$CODER_PROVISIONERD_POLL_INTERVAL</code> |
| Default | <code>1s</code> |
Deprecated and ignored.
### --poll-jitter
| | |
| ----------- | -------------------------------------------- |
| Type | <code>duration</code> |
| Environment | <code>$CODER_PROVISIONERD_POLL_JITTER</code> |
| Default | <code>100ms</code> |
Deprecated and ignored.
### --psk
| | |
| ----------- | ------------------------------------------ |
| Type | <code>string</code> |
| Environment | <code>$CODER_PROVISIONER_DAEMON_PSK</code> |
Pre-shared key to authenticate with Coder server.
### --name
| | |
| ----------- | ------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PROVISIONER_DAEMON_NAME</code> |
Name of this provisioner daemon. Defaults to the current hostname without FQDN.
### --verbose
| | |
| ----------- | ---------------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_PROVISIONER_DAEMON_VERBOSE</code> |
| Default | <code>false</code> |
Output debug-level logs.
### --log-human
| | |
| ----------- | ---------------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PROVISIONER_DAEMON_LOGGING_HUMAN</code> |
| Default | <code>/dev/stderr</code> |
Output human-readable logs to a given file.
### --log-json
| | |
| ----------- | --------------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PROVISIONER_DAEMON_LOGGING_JSON</code> |
Output JSON logs to a given file.
### --log-stackdriver
| | |
| ----------- | ---------------------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PROVISIONER_DAEMON_LOGGING_STACKDRIVER</code> |
Output Stackdriver compatible logs to a given file.
### --log-filter
| | |
| ----------- | ------------------------------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_PROVISIONER_DAEMON_LOG_FILTER</code> |
Filter debug logs by matching against a given regex. Use .\* to match all debug logs.
### --prometheus-enable
| | |
| ----------- | ------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_PROMETHEUS_ENABLE</code> |
| Default | <code>false</code> |
Serve prometheus metrics on the address defined by prometheus address.
### --prometheus-address
| | |
| ----------- | -------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PROMETHEUS_ADDRESS</code> |
| Default | <code>127.0.0.1:2112</code> |
The bind address to serve prometheus metrics.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
+33
View File
@@ -0,0 +1,33 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# publickey
Output your Coder public key used for Git operations
Aliases:
- pubkey
## Usage
```console
coder publickey [flags]
```
## Options
### --reset
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Regenerate your public key. This will require updating the key on any services it's registered with.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# rename
Rename a workspace
## Usage
```console
coder rename [flags] <workspace> <new name>
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+22
View File
@@ -0,0 +1,22 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# reset-password
Directly connect to the database to reset a user's password
## Usage
```console
coder reset-password [flags] <username>
```
## Options
### --postgres-url
| | |
| ----------- | ------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PG_CONNECTION_URL</code> |
URL of a PostgreSQL database to connect to.
+73
View File
@@ -0,0 +1,73 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# restart
Restart a workspace
## Usage
```console
coder restart [flags] <workspace>
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
### --build-option
| | |
| ----------- | -------------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_BUILD_OPTION</code> |
Build option value in the format "name=value".
### --build-options
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Prompt for one-time build options defined with ephemeral parameters.
### --parameter
| | |
| ----------- | ---------------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_RICH_PARAMETER</code> |
Rich parameter value in the format "name=value".
### --rich-parameter-file
| | |
| ----------- | --------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_RICH_PARAMETER_FILE</code> |
Specify a file path with values for rich parameters defined in the template.
### --parameter-default
| | |
| ----------- | ------------------------------------------ |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_RICH_PARAMETER_DEFAULT</code> |
Rich parameter default values in the format "name=value".
### --always-prompt
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Always prompt all parameters. Does not pull parameter values from existing workspace.
+20
View File
@@ -0,0 +1,20 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# schedule
Schedule automated start and stop times for workspaces
## Usage
```console
coder schedule { show | start | stop | override } <workspace>
```
## Subcommands
| Name | Purpose |
| --------------------------------------------------------- | ----------------------------------------------------------------- |
| [<code>show</code>](./schedule_show.md) | Show workspace schedules |
| [<code>start</code>](./schedule_start.md) | Edit workspace start schedule |
| [<code>stop</code>](./schedule_stop.md) | Edit workspace stop schedule |
| [<code>override-stop</code>](./schedule_override-stop.md) | Override the stop time of a currently running workspace instance. |
+22
View File
@@ -0,0 +1,22 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# schedule override-stop
Override the stop time of a currently running workspace instance.
## Usage
```console
coder schedule override-stop <workspace-name> <duration from now>
```
## Description
```console
* The new stop time is calculated from *now*.
* The new stop time must be at least 30 minutes in the future.
* The workspace template may restrict the maximum workspace runtime.
$ coder schedule override-stop my-workspace 90m
```
+59
View File
@@ -0,0 +1,59 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# schedule show
Show workspace schedules
## Usage
```console
coder schedule show [flags] <workspace | --search <query> | --all>
```
## Description
```console
Shows the following information for the given workspace(s):
* The automatic start schedule
* The next scheduled start time
* The duration after which it will stop
* The next scheduled stop time
```
## Options
### -a, --all
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Specifies whether all workspaces will be listed or not.
### --search
| | |
| ------- | --------------------- |
| Type | <code>string</code> |
| Default | <code>owner:me</code> |
Search for a workspace with a query.
### -c, --column
| | |
| ------- | ------------------------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>workspace,starts at,starts next,stops after,stops next</code> |
Columns to display in table output. Available columns: workspace, starts at, starts next, stops after, stops next.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
+29
View File
@@ -0,0 +1,29 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# schedule start
Edit workspace start schedule
## Usage
```console
coder schedule start <workspace-name> { <start-time> [day-of-week] [location] | manual }
```
## Description
```console
Schedules a workspace to regularly start at a specific time.
Schedule format: <start-time> [day-of-week] [location].
* Start-time (required) is accepted either in 12-hour (hh:mm{am|pm}) format, or 24-hour format hh:mm.
* Day-of-week (optional) allows specifying in the cron format, e.g. 1,3,5 or Mon-Fri.
Aliases such as @daily are not supported.
Default: * (every day)
* Location (optional) must be a valid location in the IANA timezone database.
If omitted, we will fall back to either the TZ environment variable or /etc/localtime.
You can check your corresponding location by visiting https://ipinfo.io - it shows in the demo widget on the right.
- Set the workspace to start at 9:30am (in Dublin) from Monday to Friday:
$ coder schedule start my-workspace 9:30AM Mon-Fri Europe/Dublin
```
+30
View File
@@ -0,0 +1,30 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# schedule stop
Edit workspace stop schedule
## Usage
```console
coder schedule stop <workspace-name> { <duration> | manual }
```
## Description
```console
Schedules a workspace to stop after a given duration has elapsed.
* Workspace runtime is measured from the time that the workspace build completed.
* The minimum scheduled stop time is 1 minute.
* The workspace template may place restrictions on the maximum shutdown time.
* Changes to workspace schedules only take effect upon the next build of the workspace,
and do not affect a running instance of a workspace.
When enabling scheduled stop, enter a duration in one of the following formats:
* 3h2m (3 hours and two minutes)
* 3h (3 hours)
* 2m (2 minutes)
* 2 (2 minutes)
$ coder schedule stop my-workspace 2h30m
```
+1392
View File
File diff suppressed because it is too large Load Diff
+77
View File
@@ -0,0 +1,77 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# server create-admin-user
Create a new admin user with the given username, email and password and adds it to every organization.
## Usage
```console
coder server create-admin-user [flags]
```
## Options
### --postgres-url
| | |
| ----------- | ------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PG_CONNECTION_URL</code> |
URL of a PostgreSQL database. If empty, the built-in PostgreSQL deployment will be used (Coder must not be already running in this case).
### --postgres-connection-auth
| | |
| ----------- | -------------------------------------- |
| Type | <code>enum[password\|awsiamrds]</code> |
| Environment | <code>$CODER_PG_CONNECTION_AUTH</code> |
| Default | <code>password</code> |
Type of auth to use when connecting to postgres.
### --ssh-keygen-algorithm
| | |
| ----------- | ---------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_SSH_KEYGEN_ALGORITHM</code> |
| Default | <code>ed25519</code> |
The algorithm to use for generating ssh keys. Accepted values are "ed25519", "ecdsa", or "rsa4096".
### --username
| | |
| ----------- | ---------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_USERNAME</code> |
The username of the new user. If not specified, you will be prompted via stdin.
### --email
| | |
| ----------- | ------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_EMAIL</code> |
The email of the new user. If not specified, you will be prompted via stdin.
### --password
| | |
| ----------- | ---------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PASSWORD</code> |
The password of the new user. If not specified, you will be prompted via stdin.
### --raw-url
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Output the raw connection URL instead of a psql command.
+19
View File
@@ -0,0 +1,19 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# server dbcrypt
Manage database encryption.
## Usage
```console
coder server dbcrypt
```
## Subcommands
| Name | Purpose |
| --------------------------------------------------- | ----------------------------------------------------------------------------- |
| [<code>decrypt</code>](./server_dbcrypt_decrypt.md) | Decrypt a previously encrypted database. |
| [<code>delete</code>](./server_dbcrypt_delete.md) | Delete all encrypted data from the database. THIS IS A DESTRUCTIVE OPERATION. |
| [<code>rotate</code>](./server_dbcrypt_rotate.md) | Rotate database encryption keys. |
+49
View File
@@ -0,0 +1,49 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# server dbcrypt decrypt
Decrypt a previously encrypted database.
## Usage
```console
coder server dbcrypt decrypt [flags]
```
## Options
### --postgres-url
| | |
| ----------- | ------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PG_CONNECTION_URL</code> |
The connection URL for the Postgres database.
### --postgres-connection-auth
| | |
| ----------- | -------------------------------------- |
| Type | <code>enum[password\|awsiamrds]</code> |
| Environment | <code>$CODER_PG_CONNECTION_AUTH</code> |
| Default | <code>password</code> |
Type of auth to use when connecting to postgres.
### --keys
| | |
| ----------- | ---------------------------------------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_EXTERNAL_TOKEN_ENCRYPTION_DECRYPT_KEYS</code> |
Keys required to decrypt existing data. Must be a comma-separated list of base64-encoded keys.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+44
View File
@@ -0,0 +1,44 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# server dbcrypt delete
Delete all encrypted data from the database. THIS IS A DESTRUCTIVE OPERATION.
Aliases:
- rm
## Usage
```console
coder server dbcrypt delete [flags]
```
## Options
### --postgres-url
| | |
| ----------- | ---------------------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_EXTERNAL_TOKEN_ENCRYPTION_POSTGRES_URL</code> |
The connection URL for the Postgres database.
### --postgres-connection-auth
| | |
| ----------- | -------------------------------------- |
| Type | <code>enum[password\|awsiamrds]</code> |
| Environment | <code>$CODER_PG_CONNECTION_AUTH</code> |
| Default | <code>password</code> |
Type of auth to use when connecting to postgres.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+58
View File
@@ -0,0 +1,58 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# server dbcrypt rotate
Rotate database encryption keys.
## Usage
```console
coder server dbcrypt rotate [flags]
```
## Options
### --postgres-url
| | |
| ----------- | ------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PG_CONNECTION_URL</code> |
The connection URL for the Postgres database.
### --postgres-connection-auth
| | |
| ----------- | -------------------------------------- |
| Type | <code>enum[password\|awsiamrds]</code> |
| Environment | <code>$CODER_PG_CONNECTION_AUTH</code> |
| Default | <code>password</code> |
Type of auth to use when connecting to postgres.
### --new-key
| | |
| ----------- | ------------------------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_EXTERNAL_TOKEN_ENCRYPTION_ENCRYPT_NEW_KEY</code> |
The new external token encryption key. Must be base64-encoded.
### --old-keys
| | |
| ----------- | -------------------------------------------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_EXTERNAL_TOKEN_ENCRYPTION_ENCRYPT_OLD_KEYS</code> |
The old external token encryption keys. Must be a comma-separated list of base64-encoded keys.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# server postgres-builtin-serve
Run the built-in PostgreSQL deployment.
## Usage
```console
coder server postgres-builtin-serve [flags]
```
## Options
### --raw-url
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Output the raw connection URL instead of a psql command.
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# server postgres-builtin-url
Output the connection URL for the built-in PostgreSQL deployment.
## Usage
```console
coder server postgres-builtin-url [flags]
```
## Options
### --raw-url
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Output the raw connection URL instead of a psql command.
+11
View File
@@ -0,0 +1,11 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# show
Display details of a workspace's resources and agents
## Usage
```console
coder show <workspace>
```
+65
View File
@@ -0,0 +1,65 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# speedtest
Run upload and download tests from your machine to a workspace
## Usage
```console
coder speedtest [flags] <workspace>
```
## Options
### -d, --direct
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Specifies whether to wait for a direct connection before testing speed.
### --direction
| | |
| ------- | --------------------------- |
| Type | <code>enum[up\|down]</code> |
| Default | <code>down</code> |
Specifies whether to run in reverse mode where the client receives and the server sends.
### -t, --time
| | |
| ------- | --------------------- |
| Type | <code>duration</code> |
| Default | <code>5s</code> |
Specifies the duration to monitor traffic.
### --pcap-file
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Specifies a file to write a network capture to.
### -c, --column
| | |
| ------- | -------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>Interval,Throughput</code> |
Columns to display in table output. Available columns: Interval, Throughput.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
+115
View File
@@ -0,0 +1,115 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# ssh
Start a shell into a workspace
## Usage
```console
coder ssh [flags] <workspace>
```
## Options
### --stdio
| | |
| ----------- | ----------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_SSH_STDIO</code> |
Specifies whether to emit SSH output over stdin/stdout.
### -A, --forward-agent
| | |
| ----------- | ------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_SSH_FORWARD_AGENT</code> |
Specifies whether to forward the SSH agent specified in $SSH_AUTH_SOCK.
### -G, --forward-gpg
| | |
| ----------- | ----------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_SSH_FORWARD_GPG</code> |
Specifies whether to forward the GPG agent. Unsupported on Windows workspaces, but supports all clients. Requires gnupg (gpg, gpgconf) on both the client and workspace. The GPG agent must already be running locally and will not be started for you. If a GPG agent is already running in the workspace, it will be attempted to be killed.
### --identity-agent
| | |
| ----------- | -------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_SSH_IDENTITY_AGENT</code> |
Specifies which identity agent to use (overrides $SSH_AUTH_SOCK), forward agent must also be enabled.
### --workspace-poll-interval
| | |
| ----------- | ------------------------------------------- |
| Type | <code>duration</code> |
| Environment | <code>$CODER_WORKSPACE_POLL_INTERVAL</code> |
| Default | <code>1m</code> |
Specifies how often to poll for workspace automated shutdown.
### --wait
| | |
| ----------- | -------------------------------- |
| Type | <code>enum[yes\|no\|auto]</code> |
| Environment | <code>$CODER_SSH_WAIT</code> |
| Default | <code>auto</code> |
Specifies whether or not to wait for the startup script to finish executing. Auto means that the agent startup script behavior configured in the workspace template is used.
### --no-wait
| | |
| ----------- | ------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_SSH_NO_WAIT</code> |
Enter workspace immediately after the agent has connected. This is the default if the template has configured the agent startup script behavior as non-blocking.
### -l, --log-dir
| | |
| ----------- | ------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_SSH_LOG_DIR</code> |
Specify the directory containing SSH diagnostic log files.
### -R, --remote-forward
| | |
| ----------- | -------------------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_SSH_REMOTE_FORWARD</code> |
Enable remote port forwarding (remote_port:local_address:local_port).
### -e, --env
| | |
| ----------- | --------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_SSH_ENV</code> |
Set environment variable(s) for session (key1=value1,key2=value2,...).
### --disable-autostart
| | |
| ----------- | ----------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_SSH_DISABLE_AUTOSTART</code> |
| Default | <code>false</code> |
Disable starting the workspace automatically when connecting via SSH.
+73
View File
@@ -0,0 +1,73 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# start
Start a workspace
## Usage
```console
coder start [flags] <workspace>
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
### --build-option
| | |
| ----------- | -------------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_BUILD_OPTION</code> |
Build option value in the format "name=value".
### --build-options
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Prompt for one-time build options defined with ephemeral parameters.
### --parameter
| | |
| ----------- | ---------------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_RICH_PARAMETER</code> |
Rich parameter value in the format "name=value".
### --rich-parameter-file
| | |
| ----------- | --------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_RICH_PARAMETER_FILE</code> |
Specify a file path with values for rich parameters defined in the template.
### --parameter-default
| | |
| ----------- | ------------------------------------------ |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_RICH_PARAMETER_DEFAULT</code> |
Rich parameter default values in the format "name=value".
### --always-prompt
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Always prompt all parameters. Does not pull parameter values from existing workspace.
+39
View File
@@ -0,0 +1,39 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# stat
Show resource usage for the current workspace.
## Usage
```console
coder stat [flags]
```
## Subcommands
| Name | Purpose |
| ----------------------------------- | -------------------------------- |
| [<code>cpu</code>](./stat_cpu.md) | Show CPU usage, in cores. |
| [<code>mem</code>](./stat_mem.md) | Show memory usage, in gigabytes. |
| [<code>disk</code>](./stat_disk.md) | Show disk usage, in gigabytes. |
## Options
### -c, --column
| | |
| ------- | -------------------------------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>host_cpu,host_memory,home_disk,container_cpu,container_memory</code> |
Columns to display in table output. Available columns: host cpu, host memory, home disk, container cpu, container memory.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
+30
View File
@@ -0,0 +1,30 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# stat cpu
Show CPU usage, in cores.
## Usage
```console
coder stat cpu [flags]
```
## Options
### --host
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Force host CPU measurement.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>text</code> |
Output format. Available formats: text, json.
+40
View File
@@ -0,0 +1,40 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# stat disk
Show disk usage, in gigabytes.
## Usage
```console
coder stat disk [flags]
```
## Options
### --path
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>/</code> |
Path for which to check disk usage.
### --prefix
| | |
| ------- | --------------------------------- |
| Type | <code>enum[Ki\|Mi\|Gi\|Ti]</code> |
| Default | <code>Gi</code> |
SI Prefix for disk measurement.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>text</code> |
Output format. Available formats: text, json.
+39
View File
@@ -0,0 +1,39 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# stat mem
Show memory usage, in gigabytes.
## Usage
```console
coder stat mem [flags]
```
## Options
### --host
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Force host memory measurement.
### --prefix
| | |
| ------- | --------------------------------- |
| Type | <code>enum[Ki\|Mi\|Gi\|Ti]</code> |
| Default | <code>Gi</code> |
SI Prefix for memory measurement.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>text</code> |
Output format. Available formats: text, json.
+18
View File
@@ -0,0 +1,18 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# state
Manually manage Terraform state to fix broken workspaces
## Usage
```console
coder state
```
## Subcommands
| Name | Purpose |
| ------------------------------------ | --------------------------------------------- |
| [<code>pull</code>](./state_pull.md) | Pull a Terraform state file from a workspace. |
| [<code>push</code>](./state_push.md) | Push a Terraform state file to a workspace. |
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# state pull
Pull a Terraform state file from a workspace.
## Usage
```console
coder state pull [flags] <workspace> [file]
```
## Options
### -b, --build
| | |
| ---- | ---------------- |
| Type | <code>int</code> |
Specify a workspace build to target by name. Defaults to latest.
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# state push
Push a Terraform state file to a workspace.
## Usage
```console
coder state push [flags] <workspace> <file>
```
## Options
### -b, --build
| | |
| ---- | ---------------- |
| Type | <code>int</code> |
Specify a workspace build to target by name. Defaults to latest.
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# stop
Stop a workspace
## Usage
```console
coder stop [flags] <workspace>
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+17
View File
@@ -0,0 +1,17 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# support
Commands for troubleshooting issues with a Coder deployment.
## Usage
```console
coder support
```
## Subcommands
| Name | Purpose |
| ------------------------------------------ | --------------------------------------------------------------------------- |
| [<code>bundle</code>](./support_bundle.md) | Generate a support bundle to troubleshoot issues connecting to a workspace. |
+45
View File
@@ -0,0 +1,45 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# support bundle
Generate a support bundle to troubleshoot issues connecting to a workspace.
## Usage
```console
coder support bundle [flags] <workspace> [<agent>]
```
## Description
```console
This command generates a file containing detailed troubleshooting information about the Coder deployment and workspace connections. You must specify a single workspace (and optionally an agent name).
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
### -O, --output-file
| | |
| ----------- | ---------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_SUPPORT_BUNDLE_OUTPUT_FILE</code> |
File path for writing the generated support bundle. Defaults to coder-support-$(date +%s).zip.
### --url-override
| | |
| ----------- | ----------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_SUPPORT_BUNDLE_URL_OVERRIDE</code> |
Override the URL to your Coder deployment. This may be useful, for example, if you need to troubleshoot a specific Coder replica.
+39
View File
@@ -0,0 +1,39 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates
Manage templates
Aliases:
- template
## Usage
```console
coder templates
```
## Description
```console
Templates are written in standard Terraform and describe the infrastructure for workspaces
- Create or push an update to the template. Your developers can update their
workspaces:
$ coder templates push my-template
```
## Subcommands
| Name | Purpose |
| ------------------------------------------------ | -------------------------------------------------------------------------------- |
| [<code>create</code>](./templates_create.md) | DEPRECATED: Create a template from the current directory or as specified by flag |
| [<code>edit</code>](./templates_edit.md) | Edit the metadata of a template by name. |
| [<code>init</code>](./templates_init.md) | Get started with a templated template. |
| [<code>list</code>](./templates_list.md) | List all the templates available for the organization |
| [<code>push</code>](./templates_push.md) | Create or update a template from the current directory or as specified by flag |
| [<code>versions</code>](./templates_versions.md) | Manage different versions of the specified template |
| [<code>delete</code>](./templates_delete.md) | Delete templates |
| [<code>pull</code>](./templates_pull.md) | Download the active, latest, or specified version of a template to a path. |
| [<code>archive</code>](./templates_archive.md) | Archive unused or failed template versions from a given template(s) |
+38
View File
@@ -0,0 +1,38 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates archive
Archive unused or failed template versions from a given template(s)
## Usage
```console
coder templates archive [flags] [template-name...]
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
### --all
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Include all unused template versions. By default, only failed template versions are archived.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
+141
View File
@@ -0,0 +1,141 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates create
DEPRECATED: Create a template from the current directory or as specified by flag
## Usage
```console
coder templates create [flags] [name]
```
## Options
### --private
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Disable the default behavior of granting template access to the 'everyone' group. The template permissions must be updated to allow non-admin users to use this template.
### --variables-file
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Specify a file path with values for Terraform-managed variables.
### --variable
| | |
| ---- | ------------------------- |
| Type | <code>string-array</code> |
Specify a set of values for Terraform-managed variables.
### --var
| | |
| ---- | ------------------------- |
| Type | <code>string-array</code> |
Alias of --variable.
### --provisioner-tag
| | |
| ---- | ------------------------- |
| Type | <code>string-array</code> |
Specify a set of tags to target provisioner daemons.
### --default-ttl
| | |
| ------- | --------------------- |
| Type | <code>duration</code> |
| Default | <code>24h</code> |
Specify a default TTL for workspaces created from this template. It is the default time before shutdown - workspaces created from this template default to this value. Maps to "Default autostop" in the UI.
### --failure-ttl
| | |
| ------- | --------------------- |
| Type | <code>duration</code> |
| Default | <code>0h</code> |
Specify a failure TTL for workspaces created from this template. It is the amount of time after a failed "start" build before coder automatically schedules a "stop" build to cleanup.This licensed feature's default is 0h (off). Maps to "Failure cleanup"in the UI.
### --dormancy-threshold
| | |
| ------- | --------------------- |
| Type | <code>duration</code> |
| Default | <code>0h</code> |
Specify a duration workspaces may be inactive prior to being moved to the dormant state. This licensed feature's default is 0h (off). Maps to "Dormancy threshold" in the UI.
### --dormancy-auto-deletion
| | |
| ------- | --------------------- |
| Type | <code>duration</code> |
| Default | <code>0h</code> |
Specify a duration workspaces may be in the dormant state prior to being deleted. This licensed feature's default is 0h (off). Maps to "Dormancy Auto-Deletion" in the UI.
### --require-active-version
| | |
| ------- | ------------------ |
| Type | <code>bool</code> |
| Default | <code>false</code> |
Requires workspace builds to use the active template version. This setting does not apply to template admins. This is an enterprise-only feature.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
### -d, --directory
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>.</code> |
Specify the directory to create from, use '-' to read tar from stdin.
### --ignore-lockfile
| | |
| ------- | ------------------ |
| Type | <code>bool</code> |
| Default | <code>false</code> |
Ignore warnings about not having a .terraform.lock.hcl file present in the template.
### -m, --message
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Specify a message describing the changes in this version of the template. Messages longer than 72 characters will be displayed as truncated.
+34
View File
@@ -0,0 +1,34 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates delete
Delete templates
Aliases:
- rm
## Usage
```console
coder templates delete [flags] [name...]
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
+182
View File
@@ -0,0 +1,182 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates edit
Edit the metadata of a template by name.
## Usage
```console
coder templates edit [flags] <template>
```
## Options
### --name
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Edit the template name.
### --display-name
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Edit the template display name.
### --description
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Edit the template description.
### --deprecated
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Sets the template as deprecated. Must be a message explaining why the template is deprecated.
### --icon
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Edit the template icon path.
### --default-ttl
| | |
| ---- | --------------------- |
| Type | <code>duration</code> |
Edit the template default time before shutdown - workspaces created from this template default to this value. Maps to "Default autostop" in the UI.
### --activity-bump
| | |
| ---- | --------------------- |
| Type | <code>duration</code> |
Edit the template activity bump - workspaces created from this template will have their shutdown time bumped by this value when activity is detected. Maps to "Activity bump" in the UI.
### --autostart-requirement-weekdays
| | |
| ---- | ------------------------- |
| Type | <code>string-array</code> |
Edit the template autostart requirement weekdays - workspaces created from this template can only autostart on the given weekdays. To unset this value for the template (and allow autostart on all days), pass 'all'.
### --autostop-requirement-weekdays
| | |
| ---- | ------------------------- |
| Type | <code>string-array</code> |
Edit the template autostop requirement weekdays - workspaces created from this template must be restarted on the given weekdays. To unset this value for the template (and disable the autostop requirement for the template), pass 'none'.
### --autostop-requirement-weeks
| | |
| ---- | ---------------- |
| Type | <code>int</code> |
Edit the template autostop requirement weeks - workspaces created from this template must be restarted on an n-weekly basis.
### --failure-ttl
| | |
| ------- | --------------------- |
| Type | <code>duration</code> |
| Default | <code>0h</code> |
Specify a failure TTL for workspaces created from this template. It is the amount of time after a failed "start" build before coder automatically schedules a "stop" build to cleanup.This licensed feature's default is 0h (off). Maps to "Failure cleanup" in the UI.
### --dormancy-threshold
| | |
| ------- | --------------------- |
| Type | <code>duration</code> |
| Default | <code>0h</code> |
Specify a duration workspaces may be inactive prior to being moved to the dormant state. This licensed feature's default is 0h (off). Maps to "Dormancy threshold" in the UI.
### --dormancy-auto-deletion
| | |
| ------- | --------------------- |
| Type | <code>duration</code> |
| Default | <code>0h</code> |
Specify a duration workspaces may be in the dormant state prior to being deleted. This licensed feature's default is 0h (off). Maps to "Dormancy Auto-Deletion" in the UI.
### --allow-user-cancel-workspace-jobs
| | |
| ------- | ----------------- |
| Type | <code>bool</code> |
| Default | <code>true</code> |
Allow users to cancel in-progress workspace jobs.
### --allow-user-autostart
| | |
| ------- | ----------------- |
| Type | <code>bool</code> |
| Default | <code>true</code> |
Allow users to configure autostart for workspaces on this template. This can only be disabled in enterprise.
### --allow-user-autostop
| | |
| ------- | ----------------- |
| Type | <code>bool</code> |
| Default | <code>true</code> |
Allow users to customize the autostop TTL for workspaces on this template. This can only be disabled in enterprise.
### --require-active-version
| | |
| ------- | ------------------ |
| Type | <code>bool</code> |
| Default | <code>false</code> |
Requires workspace builds to use the active template version. This setting does not apply to template admins. This is an enterprise-only feature.
### --private
| | |
| ------- | ------------------ |
| Type | <code>bool</code> |
| Default | <code>false</code> |
Disable the default behavior of granting template access to the 'everyone' group. The template permissions must be updated to allow non-admin users to use this template.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates init
Get started with a templated template.
## Usage
```console
coder templates init [flags] [directory]
```
## Options
### --id
| | |
| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Type | <code>enum[aws-devcontainer\|aws-linux\|aws-windows\|azure-linux\|do-linux\|docker\|gcp-devcontainer\|gcp-linux\|gcp-vm-container\|gcp-windows\|kubernetes\|nomad-docker\|scratch]</code> |
Specify a given example template by ID.
+35
View File
@@ -0,0 +1,35 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates list
List all the templates available for the organization
Aliases:
- ls
## Usage
```console
coder templates list [flags]
```
## Options
### -c, --column
| | |
| ------- | -------------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>name,organization name,last updated,used by</code> |
Columns to display in table output. Available columns: name, created at, last updated, organization id, organization name, provisioner, active version id, used by, default ttl.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
+54
View File
@@ -0,0 +1,54 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates pull
Download the active, latest, or specified version of a template to a path.
## Usage
```console
coder templates pull [flags] <name> [destination]
```
## Options
### --tar
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Output the template as a tar archive to stdout.
### --zip
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Output the template as a zip archive to stdout.
### --version
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
The name of the template version to pull. Use 'active' to pull the active version, 'latest' to pull the latest version, or the name of the template version to pull.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
+113
View File
@@ -0,0 +1,113 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates push
Create or update a template from the current directory or as specified by flag
## Usage
```console
coder templates push [flags] [template]
```
## Options
### --variables-file
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Specify a file path with values for Terraform-managed variables.
### --variable
| | |
| ---- | ------------------------- |
| Type | <code>string-array</code> |
Specify a set of values for Terraform-managed variables.
### --var
| | |
| ---- | ------------------------- |
| Type | <code>string-array</code> |
Alias of --variable.
### --provisioner-tag
| | |
| ---- | ------------------------- |
| Type | <code>string-array</code> |
Specify a set of tags to target provisioner daemons.
### --name
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Specify a name for the new template version. It will be automatically generated if not provided.
### --always-prompt
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Always prompt all parameters. Does not pull parameter values from active template version.
### --activate
| | |
| ------- | ----------------- |
| Type | <code>bool</code> |
| Default | <code>true</code> |
Whether the new template will be marked active.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
### -d, --directory
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>.</code> |
Specify the directory to create from, use '-' to read tar from stdin.
### --ignore-lockfile
| | |
| ------- | ------------------ |
| Type | <code>bool</code> |
| Default | <code>false</code> |
Ignore warnings about not having a .terraform.lock.hcl file present in the template.
### -m, --message
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Specify a message describing the changes in this version of the template. Messages longer than 72 characters will be displayed as truncated.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
+31
View File
@@ -0,0 +1,31 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates versions
Manage different versions of the specified template
Aliases:
- version
## Usage
```console
coder templates versions
```
## Description
```console
- List versions of a specific template:
$ coder templates versions list my-template
```
## Subcommands
| Name | Purpose |
| ----------------------------------------------------------- | ----------------------------------------------- |
| [<code>list</code>](./templates_versions_list.md) | List all the versions of the specified template |
| [<code>archive</code>](./templates_versions_archive.md) | Archive a template version(s). |
| [<code>unarchive</code>](./templates_versions_unarchive.md) | Unarchive a template version(s). |
+30
View File
@@ -0,0 +1,30 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates versions archive
Archive a template version(s).
## Usage
```console
coder templates versions archive [flags] <template-name> [template-version-names...]
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
+48
View File
@@ -0,0 +1,48 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates versions list
List all the versions of the specified template
## Usage
```console
coder templates versions list [flags] <template>
```
## Options
### --include-archived
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Include archived versions in the result list.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.
### -c, --column
| | |
| ------- | ----------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>Name,Created At,Created By,Status,Active</code> |
Columns to display in table output. Available columns: name, created at, created by, status, active, archived.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
+30
View File
@@ -0,0 +1,30 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates versions unarchive
Unarchive a template version(s).
## Usage
```console
coder templates versions unarchive [flags] <template-name> [template-version-names...]
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
### -O, --org
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_ORGANIZATION</code> |
Select which organization (uuid or name) to use.

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