2026-08-11 11:22:55 -04:00
---
# Code generated by make gen. DO NOT EDIT.
title : General
---
<!-- DO NOT EDIT | GENERATED CONTENT -->
2022-12-22 15:53:14 +01:00
## API root handler
### Code samples
2026-07-15 14:07:09 -04:00
```sh
2022-12-22 15:53:14 +01:00
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/ \
-H 'Accept: application/json'
```
2026-05-05 02:54:03 +05:00
`GET /api/v2/`
2022-12-22 15:53:14 +01:00
### Example responses
> 200 Response
```json
{
2025-01-03 18:12:59 +05:00
"detail" : "string" ,
"message" : "string" ,
"validations" : [
{
"detail" : "string" ,
"field" : "string"
}
]
2022-12-22 15:53:14 +01:00
}
```
### Responses
| Status | Meaning | Description | Schema |
2025-01-03 18:12:59 +05:00
|--------|---------------------------------------------------------|-------------|--------------------------------------------------|
2022-12-22 15:53:14 +01:00
| 200 | [OK ](https://tools.ietf.org/html/rfc7231#section-6.3.1 ) | OK | [codersdk.Response ](schemas.md#codersdkresponse ) |
## Build info
### Code samples
2026-07-15 14:07:09 -04:00
```sh
2022-12-22 15:53:14 +01:00
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/buildinfo \
-H 'Accept: application/json'
```
2026-05-05 02:54:03 +05:00
`GET /api/v2/buildinfo`
2022-12-22 15:53:14 +01:00
### Example responses
> 200 Response
```json
{
2025-01-03 18:12:59 +05:00
"agent_api_version" : "string" ,
"dashboard_url" : "string" ,
"deployment_id" : "string" ,
"external_url" : "string" ,
"provisioner_api_version" : "string" ,
"telemetry" : true ,
"upgrade_message" : "string" ,
"version" : "string" ,
2025-03-27 10:03:53 +00:00
"webpush_public_key" : "string" ,
2025-01-03 18:12:59 +05:00
"workspace_proxy" : true
2022-12-22 15:53:14 +01:00
}
```
### Responses
| Status | Meaning | Description | Schema |
2025-01-03 18:12:59 +05:00
|--------|---------------------------------------------------------|-------------|--------------------------------------------------------------------|
2022-12-22 15:53:14 +01:00
| 200 | [OK ](https://tools.ietf.org/html/rfc7231#section-6.3.1 ) | OK | [codersdk.BuildInfoResponse ](schemas.md#codersdkbuildinforesponse ) |
2023-03-08 21:05:45 -06:00
## Report CSP violations
### Code samples
2026-07-15 14:07:09 -04:00
```sh
2023-03-08 21:05:45 -06:00
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/csp/reports \
-H 'Content-Type: application/json' \
2026-07-14 12:29:38 -07:00
-H 'Accept: */*' \
2023-03-08 21:05:45 -06:00
-H 'Coder-Session-Token: API_KEY'
```
2026-05-05 02:54:03 +05:00
`POST /api/v2/csp/reports`
2023-03-08 21:05:45 -06:00
> Body parameter
```json
{
2025-01-03 18:12:59 +05:00
"csp-report" : {}
2023-03-08 21:05:45 -06:00
}
```
### Parameters
| Name | In | Type | Required | Description |
2025-01-03 18:12:59 +05:00
|--------|------|------------------------------------------------------|----------|------------------|
2023-03-08 21:05:45 -06:00
| `body` | body | [coderd.cspViolation ](schemas.md#coderdcspviolation ) | true | Violation report |
2026-07-14 12:29:38 -07:00
### Example responses
> 413 Response
2023-03-08 21:05:45 -06:00
### Responses
2026-07-14 12:29:38 -07:00
| Status | Meaning | Description | Schema |
|--------|-------------------------------------------------------------------------|--------------------------|--------------------------------------------------|
| 200 | [OK ](https://tools.ietf.org/html/rfc7231#section-6.3.1 ) | OK | |
| 413 | [Payload Too Large ](https://tools.ietf.org/html/rfc7231#section-6.5.11 ) | Request Entity Too Large | [codersdk.Response ](schemas.md#codersdkresponse ) |
2023-03-08 21:05:45 -06:00
To perform this operation, you must be authenticated. [Learn more ](authentication.md ).
2023-01-03 19:21:10 +01:00
## Get deployment config
### Code samples
2026-07-15 14:07:09 -04:00
```sh
2023-01-03 19:21:10 +01:00
# Example request using curl
2023-03-08 21:05:45 -06:00
curl -X GET http://coder-server:8080/api/v2/deployment/config \
2023-01-03 19:21:10 +01:00
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
2026-05-05 02:54:03 +05:00
`GET /api/v2/deployment/config`
2023-01-03 19:21:10 +01:00
### Example responses
> 200 Response
```json
{
2025-01-03 18:12:59 +05: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" : {}
},
"additional_csp_policy" : [
"string"
],
"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 ,
2025-09-16 11:45:23 +02:00
"ai" : {
2025-12-29 15:31:51 +00:00
"aibridge_proxy" : {
2026-03-20 09:49:26 +00:00
"allowed_private_cidrs" : [
"string"
],
2026-05-11 10:59:26 +02:00
"api_dump_dir" : "string" ,
2025-12-29 15:31:51 +00:00
"cert_file" : "string" ,
2026-01-13 11:30:51 +00:00
"domain_allowlist" : [
"string"
],
2025-12-29 15:31:51 +00:00
"enabled" : true ,
"key_file" : "string" ,
2026-01-19 08:50:57 +00:00
"listen_addr" : "string" ,
2026-07-14 18:40:22 +02:00
"target" : "string" ,
2026-03-05 09:19:34 +00:00
"tls_cert_file" : "string" ,
"tls_key_file" : "string" ,
2026-01-19 08:50:57 +00:00
"upstream_proxy" : "string" ,
"upstream_proxy_ca" : "string"
2025-12-29 15:31:51 +00:00
},
2025-09-16 11:45:23 +02:00
"bridge" : {
2026-04-15 14:16:49 -04:00
"allow_byok" : true ,
2025-09-16 11:45:23 +02:00
"anthropic" : {
"base_url" : "string" ,
"key" : "string"
},
2026-05-26 15:57:01 +02:00
"api_dump_dir" : "string" ,
2025-10-27 21:38:14 -06:00
"bedrock" : {
"access_key" : "string" ,
"access_key_secret" : "string" ,
2026-01-21 14:48:56 +02:00
"base_url" : "string" ,
2025-10-27 21:38:14 -06:00
"model" : "string" ,
"region" : "string" ,
"small_fast_model" : "string"
},
2026-05-12 10:48:36 -04:00
"budget_period" : "string" ,
"budget_policy" : "string" ,
2026-01-20 14:59:29 +01:00
"circuit_breaker_enabled" : true ,
"circuit_breaker_failure_threshold" : 0 ,
"circuit_breaker_interval" : 0 ,
"circuit_breaker_max_requests" : 0 ,
"circuit_breaker_timeout" : 0 ,
2025-09-16 11:45:23 +02:00
"enabled" : true ,
2025-11-12 11:23:01 +02:00
"inject_coder_mcp_tools" : true ,
2025-12-11 16:38:54 +01:00
"max_concurrency" : 0 ,
2025-09-16 11:45:23 +02:00
"openai" : {
"base_url" : "string" ,
"key" : "string"
2025-11-21 11:35:36 +02:00
},
2026-04-15 09:59:37 +02:00
"providers" : [
{
"base_url" : "string" ,
"bedrock_model" : "string" ,
"bedrock_region" : "string" ,
"bedrock_small_fast_model" : "string" ,
"name" : "string" ,
"type" : "string"
}
],
2025-12-11 16:38:54 +01:00
"rate_limit" : 0 ,
2026-01-14 17:26:08 +02:00
"retention" : 0 ,
2026-01-26 17:08:17 +02:00
"send_actor_headers" : true ,
2026-01-14 17:26:08 +02:00
"structured_logging" : true
2026-03-19 00:54:32 +11:00
},
"chat" : {
2026-04-13 15:06:06 +02:00
"acquire_batch_size" : 0 ,
2026-07-29 13:39:12 +02:00
"debug_logging_enabled" : true ,
2026-08-05 22:41:17 +02:00
"hook_allow_insecure" : true ,
2026-07-29 13:39:12 +02:00
"hook_enabled" : true ,
"hook_secret" : "string" ,
"hook_timeout" : 0 ,
"hook_url" : {
"forceQuery" : true ,
"fragment" : "string" ,
"host" : "string" ,
"omitHost" : true ,
"opaque" : "string" ,
"path" : "string" ,
"rawFragment" : "string" ,
"rawPath" : "string" ,
"rawQuery" : "string" ,
"scheme" : "string" ,
"user" : {}
}
2025-09-16 11:45:23 +02:00
}
},
2025-01-03 18:12:59 +05:00
"allow_workspace_renames" : true ,
"autobuild_poll_interval" : 0 ,
"browser_only" : true ,
"cache_directory" : "string" ,
"cli_upgrade_message" : "string" ,
2026-06-26 08:36:32 -04:00
"cluster" : {
"host" : "string"
},
2025-01-03 18:12:59 +05:00
"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"
]
}
},
2026-05-18 22:32:05 +01:00
"disable_chat_sharing" : true ,
2025-01-03 18:12:59 +05:00
"disable_owner_workspace_exec" : true ,
"disable_password_auth" : true ,
"disable_path_apps" : true ,
2025-12-09 08:13:09 -08:00
"disable_workspace_sharing" : true ,
2025-01-03 18:12:59 +05:00
"docs_url" : {
"forceQuery" : true ,
"fragment" : "string" ,
"host" : "string" ,
"omitHost" : true ,
"opaque" : "string" ,
"path" : "string" ,
"rawFragment" : "string" ,
"rawPath" : "string" ,
"rawQuery" : "string" ,
"scheme" : "string" ,
"user" : {}
},
2025-10-21 09:15:37 -05:00
"enable_authz_recording" : true ,
2025-01-03 18:12:59 +05:00
"enable_terraform_debug_mode" : true ,
2025-01-20 14:31:16 +01:00
"ephemeral_deployment" : true ,
2025-01-03 18:12:59 +05:00
"experiments" : [
"string"
],
"external_auth" : {
"value" : [
{
2026-03-10 18:46:01 +00:00
"api_base_url" : "string" ,
2025-01-03 18:12:59 +05:00
"app_install_url" : "string" ,
"app_installations_url" : "string" ,
"auth_url" : "string" ,
"client_id" : "string" ,
2025-12-15 11:41:47 -06:00
"code_challenge_methods_supported" : [
"string"
],
2025-01-03 18:12:59 +05:00
"device_code_url" : "string" ,
"device_flow" : true ,
"display_icon" : "string" ,
"display_name" : "string" ,
"id" : "string" ,
2025-09-16 20:31:29 +02:00
"mcp_tool_allow_regex" : "string" ,
"mcp_tool_deny_regex" : "string" ,
"mcp_url" : "string" ,
2025-01-03 18:12:59 +05:00
"no_refresh" : true ,
"regex" : "string" ,
2025-09-19 16:27:02 +02:00
"revoke_url" : "string" ,
2025-01-03 18:12:59 +05:00
"scopes" : [
"string"
],
"token_url" : "string" ,
"type" : "string" ,
"validate_url" : "string"
}
]
},
2026-02-27 11:50:56 -05:00
"external_auth_github_default_provider_enable" : true ,
2025-01-03 18:12:59 +05:00
"external_token_encryption_keys" : [
"string"
],
"healthcheck" : {
"refresh" : 0 ,
"threshold_database" : 0
},
2025-06-18 18:32:34 +02:00
"hide_ai_tasks" : true ,
2025-01-03 18:12:59 +05:00
"http_address" : "string" ,
2025-04-08 14:15:14 -05:00
"http_cookies" : {
2026-02-20 09:01:00 -06:00
"host_prefix" : true ,
2025-04-08 14:15:14 -05:00
"same_site" : "string" ,
"secure_auth_cookie" : true
},
2025-01-03 18:12:59 +05:00
"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" : "string" ,
"tls" : {
"ca_file" : "string" ,
"cert_file" : "string" ,
"insecure_skip_verify" : true ,
"key_file" : "string" ,
"server_name" : "string" ,
"start_tls" : true
}
},
"fetch_interval" : 0 ,
2025-03-25 12:51:26 +00:00
"inbox" : {
"enabled" : true
},
2025-01-03 18:12:59 +05:00
"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" ,
2025-02-25 16:31:33 +01:00
"default_provider_enable" : true ,
2025-02-21 18:42:16 +01:00
"device_flow" : true ,
2025-01-03 18:12:59 +05:00
"enterprise_base_url" : "string"
}
},
"oidc" : {
"allow_signups" : true ,
"auth_url_params" : {},
2026-06-16 13:26:04 -07:00
"auto_repair_links" : true ,
2025-01-03 18:12:59 +05:00
"client_cert_file" : "string" ,
"client_id" : "string" ,
"client_key_file" : "string" ,
"client_secret" : "string" ,
"email_domain" : [
"string"
],
2026-06-26 11:23:42 -05:00
"email_fallback" : true ,
2025-01-03 18:12:59 +05:00
"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" ,
"organization_assign_default" : true ,
"organization_field" : "string" ,
"organization_mapping" : {},
2026-07-04 21:36:33 -07:00
"redirect_allowed_hosts" : [
"string"
],
2026-02-20 09:11:01 -06:00
"redirect_url" : {
"forceQuery" : true ,
"fragment" : "string" ,
"host" : "string" ,
"omitHost" : true ,
"opaque" : "string" ,
"path" : "string" ,
"rawFragment" : "string" ,
"rawPath" : "string" ,
"rawQuery" : "string" ,
"scheme" : "string" ,
"user" : {}
},
2025-01-03 18:12:59 +05:00
"scopes" : [
"string"
],
"sign_in_text" : "string" ,
"signups_disabled_text" : "string" ,
"skip_issuer_checks" : true ,
2025-02-24 13:38:20 -06:00
"source_user_info_from_access_token" : true ,
2025-01-03 18:12:59 +05:00
"user_role_field" : "string" ,
"user_role_mapping" : {},
"user_roles_default" : [
"string"
],
"username_field" : "string"
},
"pg_auth" : "string" ,
2026-01-13 10:50:57 +02:00
"pg_conn_max_idle" : "string" ,
"pg_conn_max_open" : 0 ,
2025-01-03 18:12:59 +05:00
"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 ,
2025-12-02 16:04:06 +02:00
"retention" : {
"api_keys" : 0 ,
"audit_logs" : 0 ,
2026-06-16 14:32:54 +02:00
"boundary_logs" : 0 ,
2025-12-02 18:01:33 +02:00
"connection_logs" : 0 ,
"workspace_agent_logs" : 0
2025-12-02 16:04:06 +02:00
},
2025-01-03 18:12:59 +05:00
"scim_api_key" : "string" ,
2026-05-28 10:00:37 -05:00
"scim_use_legacy" : true ,
2025-01-03 18:12:59 +05:00
"session_lifetime" : {
"default_duration" : 0 ,
"default_token_lifetime" : 0 ,
"disable_expiry_refresh" : true ,
2025-06-06 17:36:30 +02:00
"max_admin_token_lifetime" : 0 ,
2025-09-13 08:57:26 +02:00
"max_token_lifetime" : 0 ,
"refresh_default_duration" : 0
2025-01-03 18:12:59 +05:00
},
"ssh_keygen_algorithm" : "string" ,
2026-01-05 11:44:06 -09:00
"stats_collection" : {
"usage_stats" : {
"enable" : true
}
},
2025-01-03 18:12:59 +05:00
"strict_transport_security" : 0 ,
"strict_transport_security_options" : [
"string"
],
"support" : {
"links" : {
"value" : [
{
"icon" : "bug" ,
2025-10-22 15:35:16 +02:00
"location" : "navbar" ,
2025-01-03 18:12:59 +05:00
"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" : {}
}
},
2026-05-11 09:48:55 -04:00
"template_builder" : {
"disabled" : true ,
"registry_url" : "string"
},
2025-01-03 18:12:59 +05:00
"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" ,
2025-04-07 11:35:47 +04:00
"workspace_hostname_suffix" : "string" ,
2025-04-25 11:07:15 +02:00
"workspace_prebuilds" : {
2025-05-21 15:16:38 -04:00
"failure_hard_limit" : 0 ,
2025-04-25 11:07:15 +02:00
"reconciliation_backoff_interval" : 0 ,
"reconciliation_backoff_lookback" : 0 ,
"reconciliation_interval" : 0
},
2025-01-03 18:12:59 +05:00
"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"
}
]
2023-01-03 19:21:10 +01:00
}
```
### Responses
| Status | Meaning | Description | Schema |
2025-01-03 18:12:59 +05:00
|--------|---------------------------------------------------------|-------------|------------------------------------------------------------------|
2023-01-03 19:21:10 +01:00
| 200 | [OK ](https://tools.ietf.org/html/rfc7231#section-6.3.1 ) | OK | [codersdk.DeploymentConfig ](schemas.md#codersdkdeploymentconfig ) |
2023-01-05 15:27:10 +01:00
To perform this operation, you must be authenticated. [Learn more ](authentication.md ).
2022-12-22 15:53:14 +01:00
2023-03-16 13:03:37 -05:00
## SSH Config
### Code samples
2026-07-15 14:07:09 -04:00
```sh
2023-03-16 13:03:37 -05:00
# 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'
```
2026-05-05 02:54:03 +05:00
`GET /api/v2/deployment/ssh`
2023-03-16 13:03:37 -05:00
### Example responses
> 200 Response
```json
{
2025-01-03 18:12:59 +05:00
"hostname_prefix" : "string" ,
2025-04-07 11:57:10 +04:00
"hostname_suffix" : "string" ,
2025-01-03 18:12:59 +05:00
"ssh_config_options" : {
"property1" : "string" ,
"property2" : "string"
}
2023-03-16 13:03:37 -05:00
}
```
### Responses
| Status | Meaning | Description | Schema |
2025-01-03 18:12:59 +05:00
|--------|---------------------------------------------------------|-------------|--------------------------------------------------------------------|
2023-03-16 13:03:37 -05:00
| 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-08 21:05:45 -06:00
## Get deployment stats
2022-12-22 15:53:14 +01:00
### Code samples
2026-07-15 14:07:09 -04:00
```sh
2022-12-22 15:53:14 +01:00
# Example request using curl
2023-03-08 21:05:45 -06:00
curl -X GET http://coder-server:8080/api/v2/deployment/stats \
-H 'Accept: application/json' \
2022-12-22 15:53:14 +01:00
-H 'Coder-Session-Token: API_KEY'
```
2026-05-05 02:54:03 +05:00
`GET /api/v2/deployment/stats`
2022-12-22 15:53:14 +01:00
2023-03-08 21:05:45 -06:00
### Example responses
> 200 Response
2022-12-22 15:53:14 +01:00
```json
{
2025-01-03 18:12:59 +05: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 15:53:14 +01:00
}
```
### Responses
2023-03-08 21:05:45 -06:00
| Status | Meaning | Description | Schema |
2025-01-03 18:12:59 +05:00
|--------|---------------------------------------------------------|-------------|----------------------------------------------------------------|
2023-03-08 21:05:45 -06:00
| 200 | [OK ](https://tools.ietf.org/html/rfc7231#section-6.3.1 ) | OK | [codersdk.DeploymentStats ](schemas.md#codersdkdeploymentstats ) |
2022-12-22 15:53:14 +01:00
2023-01-05 15:27:10 +01:00
To perform this operation, you must be authenticated. [Learn more ](authentication.md ).
2022-12-22 15:53:14 +01:00
2023-10-17 14:49:19 -04:00
## Get enabled experiments
2023-01-18 19:12:53 +00:00
### Code samples
2026-07-15 14:07:09 -04:00
```sh
2023-01-18 19:12:53 +00:00
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/experiments \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
2026-05-05 02:54:03 +05:00
`GET /api/v2/experiments`
2023-01-18 19:12:53 +00:00
### Example responses
> 200 Response
```json
2025-01-03 18:12:59 +05:00
[
"example"
]
2023-01-18 19:12:53 +00:00
```
### Responses
2023-01-25 21:35:53 +00:00
| Status | Meaning | Description | Schema |
2025-01-03 18:12:59 +05:00
|--------|---------------------------------------------------------|-------------|---------------------------------------------------------------|
2023-01-25 21:35:53 +00:00
| 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 14:49:19 -04:00
<h3 id="get-enabled-experiments-responseschema">Response Schema</h3>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
2025-01-03 18:12:59 +05:00
|----------------|-------|----------|--------------|-------------|
2023-10-17 14:49:19 -04:00
| `[array item]` | array | false | | |
To perform this operation, you must be authenticated. [Learn more ](authentication.md ).
## Get safe experiments
### Code samples
2026-07-15 14:07:09 -04:00
```sh
2023-10-17 14:49:19 -04:00
# 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'
```
2026-05-05 02:54:03 +05:00
`GET /api/v2/experiments/available`
2023-10-17 14:49:19 -04:00
### Example responses
> 200 Response
```json
2025-01-03 18:12:59 +05:00
[
"example"
]
2023-10-17 14:49:19 -04:00
```
### Responses
| Status | Meaning | Description | Schema |
2025-01-03 18:12:59 +05:00
|--------|---------------------------------------------------------|-------------|---------------------------------------------------------------|
2023-10-17 14:49:19 -04:00
| 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 |
2025-01-03 18:12:59 +05:00
|----------------|-------|----------|--------------|-------------|
2023-01-25 21:35:53 +00:00
| `[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 15:53:14 +01:00
## Update check
### Code samples
2026-07-15 14:07:09 -04:00
```sh
2022-12-22 15:53:14 +01:00
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/updatecheck \
-H 'Accept: application/json'
```
2026-05-05 02:54:03 +05:00
`GET /api/v2/updatecheck`
2022-12-22 15:53:14 +01:00
### Example responses
> 200 Response
```json
{
2025-01-03 18:12:59 +05:00
"current" : true ,
"url" : "string" ,
"version" : "string"
2022-12-22 15:53:14 +01:00
}
```
### Responses
| Status | Meaning | Description | Schema |
2025-01-03 18:12:59 +05:00
|--------|---------------------------------------------------------|-------------|------------------------------------------------------------------------|
2022-12-22 15:53:14 +01:00
| 200 | [OK ](https://tools.ietf.org/html/rfc7231#section-6.3.1 ) | OK | [codersdk.UpdateCheckResponse ](schemas.md#codersdkupdatecheckresponse ) |
2023-03-16 08:25:08 -07:00
## Get token config
### Code samples
2026-07-15 14:07:09 -04:00
```sh
2023-03-16 08:25:08 -07:00
# 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'
```
2026-05-05 02:54:03 +05:00
`GET /api/v2/users/{user}/keys/tokens/tokenconfig`
2023-03-16 08:25:08 -07:00
### Parameters
| Name | In | Type | Required | Description |
2025-01-03 18:12:59 +05:00
|--------|------|--------|----------|----------------------|
2023-03-16 08:25:08 -07:00
| `user` | path | string | true | User ID, name, or me |
### Example responses
> 200 Response
```json
{
2025-01-03 18:12:59 +05:00
"max_token_lifetime" : 0
2023-03-16 08:25:08 -07:00
}
```
### Responses
| Status | Meaning | Description | Schema |
2025-01-03 18:12:59 +05:00
|--------|---------------------------------------------------------|-------------|--------------------------------------------------------|
2023-03-16 08:25:08 -07:00
| 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 ).