mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Add workspace agent lifecycle state reporting (#5785)
This commit is contained in:
@@ -370,6 +370,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/metadata \
|
||||
"git_auth_configs": 0,
|
||||
"motd_file": "string",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout": 0,
|
||||
"vscode_port_proxy_uri": "string"
|
||||
}
|
||||
```
|
||||
@@ -483,6 +484,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -503,10 +505,12 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
|
||||
+174
-140
@@ -76,6 +76,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -96,10 +97,12 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -218,6 +221,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -238,10 +242,12 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -503,6 +509,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -523,10 +530,12 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -563,61 +572,64 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
|
||||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» agents` | array | false | | |
|
||||
| `»» apps` | array | false | | |
|
||||
| `»»» command` | string | false | | |
|
||||
| `»»» display_name` | string | false | | »»display name is a friendly name for the app. |
|
||||
| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
|
||||
| `»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
|
||||
| `»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
|
||||
| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
|
||||
| `»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
|
||||
| `»»»» url` | string | false | | »»»url specifies the endpoint to check for the app health. |
|
||||
| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `»»» url` | string | false | | »»url is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| `»» architecture` | string | false | | |
|
||||
| `»» connection_timeout_seconds` | integer | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» directory` | string | false | | |
|
||||
| `»» disconnected_at` | string(date-time) | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» instance_id` | string | false | | |
|
||||
| `»» last_connected_at` | string(date-time) | false | | |
|
||||
| `»» latency` | object | false | | »latency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| `»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
|
||||
| `»»»» latency_ms` | number | false | | |
|
||||
| `»»»» preferred` | boolean | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» startup_script` | string | false | | |
|
||||
| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»» troubleshooting_url` | string | false | | |
|
||||
| `»» updated_at` | string(date-time) | false | | |
|
||||
| `»» version` | string | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» daily_cost` | integer | false | | |
|
||||
| `» hide` | boolean | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» job_id` | string(uuid) | false | | |
|
||||
| `» metadata` | array | false | | |
|
||||
| `»» key` | string | false | | |
|
||||
| `»» sensitive` | boolean | false | | |
|
||||
| `»» value` | string | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» type` | string | false | | |
|
||||
| `» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ----------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» agents` | array | false | | |
|
||||
| `»» apps` | array | false | | |
|
||||
| `»»» command` | string | false | | |
|
||||
| `»»» display_name` | string | false | | »»display name is a friendly name for the app. |
|
||||
| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
|
||||
| `»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
|
||||
| `»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
|
||||
| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
|
||||
| `»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
|
||||
| `»»»» url` | string | false | | »»»url specifies the endpoint to check for the app health. |
|
||||
| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `»»» url` | string | false | | »»url is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| `»» architecture` | string | false | | |
|
||||
| `»» connection_timeout_seconds` | integer | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» delay_login_until_ready` | boolean | false | | »delay login until ready if true, the agent will delay logins until it is ready (e.g. executing startup script has ended). |
|
||||
| `»» directory` | string | false | | |
|
||||
| `»» disconnected_at` | string(date-time) | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» instance_id` | string | false | | |
|
||||
| `»» last_connected_at` | string(date-time) | false | | |
|
||||
| `»» latency` | object | false | | »latency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| `»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
|
||||
| `»»»» latency_ms` | number | false | | |
|
||||
| `»»»» preferred` | boolean | false | | |
|
||||
| `»» lifecycle_state` | [codersdk.WorkspaceAgentLifecycle](schemas.md#codersdkworkspaceagentlifecycle) | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» startup_script` | string | false | | |
|
||||
| `»» startup_script_timeout_seconds` | integer | false | | »startup script timeout seconds is the number of seconds to wait for the startup script to complete. If the script does not complete within this time, the agent lifecycle will be marked as start_timeout. |
|
||||
| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»» troubleshooting_url` | string | false | | |
|
||||
| `»» updated_at` | string(date-time) | false | | |
|
||||
| `»» version` | string | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» daily_cost` | integer | false | | |
|
||||
| `» hide` | boolean | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» job_id` | string(uuid) | false | | |
|
||||
| `» metadata` | array | false | | |
|
||||
| `»» key` | string | false | | |
|
||||
| `»» sensitive` | boolean | false | | |
|
||||
| `»» value` | string | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» type` | string | false | | |
|
||||
| `» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
@@ -630,6 +642,11 @@ Status Code **200**
|
||||
| `sharing_level` | `owner` |
|
||||
| `sharing_level` | `authenticated` |
|
||||
| `sharing_level` | `public` |
|
||||
| `lifecycle_state` | `created` |
|
||||
| `lifecycle_state` | `starting` |
|
||||
| `lifecycle_state` | `start_timeout` |
|
||||
| `lifecycle_state` | `start_error` |
|
||||
| `lifecycle_state` | `ready` |
|
||||
| `status` | `connecting` |
|
||||
| `status` | `connected` |
|
||||
| `status` | `disconnected` |
|
||||
@@ -714,6 +731,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -734,10 +752,12 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -861,6 +881,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -881,10 +902,12 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -932,91 +955,94 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» build_number` | integer | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» daily_cost` | integer | false | | |
|
||||
| `» deadline` | string(date-time) | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» initiator_id` | string(uuid) | false | | |
|
||||
| `» initiator_name` | string | false | | |
|
||||
| `» job` | [codersdk.ProvisionerJob](schemas.md#codersdkprovisionerjob) | false | | |
|
||||
| `»» canceled_at` | string(date-time) | false | | |
|
||||
| `»» completed_at` | string(date-time) | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» error` | string | false | | |
|
||||
| `»» file_id` | string(uuid) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» status` | [codersdk.ProvisionerJobStatus](schemas.md#codersdkprovisionerjobstatus) | false | | |
|
||||
| `»» tags` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» worker_id` | string(uuid) | false | | |
|
||||
| `» reason` | [codersdk.BuildReason](schemas.md#codersdkbuildreason) | false | | |
|
||||
| `» resources` | array | false | | |
|
||||
| `»» agents` | array | false | | |
|
||||
| `»»» apps` | array | false | | |
|
||||
| `»»»» command` | string | false | | |
|
||||
| `»»»» display_name` | string | false | | »»»display name is a friendly name for the app. |
|
||||
| `»»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
|
||||
| `»»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
|
||||
| `»»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
|
||||
| `»»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
|
||||
| `»»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
|
||||
| `»»»»» url` | string | false | | »»»»url specifies the endpoint to check for the app health. |
|
||||
| `»»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
|
||||
| `»»»» id` | string(uuid) | false | | |
|
||||
| `»»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `»»»» url` | string | false | | »»»url is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| `»»» architecture` | string | false | | |
|
||||
| `»»» connection_timeout_seconds` | integer | false | | |
|
||||
| `»»» created_at` | string(date-time) | false | | |
|
||||
| `»»» directory` | string | false | | |
|
||||
| `»»» disconnected_at` | string(date-time) | false | | |
|
||||
| `»»» environment_variables` | object | false | | |
|
||||
| `»»»» [any property]` | string | false | | |
|
||||
| `»»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» instance_id` | string | false | | |
|
||||
| `»»» last_connected_at` | string(date-time) | false | | |
|
||||
| `»»» latency` | object | false | | »»latency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| `»»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
|
||||
| `»»»»» latency_ms` | number | false | | |
|
||||
| `»»»»» preferred` | boolean | false | | |
|
||||
| `»»» name` | string | false | | |
|
||||
| `»»» operating_system` | string | false | | |
|
||||
| `»»» resource_id` | string(uuid) | false | | |
|
||||
| `»»» startup_script` | string | false | | |
|
||||
| `»»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»»» troubleshooting_url` | string | false | | |
|
||||
| `»»» updated_at` | string(date-time) | false | | |
|
||||
| `»»» version` | string | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» daily_cost` | integer | false | | |
|
||||
| `»» hide` | boolean | false | | |
|
||||
| `»» icon` | string | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» job_id` | string(uuid) | false | | |
|
||||
| `»» metadata` | array | false | | |
|
||||
| `»»» key` | string | false | | |
|
||||
| `»»» sensitive` | boolean | false | | |
|
||||
| `»»» value` | string | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» type` | string | false | | |
|
||||
| `»» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
| `» status` | [codersdk.WorkspaceStatus](schemas.md#codersdkworkspacestatus) | false | | |
|
||||
| `» template_version_id` | string(uuid) | false | | |
|
||||
| `» template_version_name` | string | false | | |
|
||||
| `» transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
| `» updated_at` | string(date-time) | false | | |
|
||||
| `» workspace_id` | string(uuid) | false | | |
|
||||
| `» workspace_name` | string | false | | |
|
||||
| `» workspace_owner_id` | string(uuid) | false | | |
|
||||
| `» workspace_owner_name` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------------------ | -------------------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» build_number` | integer | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» daily_cost` | integer | false | | |
|
||||
| `» deadline` | string(date-time) | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» initiator_id` | string(uuid) | false | | |
|
||||
| `» initiator_name` | string | false | | |
|
||||
| `» job` | [codersdk.ProvisionerJob](schemas.md#codersdkprovisionerjob) | false | | |
|
||||
| `»» canceled_at` | string(date-time) | false | | |
|
||||
| `»» completed_at` | string(date-time) | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» error` | string | false | | |
|
||||
| `»» file_id` | string(uuid) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» status` | [codersdk.ProvisionerJobStatus](schemas.md#codersdkprovisionerjobstatus) | false | | |
|
||||
| `»» tags` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» worker_id` | string(uuid) | false | | |
|
||||
| `» reason` | [codersdk.BuildReason](schemas.md#codersdkbuildreason) | false | | |
|
||||
| `» resources` | array | false | | |
|
||||
| `»» agents` | array | false | | |
|
||||
| `»»» apps` | array | false | | |
|
||||
| `»»»» command` | string | false | | |
|
||||
| `»»»» display_name` | string | false | | »»»display name is a friendly name for the app. |
|
||||
| `»»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
|
||||
| `»»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
|
||||
| `»»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
|
||||
| `»»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
|
||||
| `»»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
|
||||
| `»»»»» url` | string | false | | »»»»url specifies the endpoint to check for the app health. |
|
||||
| `»»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
|
||||
| `»»»» id` | string(uuid) | false | | |
|
||||
| `»»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `»»»» url` | string | false | | »»»url is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| `»»» architecture` | string | false | | |
|
||||
| `»»» connection_timeout_seconds` | integer | false | | |
|
||||
| `»»» created_at` | string(date-time) | false | | |
|
||||
| `»»» delay_login_until_ready` | boolean | false | | »»delay login until ready if true, the agent will delay logins until it is ready (e.g. executing startup script has ended). |
|
||||
| `»»» directory` | string | false | | |
|
||||
| `»»» disconnected_at` | string(date-time) | false | | |
|
||||
| `»»» environment_variables` | object | false | | |
|
||||
| `»»»» [any property]` | string | false | | |
|
||||
| `»»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» instance_id` | string | false | | |
|
||||
| `»»» last_connected_at` | string(date-time) | false | | |
|
||||
| `»»» latency` | object | false | | »»latency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| `»»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
|
||||
| `»»»»» latency_ms` | number | false | | |
|
||||
| `»»»»» preferred` | boolean | false | | |
|
||||
| `»»» lifecycle_state` | [codersdk.WorkspaceAgentLifecycle](schemas.md#codersdkworkspaceagentlifecycle) | false | | |
|
||||
| `»»» name` | string | false | | |
|
||||
| `»»» operating_system` | string | false | | |
|
||||
| `»»» resource_id` | string(uuid) | false | | |
|
||||
| `»»» startup_script` | string | false | | |
|
||||
| `»»» startup_script_timeout_seconds` | integer | false | | »»startup script timeout seconds is the number of seconds to wait for the startup script to complete. If the script does not complete within this time, the agent lifecycle will be marked as start_timeout. |
|
||||
| `»»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»»» troubleshooting_url` | string | false | | |
|
||||
| `»»» updated_at` | string(date-time) | false | | |
|
||||
| `»»» version` | string | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» daily_cost` | integer | false | | |
|
||||
| `»» hide` | boolean | false | | |
|
||||
| `»» icon` | string | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» job_id` | string(uuid) | false | | |
|
||||
| `»» metadata` | array | false | | |
|
||||
| `»»» key` | string | false | | |
|
||||
| `»»» sensitive` | boolean | false | | |
|
||||
| `»»» value` | string | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» type` | string | false | | |
|
||||
| `»» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
| `» status` | [codersdk.WorkspaceStatus](schemas.md#codersdkworkspacestatus) | false | | |
|
||||
| `» template_version_id` | string(uuid) | false | | |
|
||||
| `» template_version_name` | string | false | | |
|
||||
| `» transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
| `» updated_at` | string(date-time) | false | | |
|
||||
| `» workspace_id` | string(uuid) | false | | |
|
||||
| `» workspace_name` | string | false | | |
|
||||
| `» workspace_owner_id` | string(uuid) | false | | |
|
||||
| `» workspace_owner_name` | string | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
@@ -1038,6 +1064,11 @@ Status Code **200**
|
||||
| `sharing_level` | `owner` |
|
||||
| `sharing_level` | `authenticated` |
|
||||
| `sharing_level` | `public` |
|
||||
| `lifecycle_state` | `created` |
|
||||
| `lifecycle_state` | `starting` |
|
||||
| `lifecycle_state` | `start_timeout` |
|
||||
| `lifecycle_state` | `start_error` |
|
||||
| `lifecycle_state` | `ready` |
|
||||
| `status` | `connecting` |
|
||||
| `status` | `connected` |
|
||||
| `status` | `disconnected` |
|
||||
@@ -1164,6 +1195,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -1184,10 +1216,12 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
|
||||
+87
-44
@@ -3327,6 +3327,20 @@ Parameter represents a set value for the scope.
|
||||
| `none` |
|
||||
| `data` |
|
||||
|
||||
## codersdk.PostWorkspaceAgentLifecycleRequest
|
||||
|
||||
```json
|
||||
{
|
||||
"state": "created"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------- | -------------------------------------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `state` | [codersdk.WorkspaceAgentLifecycle](#codersdkworkspaceagentlifecycle) | false | | |
|
||||
|
||||
## codersdk.PostWorkspaceAppHealthsRequest
|
||||
|
||||
```json
|
||||
@@ -4566,6 +4580,7 @@ Parameter represents a set value for the scope.
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -4586,10 +4601,12 @@ Parameter represents a set value for the scope.
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -4685,6 +4702,7 @@ Parameter represents a set value for the scope.
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -4705,10 +4723,12 @@ Parameter represents a set value for the scope.
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -4718,39 +4738,33 @@ Parameter represents a set value for the scope.
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------------------- | -------------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------- |
|
||||
| `apps` | array of [codersdk.WorkspaceApp](#codersdkworkspaceapp) | false | | |
|
||||
| `architecture` | string | false | | |
|
||||
| `connection_timeout_seconds` | integer | false | | |
|
||||
| `created_at` | string | false | | |
|
||||
| `directory` | string | false | | |
|
||||
| `disconnected_at` | string | false | | |
|
||||
| `environment_variables` | object | false | | |
|
||||
| » `[any property]` | string | false | | |
|
||||
| `first_connected_at` | string | false | | |
|
||||
| `id` | string | false | | |
|
||||
| `instance_id` | string | false | | |
|
||||
| `last_connected_at` | string | false | | |
|
||||
| `latency` | object | false | | Latency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| » `[any property]` | [codersdk.DERPRegion](#codersdkderpregion) | false | | |
|
||||
| `name` | string | false | | |
|
||||
| `operating_system` | string | false | | |
|
||||
| `resource_id` | string | false | | |
|
||||
| `startup_script` | string | false | | |
|
||||
| `status` | [codersdk.WorkspaceAgentStatus](#codersdkworkspaceagentstatus) | false | | |
|
||||
| `troubleshooting_url` | string | false | | |
|
||||
| `updated_at` | string | false | | |
|
||||
| `version` | string | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Property | Value |
|
||||
| -------- | -------------- |
|
||||
| `status` | `connecting` |
|
||||
| `status` | `connected` |
|
||||
| `status` | `disconnected` |
|
||||
| `status` | `timeout` |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------------------------- | -------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `apps` | array of [codersdk.WorkspaceApp](#codersdkworkspaceapp) | false | | |
|
||||
| `architecture` | string | false | | |
|
||||
| `connection_timeout_seconds` | integer | false | | |
|
||||
| `created_at` | string | false | | |
|
||||
| `delay_login_until_ready` | boolean | false | | Delay login until ready if true, the agent will delay logins until it is ready (e.g. executing startup script has ended). |
|
||||
| `directory` | string | false | | |
|
||||
| `disconnected_at` | string | false | | |
|
||||
| `environment_variables` | object | false | | |
|
||||
| » `[any property]` | string | false | | |
|
||||
| `first_connected_at` | string | false | | |
|
||||
| `id` | string | false | | |
|
||||
| `instance_id` | string | false | | |
|
||||
| `last_connected_at` | string | false | | |
|
||||
| `latency` | object | false | | Latency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| » `[any property]` | [codersdk.DERPRegion](#codersdkderpregion) | false | | |
|
||||
| `lifecycle_state` | [codersdk.WorkspaceAgentLifecycle](#codersdkworkspaceagentlifecycle) | false | | |
|
||||
| `name` | string | false | | |
|
||||
| `operating_system` | string | false | | |
|
||||
| `resource_id` | string | false | | |
|
||||
| `startup_script` | string | false | | |
|
||||
| `startup_script_timeout_seconds` | integer | false | | Startup script timeout seconds is the number of seconds to wait for the startup script to complete. If the script does not complete within this time, the agent lifecycle will be marked as start_timeout. |
|
||||
| `status` | [codersdk.WorkspaceAgentStatus](#codersdkworkspaceagentstatus) | false | | |
|
||||
| `troubleshooting_url` | string | false | | |
|
||||
| `updated_at` | string | false | | |
|
||||
| `version` | string | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentAuthenticateResponse
|
||||
|
||||
@@ -4848,6 +4862,24 @@ Parameter represents a set value for the scope.
|
||||
| `url` | string | false | | |
|
||||
| `username` | string | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentLifecycle
|
||||
|
||||
```json
|
||||
"created"
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Value |
|
||||
| --------------- |
|
||||
| `created` |
|
||||
| `starting` |
|
||||
| `start_timeout` |
|
||||
| `start_error` |
|
||||
| `ready` |
|
||||
|
||||
## codersdk.WorkspaceAgentMetadata
|
||||
|
||||
```json
|
||||
@@ -4930,23 +4962,25 @@ Parameter represents a set value for the scope.
|
||||
"git_auth_configs": 0,
|
||||
"motd_file": "string",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout": 0,
|
||||
"vscode_port_proxy_uri": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ----------------------- | ------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `apps` | array of [codersdk.WorkspaceApp](#codersdkworkspaceapp) | false | | |
|
||||
| `derpmap` | [tailcfg.DERPMap](#tailcfgderpmap) | false | | |
|
||||
| `directory` | string | false | | |
|
||||
| `environment_variables` | object | false | | |
|
||||
| » `[any property]` | string | false | | |
|
||||
| `git_auth_configs` | integer | false | | Git auth configs stores the number of Git configurations the Coder deployment has. If this number is >0, we set up special configuration in the workspace. |
|
||||
| `motd_file` | string | false | | |
|
||||
| `startup_script` | string | false | | |
|
||||
| `vscode_port_proxy_uri` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------ | ------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `apps` | array of [codersdk.WorkspaceApp](#codersdkworkspaceapp) | false | | |
|
||||
| `derpmap` | [tailcfg.DERPMap](#tailcfgderpmap) | false | | |
|
||||
| `directory` | string | false | | |
|
||||
| `environment_variables` | object | false | | |
|
||||
| » `[any property]` | string | false | | |
|
||||
| `git_auth_configs` | integer | false | | Git auth configs stores the number of Git configurations the Coder deployment has. If this number is >0, we set up special configuration in the workspace. |
|
||||
| `motd_file` | string | false | | |
|
||||
| `startup_script` | string | false | | |
|
||||
| `startup_script_timeout` | integer | false | | |
|
||||
| `vscode_port_proxy_uri` | string | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentStatus
|
||||
|
||||
@@ -5097,6 +5131,7 @@ Parameter represents a set value for the scope.
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -5117,10 +5152,12 @@ Parameter represents a set value for the scope.
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -5262,6 +5299,7 @@ Parameter represents a set value for the scope.
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -5282,10 +5320,12 @@ Parameter represents a set value for the scope.
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -5449,6 +5489,7 @@ Parameter represents a set value for the scope.
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -5469,10 +5510,12 @@ Parameter represents a set value for the scope.
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
|
||||
+132
-110
@@ -1564,6 +1564,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -1584,10 +1585,12 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -1624,61 +1627,64 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
|
||||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» agents` | array | false | | |
|
||||
| `»» apps` | array | false | | |
|
||||
| `»»» command` | string | false | | |
|
||||
| `»»» display_name` | string | false | | »»display name is a friendly name for the app. |
|
||||
| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
|
||||
| `»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
|
||||
| `»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
|
||||
| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
|
||||
| `»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
|
||||
| `»»»» url` | string | false | | »»»url specifies the endpoint to check for the app health. |
|
||||
| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `»»» url` | string | false | | »»url is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| `»» architecture` | string | false | | |
|
||||
| `»» connection_timeout_seconds` | integer | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» directory` | string | false | | |
|
||||
| `»» disconnected_at` | string(date-time) | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» instance_id` | string | false | | |
|
||||
| `»» last_connected_at` | string(date-time) | false | | |
|
||||
| `»» latency` | object | false | | »latency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| `»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
|
||||
| `»»»» latency_ms` | number | false | | |
|
||||
| `»»»» preferred` | boolean | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» startup_script` | string | false | | |
|
||||
| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»» troubleshooting_url` | string | false | | |
|
||||
| `»» updated_at` | string(date-time) | false | | |
|
||||
| `»» version` | string | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» daily_cost` | integer | false | | |
|
||||
| `» hide` | boolean | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» job_id` | string(uuid) | false | | |
|
||||
| `» metadata` | array | false | | |
|
||||
| `»» key` | string | false | | |
|
||||
| `»» sensitive` | boolean | false | | |
|
||||
| `»» value` | string | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» type` | string | false | | |
|
||||
| `» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ----------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» agents` | array | false | | |
|
||||
| `»» apps` | array | false | | |
|
||||
| `»»» command` | string | false | | |
|
||||
| `»»» display_name` | string | false | | »»display name is a friendly name for the app. |
|
||||
| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
|
||||
| `»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
|
||||
| `»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
|
||||
| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
|
||||
| `»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
|
||||
| `»»»» url` | string | false | | »»»url specifies the endpoint to check for the app health. |
|
||||
| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `»»» url` | string | false | | »»url is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| `»» architecture` | string | false | | |
|
||||
| `»» connection_timeout_seconds` | integer | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» delay_login_until_ready` | boolean | false | | »delay login until ready if true, the agent will delay logins until it is ready (e.g. executing startup script has ended). |
|
||||
| `»» directory` | string | false | | |
|
||||
| `»» disconnected_at` | string(date-time) | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» instance_id` | string | false | | |
|
||||
| `»» last_connected_at` | string(date-time) | false | | |
|
||||
| `»» latency` | object | false | | »latency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| `»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
|
||||
| `»»»» latency_ms` | number | false | | |
|
||||
| `»»»» preferred` | boolean | false | | |
|
||||
| `»» lifecycle_state` | [codersdk.WorkspaceAgentLifecycle](schemas.md#codersdkworkspaceagentlifecycle) | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» startup_script` | string | false | | |
|
||||
| `»» startup_script_timeout_seconds` | integer | false | | »startup script timeout seconds is the number of seconds to wait for the startup script to complete. If the script does not complete within this time, the agent lifecycle will be marked as start_timeout. |
|
||||
| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»» troubleshooting_url` | string | false | | |
|
||||
| `»» updated_at` | string(date-time) | false | | |
|
||||
| `»» version` | string | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» daily_cost` | integer | false | | |
|
||||
| `» hide` | boolean | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» job_id` | string(uuid) | false | | |
|
||||
| `» metadata` | array | false | | |
|
||||
| `»» key` | string | false | | |
|
||||
| `»» sensitive` | boolean | false | | |
|
||||
| `»» value` | string | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» type` | string | false | | |
|
||||
| `» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
@@ -1691,6 +1697,11 @@ Status Code **200**
|
||||
| `sharing_level` | `owner` |
|
||||
| `sharing_level` | `authenticated` |
|
||||
| `sharing_level` | `public` |
|
||||
| `lifecycle_state` | `created` |
|
||||
| `lifecycle_state` | `starting` |
|
||||
| `lifecycle_state` | `start_timeout` |
|
||||
| `lifecycle_state` | `start_error` |
|
||||
| `lifecycle_state` | `ready` |
|
||||
| `status` | `connecting` |
|
||||
| `status` | `connected` |
|
||||
| `status` | `disconnected` |
|
||||
@@ -1905,6 +1916,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -1925,10 +1937,12 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -1965,61 +1979,64 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
|
||||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» agents` | array | false | | |
|
||||
| `»» apps` | array | false | | |
|
||||
| `»»» command` | string | false | | |
|
||||
| `»»» display_name` | string | false | | »»display name is a friendly name for the app. |
|
||||
| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
|
||||
| `»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
|
||||
| `»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
|
||||
| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
|
||||
| `»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
|
||||
| `»»»» url` | string | false | | »»»url specifies the endpoint to check for the app health. |
|
||||
| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `»»» url` | string | false | | »»url is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| `»» architecture` | string | false | | |
|
||||
| `»» connection_timeout_seconds` | integer | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» directory` | string | false | | |
|
||||
| `»» disconnected_at` | string(date-time) | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» instance_id` | string | false | | |
|
||||
| `»» last_connected_at` | string(date-time) | false | | |
|
||||
| `»» latency` | object | false | | »latency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| `»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
|
||||
| `»»»» latency_ms` | number | false | | |
|
||||
| `»»»» preferred` | boolean | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» startup_script` | string | false | | |
|
||||
| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»» troubleshooting_url` | string | false | | |
|
||||
| `»» updated_at` | string(date-time) | false | | |
|
||||
| `»» version` | string | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» daily_cost` | integer | false | | |
|
||||
| `» hide` | boolean | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» job_id` | string(uuid) | false | | |
|
||||
| `» metadata` | array | false | | |
|
||||
| `»» key` | string | false | | |
|
||||
| `»» sensitive` | boolean | false | | |
|
||||
| `»» value` | string | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» type` | string | false | | |
|
||||
| `» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ----------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» agents` | array | false | | |
|
||||
| `»» apps` | array | false | | |
|
||||
| `»»» command` | string | false | | |
|
||||
| `»»» display_name` | string | false | | »»display name is a friendly name for the app. |
|
||||
| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
|
||||
| `»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
|
||||
| `»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
|
||||
| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
|
||||
| `»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
|
||||
| `»»»» url` | string | false | | »»»url specifies the endpoint to check for the app health. |
|
||||
| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
|
||||
| `»»» url` | string | false | | »»url is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
|
||||
| `»» architecture` | string | false | | |
|
||||
| `»» connection_timeout_seconds` | integer | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» delay_login_until_ready` | boolean | false | | »delay login until ready if true, the agent will delay logins until it is ready (e.g. executing startup script has ended). |
|
||||
| `»» directory` | string | false | | |
|
||||
| `»» disconnected_at` | string(date-time) | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» instance_id` | string | false | | |
|
||||
| `»» last_connected_at` | string(date-time) | false | | |
|
||||
| `»» latency` | object | false | | »latency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| `»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
|
||||
| `»»»» latency_ms` | number | false | | |
|
||||
| `»»»» preferred` | boolean | false | | |
|
||||
| `»» lifecycle_state` | [codersdk.WorkspaceAgentLifecycle](schemas.md#codersdkworkspaceagentlifecycle) | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» startup_script` | string | false | | |
|
||||
| `»» startup_script_timeout_seconds` | integer | false | | »startup script timeout seconds is the number of seconds to wait for the startup script to complete. If the script does not complete within this time, the agent lifecycle will be marked as start_timeout. |
|
||||
| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»» troubleshooting_url` | string | false | | |
|
||||
| `»» updated_at` | string(date-time) | false | | |
|
||||
| `»» version` | string | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» daily_cost` | integer | false | | |
|
||||
| `» hide` | boolean | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» job_id` | string(uuid) | false | | |
|
||||
| `» metadata` | array | false | | |
|
||||
| `»» key` | string | false | | |
|
||||
| `»» sensitive` | boolean | false | | |
|
||||
| `»» value` | string | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» type` | string | false | | |
|
||||
| `» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
@@ -2032,6 +2049,11 @@ Status Code **200**
|
||||
| `sharing_level` | `owner` |
|
||||
| `sharing_level` | `authenticated` |
|
||||
| `sharing_level` | `public` |
|
||||
| `lifecycle_state` | `created` |
|
||||
| `lifecycle_state` | `starting` |
|
||||
| `lifecycle_state` | `start_timeout` |
|
||||
| `lifecycle_state` | `start_error` |
|
||||
| `lifecycle_state` | `ready` |
|
||||
| `status` | `connecting` |
|
||||
| `status` | `connected` |
|
||||
| `status` | `disconnected` |
|
||||
|
||||
@@ -80,6 +80,7 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -100,10 +101,12 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -241,6 +244,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -261,10 +265,12 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -421,6 +427,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -441,10 +448,12 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
@@ -583,6 +592,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \
|
||||
"architecture": "string",
|
||||
"connection_timeout_seconds": 0,
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"delay_login_until_ready": true,
|
||||
"directory": "string",
|
||||
"disconnected_at": "2019-08-24T14:15:22Z",
|
||||
"environment_variables": {
|
||||
@@ -603,10 +613,12 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \
|
||||
"preferred": true
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"troubleshooting_url": "string",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
|
||||
Reference in New Issue
Block a user