2022-12-22 14:53:14 +00:00
|
|
|
# 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
|
|
|
|
{
|
2023-12-08 08:50:25 +00:00
|
|
|
"agent_api_version": "string",
|
2023-04-17 19:57:21 +00:00
|
|
|
"dashboard_url": "string",
|
2022-12-22 14:53:14 +00:00
|
|
|
"external_url": "string",
|
2024-01-30 23:11:37 +00:00
|
|
|
"upgrade_message": "string",
|
2023-04-17 19:57:21 +00:00
|
|
|
"version": "string",
|
|
|
|
"workspace_proxy": true
|
2022-12-22 14:53:14 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Responses
|
|
|
|
|
|
|
|
| Status | Meaning | Description | Schema |
|
|
|
|
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------ |
|
|
|
|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.BuildInfoResponse](schemas.md#codersdkbuildinforesponse) |
|
|
|
|
|
2023-03-09 03:05:45 +00:00
|
|
|
## 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).
|
|
|
|
|
2023-01-03 18:21:10 +00:00
|
|
|
## Get deployment config
|
|
|
|
|
|
|
|
### Code samples
|
|
|
|
|
|
|
|
```shell
|
|
|
|
# Example request using curl
|
2023-03-09 03:05:45 +00:00
|
|
|
curl -X GET http://coder-server:8080/api/v2/deployment/config \
|
2023-01-03 18:21:10 +00:00
|
|
|
-H 'Accept: application/json' \
|
|
|
|
-H 'Coder-Session-Token: API_KEY'
|
|
|
|
```
|
|
|
|
|
2023-03-09 03:05:45 +00:00
|
|
|
`GET /deployment/config`
|
2023-01-03 18:21:10 +00:00
|
|
|
|
|
|
|
### Example responses
|
|
|
|
|
|
|
|
> 200 Response
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
2023-03-07 21:10:01 +00:00
|
|
|
"config": {
|
|
|
|
"access_url": {
|
|
|
|
"forceQuery": true,
|
|
|
|
"fragment": "string",
|
|
|
|
"host": "string",
|
|
|
|
"omitHost": true,
|
|
|
|
"opaque": "string",
|
|
|
|
"path": "string",
|
|
|
|
"rawFragment": "string",
|
|
|
|
"rawPath": "string",
|
|
|
|
"rawQuery": "string",
|
|
|
|
"scheme": "string",
|
|
|
|
"user": {}
|
2023-01-18 22:56:14 +00:00
|
|
|
},
|
2023-03-07 21:10:01 +00:00
|
|
|
"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,
|
2023-12-15 18:38:47 +00:00
|
|
|
"allow_workspace_renames": true,
|
2023-03-07 21:10:01 +00:00
|
|
|
"autobuild_poll_interval": 0,
|
|
|
|
"browser_only": true,
|
|
|
|
"cache_directory": "string",
|
2024-01-30 23:11:37 +00:00
|
|
|
"cli_upgrade_message": "string",
|
2023-03-07 21:10:01 +00:00
|
|
|
"config": "string",
|
2023-03-16 18:03:37 +00:00
|
|
|
"config_ssh": {
|
|
|
|
"deploymentName": "string",
|
|
|
|
"sshconfigOptions": ["string"]
|
|
|
|
},
|
2023-03-07 21:10:01 +00:00
|
|
|
"dangerous": {
|
2023-05-22 18:02:39 +00:00
|
|
|
"allow_all_cors": true,
|
2023-03-07 21:10:01 +00:00
|
|
|
"allow_path_app_sharing": true,
|
|
|
|
"allow_path_app_site_owner_access": true
|
|
|
|
},
|
|
|
|
"derp": {
|
|
|
|
"config": {
|
2023-06-21 22:02:05 +00:00
|
|
|
"block_direct": true,
|
2023-08-24 17:22:31 +00:00
|
|
|
"force_websockets": true,
|
2023-03-07 21:10:01 +00:00
|
|
|
"path": "string",
|
|
|
|
"url": "string"
|
2023-01-03 18:21:10 +00:00
|
|
|
},
|
2023-03-07 21:10:01 +00:00
|
|
|
"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"]
|
2023-01-03 18:21:10 +00:00
|
|
|
}
|
|
|
|
},
|
2023-04-11 13:57:23 +00:00
|
|
|
"disable_owner_workspace_exec": true,
|
2023-03-07 21:10:01 +00:00
|
|
|
"disable_password_auth": true,
|
|
|
|
"disable_path_apps": true,
|
|
|
|
"disable_session_expiry_refresh": true,
|
2023-07-19 11:31:17 +00:00
|
|
|
"docs_url": {
|
|
|
|
"forceQuery": true,
|
|
|
|
"fragment": "string",
|
|
|
|
"host": "string",
|
|
|
|
"omitHost": true,
|
|
|
|
"opaque": "string",
|
|
|
|
"path": "string",
|
|
|
|
"rawFragment": "string",
|
|
|
|
"rawPath": "string",
|
|
|
|
"rawQuery": "string",
|
|
|
|
"scheme": "string",
|
|
|
|
"user": {}
|
|
|
|
},
|
2023-06-29 13:22:21 +00:00
|
|
|
"enable_terraform_debug_mode": true,
|
2023-03-07 21:10:01 +00:00
|
|
|
"experiments": ["string"],
|
2023-10-03 14:04:39 +00:00
|
|
|
"external_auth": {
|
2023-03-07 21:10:01 +00:00
|
|
|
"value": [
|
|
|
|
{
|
2023-06-29 18:58:01 +00:00
|
|
|
"app_install_url": "string",
|
|
|
|
"app_installations_url": "string",
|
2023-03-07 21:10:01 +00:00
|
|
|
"auth_url": "string",
|
|
|
|
"client_id": "string",
|
2023-06-29 18:58:01 +00:00
|
|
|
"device_code_url": "string",
|
|
|
|
"device_flow": true,
|
2023-10-03 14:04:39 +00:00
|
|
|
"display_icon": "string",
|
|
|
|
"display_name": "string",
|
2023-10-09 23:49:30 +00:00
|
|
|
"extra_token_keys": ["string"],
|
2023-03-07 21:10:01 +00:00
|
|
|
"id": "string",
|
|
|
|
"no_refresh": true,
|
|
|
|
"regex": "string",
|
|
|
|
"scopes": ["string"],
|
|
|
|
"token_url": "string",
|
|
|
|
"type": "string",
|
|
|
|
"validate_url": "string"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2023-10-03 14:04:39 +00:00
|
|
|
"external_token_encryption_keys": ["string"],
|
2023-11-13 14:14:43 +00:00
|
|
|
"healthcheck": {
|
|
|
|
"refresh": 0,
|
|
|
|
"threshold_database": 0
|
|
|
|
},
|
2023-03-07 21:10:01 +00:00
|
|
|
"http_address": "string",
|
|
|
|
"in_memory_database": true,
|
2023-06-25 13:17:00 +00:00
|
|
|
"job_hang_detector_interval": 0,
|
2023-03-07 21:10:01 +00:00
|
|
|
"logging": {
|
|
|
|
"human": "string",
|
|
|
|
"json": "string",
|
2023-07-26 21:46:22 +00:00
|
|
|
"log_filter": ["string"],
|
2023-03-07 21:10:01 +00:00
|
|
|
"stackdriver": "string"
|
|
|
|
},
|
|
|
|
"max_session_expiry": 0,
|
|
|
|
"max_token_lifetime": 0,
|
|
|
|
"metrics_cache_refresh_interval": 0,
|
|
|
|
"oauth2": {
|
|
|
|
"github": {
|
|
|
|
"allow_everyone": true,
|
|
|
|
"allow_signups": true,
|
|
|
|
"allowed_orgs": ["string"],
|
|
|
|
"allowed_teams": ["string"],
|
2023-01-10 14:47:08 +00:00
|
|
|
"client_id": "string",
|
2023-03-07 21:10:01 +00:00
|
|
|
"client_secret": "string",
|
|
|
|
"enterprise_base_url": "string"
|
2023-01-10 14:47:08 +00:00
|
|
|
}
|
2023-01-13 02:08:23 +00:00
|
|
|
},
|
2023-03-07 21:10:01 +00:00
|
|
|
"oidc": {
|
|
|
|
"allow_signups": true,
|
2023-03-30 08:36:57 +00:00
|
|
|
"auth_url_params": {},
|
2023-08-14 22:33:13 +00:00
|
|
|
"client_cert_file": "string",
|
2023-03-07 21:10:01 +00:00
|
|
|
"client_id": "string",
|
2023-08-14 22:33:13 +00:00
|
|
|
"client_key_file": "string",
|
2023-03-07 21:10:01 +00:00
|
|
|
"client_secret": "string",
|
|
|
|
"email_domain": ["string"],
|
2023-03-30 08:36:57 +00:00
|
|
|
"email_field": "string",
|
2023-12-08 16:14:19 +00:00
|
|
|
"group_allow_list": ["string"],
|
2023-08-08 16:37:49 +00:00
|
|
|
"group_auto_create": true,
|
2023-03-21 19:25:45 +00:00
|
|
|
"group_mapping": {},
|
2023-08-08 16:37:49 +00:00
|
|
|
"group_regex_filter": {},
|
2023-03-10 05:31:38 +00:00
|
|
|
"groups_field": "string",
|
2023-03-07 21:10:01 +00:00
|
|
|
"icon_url": {
|
|
|
|
"forceQuery": true,
|
|
|
|
"fragment": "string",
|
|
|
|
"host": "string",
|
|
|
|
"omitHost": true,
|
|
|
|
"opaque": "string",
|
|
|
|
"path": "string",
|
|
|
|
"rawFragment": "string",
|
|
|
|
"rawPath": "string",
|
|
|
|
"rawQuery": "string",
|
|
|
|
"scheme": "string",
|
|
|
|
"user": {}
|
2023-01-03 18:21:10 +00:00
|
|
|
},
|
2023-03-07 21:10:01 +00:00
|
|
|
"ignore_email_verified": true,
|
2023-04-05 08:07:43 +00:00
|
|
|
"ignore_user_info": true,
|
2023-03-07 21:10:01 +00:00
|
|
|
"issuer_url": "string",
|
|
|
|
"scopes": ["string"],
|
|
|
|
"sign_in_text": "string",
|
2023-07-24 12:34:24 +00:00
|
|
|
"user_role_field": "string",
|
|
|
|
"user_role_mapping": {},
|
|
|
|
"user_roles_default": ["string"],
|
2023-03-07 21:10:01 +00:00
|
|
|
"username_field": "string"
|
|
|
|
},
|
|
|
|
"pg_connection_url": "string",
|
|
|
|
"pprof": {
|
|
|
|
"address": {
|
|
|
|
"host": "string",
|
|
|
|
"port": "string"
|
2023-01-03 18:21:10 +00:00
|
|
|
},
|
2023-03-07 21:10:01 +00:00
|
|
|
"enable": true
|
|
|
|
},
|
|
|
|
"prometheus": {
|
|
|
|
"address": {
|
|
|
|
"host": "string",
|
|
|
|
"port": "string"
|
2023-01-03 18:21:10 +00:00
|
|
|
},
|
2023-04-14 14:14:52 +00:00
|
|
|
"collect_agent_stats": true,
|
2023-06-15 11:34:16 +00:00
|
|
|
"collect_db_metrics": true,
|
2023-03-07 21:10:01 +00:00
|
|
|
"enable": true
|
|
|
|
},
|
|
|
|
"provisioner": {
|
|
|
|
"daemon_poll_interval": 0,
|
|
|
|
"daemon_poll_jitter": 0,
|
2023-08-04 08:32:28 +00:00
|
|
|
"daemon_psk": "string",
|
2023-03-07 21:10:01 +00:00
|
|
|
"daemons": 0,
|
2023-06-22 00:21:40 +00:00
|
|
|
"daemons_echo": true,
|
2023-03-07 21:10:01 +00:00
|
|
|
"force_cancel_interval": 0
|
|
|
|
},
|
2023-06-08 17:58:24 +00:00
|
|
|
"proxy_health_status_interval": 0,
|
2023-03-07 21:10:01 +00:00
|
|
|
"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,
|
|
|
|
"ssh_keygen_algorithm": "string",
|
|
|
|
"strict_transport_security": 0,
|
|
|
|
"strict_transport_security_options": ["string"],
|
|
|
|
"support": {
|
|
|
|
"links": {
|
|
|
|
"value": [
|
|
|
|
{
|
2024-01-15 15:56:01 +00:00
|
|
|
"icon": "bug",
|
2023-03-07 21:10:01 +00:00
|
|
|
"name": "string",
|
|
|
|
"target": "string"
|
|
|
|
}
|
|
|
|
]
|
2023-01-03 18:21:10 +00:00
|
|
|
}
|
|
|
|
},
|
2023-03-07 21:10:01 +00:00
|
|
|
"swagger": {
|
|
|
|
"enable": true
|
2023-01-04 21:16:31 +00:00
|
|
|
},
|
2023-03-07 21:10:01 +00:00
|
|
|
"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": {}
|
|
|
|
}
|
2023-01-31 18:33:25 +00:00
|
|
|
},
|
2023-03-07 21:10:01 +00:00
|
|
|
"tls": {
|
|
|
|
"address": {
|
|
|
|
"host": "string",
|
|
|
|
"port": "string"
|
|
|
|
},
|
2023-11-07 14:55:39 +00:00
|
|
|
"allow_insecure_ciphers": true,
|
2023-03-07 21:10:01 +00:00
|
|
|
"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",
|
2023-11-07 14:55:39 +00:00
|
|
|
"redirect_http": true,
|
|
|
|
"supported_ciphers": ["string"]
|
2023-01-03 18:21:10 +00:00
|
|
|
},
|
2023-03-07 21:10:01 +00:00
|
|
|
"trace": {
|
|
|
|
"capture_logs": true,
|
2023-08-29 22:14:28 +00:00
|
|
|
"data_dog": true,
|
2023-03-07 21:10:01 +00:00
|
|
|
"enable": true,
|
|
|
|
"honeycomb_api_key": "string"
|
|
|
|
},
|
|
|
|
"update_check": true,
|
2023-07-20 13:35:41 +00:00
|
|
|
"user_quiet_hours_schedule": {
|
2023-12-15 09:33:51 +00:00
|
|
|
"allow_user_custom": true,
|
2023-07-20 13:35:41 +00:00
|
|
|
"default_schedule": "string"
|
|
|
|
},
|
2023-03-07 21:10:01 +00:00
|
|
|
"verbose": true,
|
2023-10-10 18:18:02 +00:00
|
|
|
"web_terminal_renderer": "string",
|
2023-03-22 13:13:48 +00:00
|
|
|
"wgtunnel_host": "string",
|
2024-01-17 16:41:42 +00:00
|
|
|
"wildcard_access_url": "string",
|
2023-03-07 21:10:01 +00:00
|
|
|
"write_config": true
|
|
|
|
},
|
|
|
|
"options": [
|
|
|
|
{
|
|
|
|
"annotations": {
|
|
|
|
"property1": "string",
|
|
|
|
"property2": "string"
|
|
|
|
},
|
2023-01-03 18:21:10 +00:00
|
|
|
"default": "string",
|
2023-03-07 21:10:01 +00:00
|
|
|
"description": "string",
|
|
|
|
"env": "string",
|
|
|
|
"flag": "string",
|
|
|
|
"flag_shorthand": "string",
|
|
|
|
"group": {
|
|
|
|
"description": "string",
|
|
|
|
"name": "string",
|
|
|
|
"parent": {
|
|
|
|
"description": "string",
|
2023-02-27 08:25:04 +00:00
|
|
|
"name": "string",
|
2023-04-07 22:58:21 +00:00
|
|
|
"parent": {},
|
|
|
|
"yaml": "string"
|
|
|
|
},
|
|
|
|
"yaml": "string"
|
2023-03-07 21:10:01 +00:00
|
|
|
},
|
2023-01-03 18:21:10 +00:00
|
|
|
"hidden": true,
|
|
|
|
"name": "string",
|
2023-07-11 13:59:55 +00:00
|
|
|
"required": true,
|
2023-03-07 21:10:01 +00:00
|
|
|
"use_instead": [{}],
|
|
|
|
"value": null,
|
2023-04-07 22:58:21 +00:00
|
|
|
"value_source": "",
|
2023-03-07 21:10:01 +00:00
|
|
|
"yaml": "string"
|
2023-01-03 18:21:10 +00:00
|
|
|
}
|
2023-03-07 21:10:01 +00:00
|
|
|
]
|
2023-01-03 18:21:10 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Responses
|
|
|
|
|
|
|
|
| Status | Meaning | Description | Schema |
|
|
|
|
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------- |
|
|
|
|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.DeploymentConfig](schemas.md#codersdkdeploymentconfig) |
|
|
|
|
|
2023-01-05 14:27:10 +00:00
|
|
|
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
2022-12-22 14:53:14 +00:00
|
|
|
|
2023-03-16 18:03:37 +00:00
|
|
|
## 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).
|
|
|
|
|
2023-03-09 03:05:45 +00:00
|
|
|
## Get deployment stats
|
2022-12-22 14:53:14 +00:00
|
|
|
|
|
|
|
### Code samples
|
|
|
|
|
|
|
|
```shell
|
|
|
|
# Example request using curl
|
2023-03-09 03:05:45 +00:00
|
|
|
curl -X GET http://coder-server:8080/api/v2/deployment/stats \
|
|
|
|
-H 'Accept: application/json' \
|
2022-12-22 14:53:14 +00:00
|
|
|
-H 'Coder-Session-Token: API_KEY'
|
|
|
|
```
|
|
|
|
|
2023-03-09 03:05:45 +00:00
|
|
|
`GET /deployment/stats`
|
2022-12-22 14:53:14 +00:00
|
|
|
|
2023-03-09 03:05:45 +00:00
|
|
|
### Example responses
|
|
|
|
|
|
|
|
> 200 Response
|
2022-12-22 14:53:14 +00:00
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
2023-03-09 03:05:45 +00:00
|
|
|
"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
|
|
|
|
}
|
2022-12-22 14:53:14 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Responses
|
|
|
|
|
2023-03-09 03:05:45 +00:00
|
|
|
| Status | Meaning | Description | Schema |
|
|
|
|
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------- |
|
|
|
|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.DeploymentStats](schemas.md#codersdkdeploymentstats) |
|
2022-12-22 14:53:14 +00:00
|
|
|
|
2023-01-05 14:27:10 +00:00
|
|
|
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
2022-12-22 14:53:14 +00:00
|
|
|
|
2023-10-17 18:49:19 +00:00
|
|
|
## Get enabled experiments
|
2023-01-18 19:12:53 +00:00
|
|
|
|
|
|
|
### 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
|
2024-01-11 21:03:10 +00:00
|
|
|
["example"]
|
2023-01-18 19:12:53 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Responses
|
|
|
|
|
2023-01-25 21:35:53 +00:00
|
|
|
| Status | Meaning | Description | Schema |
|
|
|
|
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------- |
|
|
|
|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Experiment](schemas.md#codersdkexperiment) |
|
2023-01-18 19:12:53 +00:00
|
|
|
|
2023-10-17 18:49:19 +00:00
|
|
|
<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
|
2024-01-11 21:03:10 +00:00
|
|
|
["example"]
|
2023-10-17 18:49:19 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### 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>
|
2023-01-18 19:12:53 +00:00
|
|
|
|
2023-01-25 21:35:53 +00:00
|
|
|
Status Code **200**
|
|
|
|
|
|
|
|
| Name | Type | Required | Restrictions | Description |
|
|
|
|
| -------------- | ----- | -------- | ------------ | ----------- |
|
|
|
|
| `[array item]` | array | false | | |
|
|
|
|
|
2023-01-18 19:12:53 +00:00
|
|
|
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
|
|
|
|
2022-12-22 14:53:14 +00:00
|
|
|
## 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) |
|
2023-03-16 15:25:08 +00:00
|
|
|
|
|
|
|
## 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).
|