mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add support for coder_script (#9584)
* Add basic migrations * Improve schema * Refactor agent scripts into it's own package * Support legacy start and stop script format * Pipe the scripts! * Finish the piping * Fix context usage * It works! * Fix sql query * Fix SQL query * Rename `LogSourceID` -> `SourceID` * Fix the FE * fmt * Rename migrations * Fix log tests * Fix lint err * Fix gen * Fix story type * Rename source to script * Fix schema jank * Uncomment test * Rename proto to TimeoutSeconds * Fix comments * Fix comments * Fix legacy endpoint without specified log_source * Fix non-blocking by default in agent * Fix resources tests * Fix dbfake * Fix resources * Fix linting I think * Add fixtures * fmt * Fix startup script behavior * Fix comments * Fix context * Fix cancel * Fix SQL tests * Fix e2e tests * Interrupt on Windows * Fix agent leaking script process * Fix migrations * Fix stories * Fix duplicate logs appearing * Gen * Fix log location * Fix tests * Fix tests * Fix log output * Show display name in output * Fix print * Return timeout on start context * Gen * Fix fixture * Fix the agent status * Fix startup timeout msg * Fix command using shared context * Fix timeout draining * Change signal type * Add deterministic colors to startup script logs --------- Co-authored-by: Muhammad Atif Ali <atif@coder.com>
This commit is contained in:
co-authored by
Muhammad Atif Ali
parent
dac1375880
commit
1262eef2c0
Generated
+43
-15
@@ -311,12 +311,12 @@ curl -X PATCH http://coder-server:8080/api/v2/workspaceagents/me/logs \
|
||||
|
||||
```json
|
||||
{
|
||||
"log_source_id": "string",
|
||||
"logs": [
|
||||
{
|
||||
"created_at": "string",
|
||||
"level": "trace",
|
||||
"output": "string",
|
||||
"source": "startup_script"
|
||||
"output": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -470,10 +470,18 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/manifest \
|
||||
}
|
||||
],
|
||||
"motd_file": "string",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout": 0,
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"vscode_port_proxy_uri": "string"
|
||||
}
|
||||
```
|
||||
@@ -576,12 +584,12 @@ curl -X PATCH http://coder-server:8080/api/v2/workspaceagents/me/startup-logs \
|
||||
|
||||
```json
|
||||
{
|
||||
"log_source_id": "string",
|
||||
"logs": [
|
||||
{
|
||||
"created_at": "string",
|
||||
"level": "trace",
|
||||
"output": "string",
|
||||
"source": "startup_script"
|
||||
"output": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -693,19 +701,35 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -921,7 +945,8 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/log
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"id": 0,
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
"output": "string",
|
||||
"source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81"
|
||||
}
|
||||
]
|
||||
```
|
||||
@@ -943,6 +968,7 @@ Status Code **200**
|
||||
| `» id` | integer | false | | |
|
||||
| `» level` | [codersdk.LogLevel](schemas.md#codersdkloglevel) | false | | |
|
||||
| `» output` | string | false | | |
|
||||
| `» source_id` | string(uuid) | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
@@ -1015,7 +1041,8 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/sta
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"id": 0,
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
"output": "string",
|
||||
"source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81"
|
||||
}
|
||||
]
|
||||
```
|
||||
@@ -1037,6 +1064,7 @@ Status Code **200**
|
||||
| `» id` | integer | false | | |
|
||||
| `» level` | [codersdk.LogLevel](schemas.md#codersdkloglevel) | false | | |
|
||||
| `» output` | string | false | | |
|
||||
| `» source_id` | string(uuid) | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
|
||||
Generated
+324
-208
@@ -108,19 +108,35 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -272,19 +288,35 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -575,19 +607,35 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -625,78 +673,88 @@ 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. |
|
||||
| `»»» subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `»»» 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 | | |
|
||||
| `»» display_apps` | array | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» expanded_directory` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» health` | [codersdk.WorkspaceAgentHealth](schemas.md#codersdkworkspaceagenthealth) | false | | Health reports the health of the agent. |
|
||||
| `»»» healthy` | boolean | false | | Healthy is true if the agent is healthy. |
|
||||
| `»»» reason` | string | false | | Reason is a human-readable explanation of the agent's health. It is empty if Healthy is true. |
|
||||
| `»» 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 | | |
|
||||
| `»» login_before_ready` | boolean | false | | Deprecated: Use StartupScriptBehavior instead. |
|
||||
| `»» logs_length` | integer | false | | |
|
||||
| `»» logs_overflowed` | boolean | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» ready_at` | string(date-time) | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» shutdown_script` | string | false | | |
|
||||
| `»» shutdown_script_timeout_seconds` | integer | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» startup_script` | string | false | | |
|
||||
| `»» startup_script_behavior` | [codersdk.WorkspaceAgentStartupScriptBehavior](schemas.md#codersdkworkspaceagentstartupscriptbehavior) | 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 | | |
|
||||
| `»» subsystems` | array | 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. |
|
||||
| `»»» subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `»»» 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 | | |
|
||||
| `»» display_apps` | array | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» expanded_directory` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» health` | [codersdk.WorkspaceAgentHealth](schemas.md#codersdkworkspaceagenthealth) | false | | Health reports the health of the agent. |
|
||||
| `»»» healthy` | boolean | false | | Healthy is true if the agent is healthy. |
|
||||
| `»»» reason` | string | false | | Reason is a human-readable explanation of the agent's health. It is empty if Healthy is true. |
|
||||
| `»» 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 | | |
|
||||
| `»» log_sources` | array | false | | |
|
||||
| `»»» created_at` | string(date-time) | false | | |
|
||||
| `»»» display_name` | string | false | | |
|
||||
| `»»» icon` | string | false | | |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» workspace_agent_id` | string(uuid) | false | | |
|
||||
| `»» logs_length` | integer | false | | |
|
||||
| `»» logs_overflowed` | boolean | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» ready_at` | string(date-time) | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» scripts` | array | false | | |
|
||||
| `»»» cron` | string | false | | |
|
||||
| `»»» log_path` | string | false | | |
|
||||
| `»»» log_source_id` | string(uuid) | false | | |
|
||||
| `»»» run_on_start` | boolean | false | | |
|
||||
| `»»» run_on_stop` | boolean | false | | |
|
||||
| `»»» script` | string | false | | |
|
||||
| `»»» start_blocks_login` | boolean | false | | |
|
||||
| `»»» timeout` | integer | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» startup_script_behavior` | [codersdk.WorkspaceAgentStartupScriptBehavior](schemas.md#codersdkworkspaceagentstartupscriptbehavior) | false | | Startup script behavior is a legacy field that is deprecated in favor of the `coder_script` resource. It's only referenced by old clients. Deprecated: Remove in the future! |
|
||||
| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»» subsystems` | array | 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
|
||||
|
||||
@@ -836,19 +894,35 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -1005,19 +1079,35 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -1066,112 +1156,122 @@ 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 | | |
|
||||
| `»» error_code` | [codersdk.JobErrorCode](schemas.md#codersdkjoberrorcode) | false | | |
|
||||
| `»» file_id` | string(uuid) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» queue_position` | integer | false | | |
|
||||
| `»» queue_size` | integer | 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 | | |
|
||||
| `» max_deadline` | string(date-time) | 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. |
|
||||
| `»»»» subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `»»»» 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 | | |
|
||||
| `»»» display_apps` | array | false | | |
|
||||
| `»»» environment_variables` | object | false | | |
|
||||
| `»»»» [any property]` | string | false | | |
|
||||
| `»»» expanded_directory` | string | false | | |
|
||||
| `»»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»»» health` | [codersdk.WorkspaceAgentHealth](schemas.md#codersdkworkspaceagenthealth) | false | | Health reports the health of the agent. |
|
||||
| `»»»» healthy` | boolean | false | | Healthy is true if the agent is healthy. |
|
||||
| `»»»» reason` | string | false | | Reason is a human-readable explanation of the agent's health. It is empty if Healthy is true. |
|
||||
| `»»» 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 | | |
|
||||
| `»»» login_before_ready` | boolean | false | | Deprecated: Use StartupScriptBehavior instead. |
|
||||
| `»»» logs_length` | integer | false | | |
|
||||
| `»»» logs_overflowed` | boolean | false | | |
|
||||
| `»»» name` | string | false | | |
|
||||
| `»»» operating_system` | string | false | | |
|
||||
| `»»» ready_at` | string(date-time) | false | | |
|
||||
| `»»» resource_id` | string(uuid) | false | | |
|
||||
| `»»» shutdown_script` | string | false | | |
|
||||
| `»»» shutdown_script_timeout_seconds` | integer | false | | |
|
||||
| `»»» started_at` | string(date-time) | false | | |
|
||||
| `»»» startup_script` | string | false | | |
|
||||
| `»»» startup_script_behavior` | [codersdk.WorkspaceAgentStartupScriptBehavior](schemas.md#codersdkworkspaceagentstartupscriptbehavior) | 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 | | |
|
||||
| `»»» subsystems` | array | 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 | | |
|
||||
| `»» error_code` | [codersdk.JobErrorCode](schemas.md#codersdkjoberrorcode) | false | | |
|
||||
| `»» file_id` | string(uuid) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» queue_position` | integer | false | | |
|
||||
| `»» queue_size` | integer | 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 | | |
|
||||
| `» max_deadline` | string(date-time) | 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. |
|
||||
| `»»»» subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `»»»» 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 | | |
|
||||
| `»»» display_apps` | array | false | | |
|
||||
| `»»» environment_variables` | object | false | | |
|
||||
| `»»»» [any property]` | string | false | | |
|
||||
| `»»» expanded_directory` | string | false | | |
|
||||
| `»»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»»» health` | [codersdk.WorkspaceAgentHealth](schemas.md#codersdkworkspaceagenthealth) | false | | Health reports the health of the agent. |
|
||||
| `»»»» healthy` | boolean | false | | Healthy is true if the agent is healthy. |
|
||||
| `»»»» reason` | string | false | | Reason is a human-readable explanation of the agent's health. It is empty if Healthy is true. |
|
||||
| `»»» 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 | | |
|
||||
| `»»» log_sources` | array | false | | |
|
||||
| `»»»» created_at` | string(date-time) | false | | |
|
||||
| `»»»» display_name` | string | false | | |
|
||||
| `»»»» icon` | string | false | | |
|
||||
| `»»»» id` | string(uuid) | false | | |
|
||||
| `»»»» workspace_agent_id` | string(uuid) | false | | |
|
||||
| `»»» logs_length` | integer | false | | |
|
||||
| `»»» logs_overflowed` | boolean | false | | |
|
||||
| `»»» name` | string | false | | |
|
||||
| `»»» operating_system` | string | false | | |
|
||||
| `»»» ready_at` | string(date-time) | false | | |
|
||||
| `»»» resource_id` | string(uuid) | false | | |
|
||||
| `»»» scripts` | array | false | | |
|
||||
| `»»»» cron` | string | false | | |
|
||||
| `»»»» log_path` | string | false | | |
|
||||
| `»»»» log_source_id` | string(uuid) | false | | |
|
||||
| `»»»» run_on_start` | boolean | false | | |
|
||||
| `»»»» run_on_stop` | boolean | false | | |
|
||||
| `»»»» script` | string | false | | |
|
||||
| `»»»» start_blocks_login` | boolean | false | | |
|
||||
| `»»»» timeout` | integer | false | | |
|
||||
| `»»» started_at` | string(date-time) | false | | |
|
||||
| `»»» startup_script_behavior` | [codersdk.WorkspaceAgentStartupScriptBehavior](schemas.md#codersdkworkspaceagentstartupscriptbehavior) | false | | Startup script behavior is a legacy field that is deprecated in favor of the `coder_script` resource. It's only referenced by old clients. Deprecated: Remove in the future! |
|
||||
| `»»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»»» subsystems` | array | 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
|
||||
|
||||
@@ -1355,19 +1455,35 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
|
||||
Generated
+210
-96
@@ -163,19 +163,17 @@
|
||||
{
|
||||
"created_at": "string",
|
||||
"level": "trace",
|
||||
"output": "string",
|
||||
"source": "startup_script"
|
||||
"output": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------ | -------------------------------------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `created_at` | string | false | | |
|
||||
| `level` | [codersdk.LogLevel](#codersdkloglevel) | false | | |
|
||||
| `output` | string | false | | |
|
||||
| `source` | [codersdk.WorkspaceAgentLogSource](#codersdkworkspaceagentlogsource) | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------ | -------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `created_at` | string | false | | |
|
||||
| `level` | [codersdk.LogLevel](#codersdkloglevel) | false | | |
|
||||
| `output` | string | false | | |
|
||||
|
||||
## agentsdk.Manifest
|
||||
|
||||
@@ -279,10 +277,18 @@
|
||||
}
|
||||
],
|
||||
"motd_file": "string",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout": 0,
|
||||
"startup_script": "string",
|
||||
"startup_script_timeout": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"vscode_port_proxy_uri": "string"
|
||||
}
|
||||
```
|
||||
@@ -302,22 +308,19 @@
|
||||
| `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. |
|
||||
| `metadata` | array of [codersdk.WorkspaceAgentMetadataDescription](#codersdkworkspaceagentmetadatadescription) | false | | |
|
||||
| `motd_file` | string | false | | |
|
||||
| `shutdown_script` | string | false | | |
|
||||
| `shutdown_script_timeout` | integer | false | | |
|
||||
| `startup_script` | string | false | | |
|
||||
| `startup_script_timeout` | integer | false | | |
|
||||
| `scripts` | array of [codersdk.WorkspaceAgentScript](#codersdkworkspaceagentscript) | false | | |
|
||||
| `vscode_port_proxy_uri` | string | false | | |
|
||||
|
||||
## agentsdk.PatchLogs
|
||||
|
||||
```json
|
||||
{
|
||||
"log_source_id": "string",
|
||||
"logs": [
|
||||
{
|
||||
"created_at": "string",
|
||||
"level": "trace",
|
||||
"output": "string",
|
||||
"source": "startup_script"
|
||||
"output": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -325,9 +328,10 @@
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------ | ------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `logs` | array of [agentsdk.Log](#agentsdklog) | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| --------------- | ------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `log_source_id` | string | false | | |
|
||||
| `logs` | array of [agentsdk.Log](#agentsdklog) | false | | |
|
||||
|
||||
## agentsdk.PostAppHealthsRequest
|
||||
|
||||
@@ -5474,19 +5478,35 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -5618,19 +5638,35 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -5641,44 +5677,41 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
|
||||
### 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 | | |
|
||||
| `display_apps` | array of [codersdk.DisplayApp](#codersdkdisplayapp) | false | | |
|
||||
| `environment_variables` | object | false | | |
|
||||
| » `[any property]` | string | false | | |
|
||||
| `expanded_directory` | string | false | | |
|
||||
| `first_connected_at` | string | false | | |
|
||||
| `health` | [codersdk.WorkspaceAgentHealth](#codersdkworkspaceagenthealth) | false | | Health reports the health of the agent. |
|
||||
| `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 | | |
|
||||
| `login_before_ready` | boolean | false | | Deprecated: Use StartupScriptBehavior instead. |
|
||||
| `logs_length` | integer | false | | |
|
||||
| `logs_overflowed` | boolean | false | | |
|
||||
| `name` | string | false | | |
|
||||
| `operating_system` | string | false | | |
|
||||
| `ready_at` | string | false | | |
|
||||
| `resource_id` | string | false | | |
|
||||
| `shutdown_script` | string | false | | |
|
||||
| `shutdown_script_timeout_seconds` | integer | false | | |
|
||||
| `started_at` | string | false | | |
|
||||
| `startup_script` | string | false | | |
|
||||
| `startup_script_behavior` | [codersdk.WorkspaceAgentStartupScriptBehavior](#codersdkworkspaceagentstartupscriptbehavior) | 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 | | |
|
||||
| `subsystems` | array of [codersdk.AgentSubsystem](#codersdkagentsubsystem) | false | | |
|
||||
| `troubleshooting_url` | string | false | | |
|
||||
| `updated_at` | string | false | | |
|
||||
| `version` | string | false | | |
|
||||
| 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 | | |
|
||||
| `display_apps` | array of [codersdk.DisplayApp](#codersdkdisplayapp) | false | | |
|
||||
| `environment_variables` | object | false | | |
|
||||
| » `[any property]` | string | false | | |
|
||||
| `expanded_directory` | string | false | | |
|
||||
| `first_connected_at` | string | false | | |
|
||||
| `health` | [codersdk.WorkspaceAgentHealth](#codersdkworkspaceagenthealth) | false | | Health reports the health of the agent. |
|
||||
| `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 | | |
|
||||
| `log_sources` | array of [codersdk.WorkspaceAgentLogSource](#codersdkworkspaceagentlogsource) | false | | |
|
||||
| `logs_length` | integer | false | | |
|
||||
| `logs_overflowed` | boolean | false | | |
|
||||
| `name` | string | false | | |
|
||||
| `operating_system` | string | false | | |
|
||||
| `ready_at` | string | false | | |
|
||||
| `resource_id` | string | false | | |
|
||||
| `scripts` | array of [codersdk.WorkspaceAgentScript](#codersdkworkspaceagentscript) | false | | |
|
||||
| `started_at` | string | false | | |
|
||||
| `startup_script_behavior` | [codersdk.WorkspaceAgentStartupScriptBehavior](#codersdkworkspaceagentstartupscriptbehavior) | false | | Startup script behavior is a legacy field that is deprecated in favor of the `coder_script` resource. It's only referenced by old clients. Deprecated: Remove in the future! |
|
||||
| `status` | [codersdk.WorkspaceAgentStatus](#codersdkworkspaceagentstatus) | false | | |
|
||||
| `subsystems` | array of [codersdk.AgentSubsystem](#codersdkagentsubsystem) | false | | |
|
||||
| `troubleshooting_url` | string | false | | |
|
||||
| `updated_at` | string | false | | |
|
||||
| `version` | string | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentConnectionInfo
|
||||
|
||||
@@ -5839,7 +5872,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"id": 0,
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
"output": "string",
|
||||
"source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -5851,25 +5885,29 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
| `id` | integer | false | | |
|
||||
| `level` | [codersdk.LogLevel](#codersdkloglevel) | false | | |
|
||||
| `output` | string | false | | |
|
||||
| `source_id` | string | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentLogSource
|
||||
|
||||
```json
|
||||
"startup_script"
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Value |
|
||||
| ----------------- |
|
||||
| `startup_script` |
|
||||
| `shutdown_script` |
|
||||
| `kubernetes` |
|
||||
| `envbox` |
|
||||
| `envbuilder` |
|
||||
| `external` |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------------- | ------ | -------- | ------------ | ----------- |
|
||||
| `created_at` | string | false | | |
|
||||
| `display_name` | string | false | | |
|
||||
| `icon` | string | false | | |
|
||||
| `id` | string | false | | |
|
||||
| `workspace_agent_id` | string | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentMetadataDescription
|
||||
|
||||
@@ -5893,6 +5931,34 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
| `script` | string | false | | |
|
||||
| `timeout` | integer | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentScript
|
||||
|
||||
```json
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------------- | ------- | -------- | ------------ | ----------- |
|
||||
| `cron` | string | false | | |
|
||||
| `log_path` | string | false | | |
|
||||
| `log_source_id` | string | false | | |
|
||||
| `run_on_start` | boolean | false | | |
|
||||
| `run_on_stop` | boolean | false | | |
|
||||
| `script` | string | false | | |
|
||||
| `start_blocks_login` | boolean | false | | |
|
||||
| `timeout` | integer | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentStartupScriptBehavior
|
||||
|
||||
```json
|
||||
@@ -6091,19 +6157,35 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -6404,19 +6486,35 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -6619,19 +6717,35 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
|
||||
Generated
+206
-154
@@ -1619,19 +1619,35 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -1669,78 +1685,88 @@ 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. |
|
||||
| `»»» subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `»»» 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 | | |
|
||||
| `»» display_apps` | array | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» expanded_directory` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» health` | [codersdk.WorkspaceAgentHealth](schemas.md#codersdkworkspaceagenthealth) | false | | Health reports the health of the agent. |
|
||||
| `»»» healthy` | boolean | false | | Healthy is true if the agent is healthy. |
|
||||
| `»»» reason` | string | false | | Reason is a human-readable explanation of the agent's health. It is empty if Healthy is true. |
|
||||
| `»» 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 | | |
|
||||
| `»» login_before_ready` | boolean | false | | Deprecated: Use StartupScriptBehavior instead. |
|
||||
| `»» logs_length` | integer | false | | |
|
||||
| `»» logs_overflowed` | boolean | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» ready_at` | string(date-time) | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» shutdown_script` | string | false | | |
|
||||
| `»» shutdown_script_timeout_seconds` | integer | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» startup_script` | string | false | | |
|
||||
| `»» startup_script_behavior` | [codersdk.WorkspaceAgentStartupScriptBehavior](schemas.md#codersdkworkspaceagentstartupscriptbehavior) | 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 | | |
|
||||
| `»» subsystems` | array | 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. |
|
||||
| `»»» subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `»»» 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 | | |
|
||||
| `»» display_apps` | array | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» expanded_directory` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» health` | [codersdk.WorkspaceAgentHealth](schemas.md#codersdkworkspaceagenthealth) | false | | Health reports the health of the agent. |
|
||||
| `»»» healthy` | boolean | false | | Healthy is true if the agent is healthy. |
|
||||
| `»»» reason` | string | false | | Reason is a human-readable explanation of the agent's health. It is empty if Healthy is true. |
|
||||
| `»» 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 | | |
|
||||
| `»» log_sources` | array | false | | |
|
||||
| `»»» created_at` | string(date-time) | false | | |
|
||||
| `»»» display_name` | string | false | | |
|
||||
| `»»» icon` | string | false | | |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» workspace_agent_id` | string(uuid) | false | | |
|
||||
| `»» logs_length` | integer | false | | |
|
||||
| `»» logs_overflowed` | boolean | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» ready_at` | string(date-time) | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» scripts` | array | false | | |
|
||||
| `»»» cron` | string | false | | |
|
||||
| `»»» log_path` | string | false | | |
|
||||
| `»»» log_source_id` | string(uuid) | false | | |
|
||||
| `»»» run_on_start` | boolean | false | | |
|
||||
| `»»» run_on_stop` | boolean | false | | |
|
||||
| `»»» script` | string | false | | |
|
||||
| `»»» start_blocks_login` | boolean | false | | |
|
||||
| `»»» timeout` | integer | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» startup_script_behavior` | [codersdk.WorkspaceAgentStartupScriptBehavior](schemas.md#codersdkworkspaceagentstartupscriptbehavior) | false | | Startup script behavior is a legacy field that is deprecated in favor of the `coder_script` resource. It's only referenced by old clients. Deprecated: Remove in the future! |
|
||||
| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»» subsystems` | array | 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
|
||||
|
||||
@@ -2014,19 +2040,35 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -2064,78 +2106,88 @@ 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. |
|
||||
| `»»» subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `»»» 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 | | |
|
||||
| `»» display_apps` | array | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» expanded_directory` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» health` | [codersdk.WorkspaceAgentHealth](schemas.md#codersdkworkspaceagenthealth) | false | | Health reports the health of the agent. |
|
||||
| `»»» healthy` | boolean | false | | Healthy is true if the agent is healthy. |
|
||||
| `»»» reason` | string | false | | Reason is a human-readable explanation of the agent's health. It is empty if Healthy is true. |
|
||||
| `»» 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 | | |
|
||||
| `»» login_before_ready` | boolean | false | | Deprecated: Use StartupScriptBehavior instead. |
|
||||
| `»» logs_length` | integer | false | | |
|
||||
| `»» logs_overflowed` | boolean | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» ready_at` | string(date-time) | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» shutdown_script` | string | false | | |
|
||||
| `»» shutdown_script_timeout_seconds` | integer | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» startup_script` | string | false | | |
|
||||
| `»» startup_script_behavior` | [codersdk.WorkspaceAgentStartupScriptBehavior](schemas.md#codersdkworkspaceagentstartupscriptbehavior) | 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 | | |
|
||||
| `»» subsystems` | array | 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. |
|
||||
| `»»» subdomain_name` | string | false | | Subdomain name is the application domain exposed on the `coder server`. |
|
||||
| `»»» 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 | | |
|
||||
| `»» display_apps` | array | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» expanded_directory` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» health` | [codersdk.WorkspaceAgentHealth](schemas.md#codersdkworkspaceagenthealth) | false | | Health reports the health of the agent. |
|
||||
| `»»» healthy` | boolean | false | | Healthy is true if the agent is healthy. |
|
||||
| `»»» reason` | string | false | | Reason is a human-readable explanation of the agent's health. It is empty if Healthy is true. |
|
||||
| `»» 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 | | |
|
||||
| `»» log_sources` | array | false | | |
|
||||
| `»»» created_at` | string(date-time) | false | | |
|
||||
| `»»» display_name` | string | false | | |
|
||||
| `»»» icon` | string | false | | |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» workspace_agent_id` | string(uuid) | false | | |
|
||||
| `»» logs_length` | integer | false | | |
|
||||
| `»» logs_overflowed` | boolean | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» ready_at` | string(date-time) | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» scripts` | array | false | | |
|
||||
| `»»» cron` | string | false | | |
|
||||
| `»»» log_path` | string | false | | |
|
||||
| `»»» log_source_id` | string(uuid) | false | | |
|
||||
| `»»» run_on_start` | boolean | false | | |
|
||||
| `»»» run_on_stop` | boolean | false | | |
|
||||
| `»»» script` | string | false | | |
|
||||
| `»»» start_blocks_login` | boolean | false | | |
|
||||
| `»»» timeout` | integer | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» startup_script_behavior` | [codersdk.WorkspaceAgentStartupScriptBehavior](schemas.md#codersdkworkspaceagentstartupscriptbehavior) | false | | Startup script behavior is a legacy field that is deprecated in favor of the `coder_script` resource. It's only referenced by old clients. Deprecated: Remove in the future! |
|
||||
| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»» subsystems` | array | 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
|
||||
|
||||
|
||||
Generated
+105
-25
@@ -138,19 +138,35 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -329,19 +345,35 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -519,19 +551,35 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -711,19 +759,35 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
@@ -982,19 +1046,35 @@ curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/dormant \
|
||||
}
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"log_sources": [
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"display_name": "string",
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"
|
||||
}
|
||||
],
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"scripts": [
|
||||
{
|
||||
"cron": "string",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
"run_on_start": true,
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
"status": "connecting",
|
||||
"subsystems": ["envbox"],
|
||||
"troubleshooting_url": "string",
|
||||
|
||||
Reference in New Issue
Block a user