mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add exit code and status to workspace agent scripts (#24505)
For scripts that have not finished or in dry run cases these will be omitted.
This commit is contained in:
Generated
+2
@@ -632,6 +632,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -639,6 +640,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
|
||||
Generated
+32
-16
@@ -182,6 +182,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -189,6 +190,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -423,6 +425,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -430,6 +433,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -782,6 +786,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -789,6 +794,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -908,6 +914,7 @@ Status Code **200**
|
||||
| `»» scripts` | array | false | | |
|
||||
| `»»» cron` | string | false | | |
|
||||
| `»»» display_name` | string | false | | |
|
||||
| `»»» exit_code` | integer | false | | |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» log_path` | string | false | | |
|
||||
| `»»» log_source_id` | string(uuid) | false | | |
|
||||
@@ -915,6 +922,7 @@ Status Code **200**
|
||||
| `»»» run_on_stop` | boolean | false | | |
|
||||
| `»»» script` | string | false | | |
|
||||
| `»»» start_blocks_login` | boolean | false | | |
|
||||
| `»»» status` | [codersdk.WorkspaceAgentScriptStatus](schemas.md#codersdkworkspaceagentscriptstatus) | 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! |
|
||||
@@ -946,8 +954,8 @@ Status Code **200**
|
||||
| `sharing_level` | `authenticated`, `organization`, `owner`, `public` |
|
||||
| `state` | `complete`, `failure`, `idle`, `working` |
|
||||
| `lifecycle_state` | `created`, `off`, `ready`, `shutdown_error`, `shutdown_timeout`, `shutting_down`, `start_error`, `start_timeout`, `starting` |
|
||||
| `status` | `connected`, `connecting`, `disconnected`, `exit_failure`, `ok`, `pipes_left_open`, `timed_out`, `timeout` |
|
||||
| `startup_script_behavior` | `blocking`, `non-blocking` |
|
||||
| `status` | `connected`, `connecting`, `disconnected`, `timeout` |
|
||||
| `workspace_transition` | `delete`, `start`, `stop` |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
@@ -1132,6 +1140,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -1139,6 +1148,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -1484,6 +1494,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -1491,6 +1502,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -1673,6 +1685,7 @@ Status Code **200**
|
||||
| `»»» scripts` | array | false | | |
|
||||
| `»»»» cron` | string | false | | |
|
||||
| `»»»» display_name` | string | false | | |
|
||||
| `»»»» exit_code` | integer | false | | |
|
||||
| `»»»» id` | string(uuid) | false | | |
|
||||
| `»»»» log_path` | string | false | | |
|
||||
| `»»»» log_source_id` | string(uuid) | false | | |
|
||||
@@ -1680,6 +1693,7 @@ Status Code **200**
|
||||
| `»»»» run_on_stop` | boolean | false | | |
|
||||
| `»»»» script` | string | false | | |
|
||||
| `»»»» start_blocks_login` | boolean | false | | |
|
||||
| `»»»» status` | [codersdk.WorkspaceAgentScriptStatus](schemas.md#codersdkworkspaceagentscriptstatus) | 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! |
|
||||
@@ -1715,21 +1729,21 @@ Status Code **200**
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Property | Value(s) |
|
||||
|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `error_code` | `REQUIRED_TEMPLATE_VARIABLES` |
|
||||
| `workspace_build_transition` | `delete`, `start`, `stop` |
|
||||
| `status` | `canceled`, `canceling`, `connected`, `connecting`, `deleted`, `deleting`, `disconnected`, `failed`, `pending`, `running`, `starting`, `stopped`, `stopping`, `succeeded`, `timeout` |
|
||||
| `type` | `template_version_dry_run`, `template_version_import`, `workspace_build` |
|
||||
| `reason` | `autostart`, `autostop`, `initiator` |
|
||||
| `health` | `disabled`, `healthy`, `initializing`, `unhealthy` |
|
||||
| `open_in` | `slim-window`, `tab` |
|
||||
| `sharing_level` | `authenticated`, `organization`, `owner`, `public` |
|
||||
| `state` | `complete`, `failure`, `idle`, `working` |
|
||||
| `lifecycle_state` | `created`, `off`, `ready`, `shutdown_error`, `shutdown_timeout`, `shutting_down`, `start_error`, `start_timeout`, `starting` |
|
||||
| `startup_script_behavior` | `blocking`, `non-blocking` |
|
||||
| `workspace_transition` | `delete`, `start`, `stop` |
|
||||
| `transition` | `delete`, `start`, `stop` |
|
||||
| Property | Value(s) |
|
||||
|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `error_code` | `REQUIRED_TEMPLATE_VARIABLES` |
|
||||
| `workspace_build_transition` | `delete`, `start`, `stop` |
|
||||
| `status` | `canceled`, `canceling`, `connected`, `connecting`, `deleted`, `deleting`, `disconnected`, `exit_failure`, `failed`, `ok`, `pending`, `pipes_left_open`, `running`, `starting`, `stopped`, `stopping`, `succeeded`, `timed_out`, `timeout` |
|
||||
| `type` | `template_version_dry_run`, `template_version_import`, `workspace_build` |
|
||||
| `reason` | `autostart`, `autostop`, `initiator` |
|
||||
| `health` | `disabled`, `healthy`, `initializing`, `unhealthy` |
|
||||
| `open_in` | `slim-window`, `tab` |
|
||||
| `sharing_level` | `authenticated`, `organization`, `owner`, `public` |
|
||||
| `state` | `complete`, `failure`, `idle`, `working` |
|
||||
| `lifecycle_state` | `created`, `off`, `ready`, `shutdown_error`, `shutdown_timeout`, `shutting_down`, `start_error`, `start_timeout`, `starting` |
|
||||
| `startup_script_behavior` | `blocking`, `non-blocking` |
|
||||
| `workspace_transition` | `delete`, `start`, `stop` |
|
||||
| `transition` | `delete`, `start`, `stop` |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
@@ -1938,6 +1952,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -1945,6 +1960,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
|
||||
Generated
+44
-12
@@ -7337,6 +7337,7 @@ Only certain features set these fields: - FeatureManagedAgentLimit|
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -7344,6 +7345,7 @@ Only certain features set these fields: - FeatureManagedAgentLimit|
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -8687,6 +8689,7 @@ Only certain features set these fields: - FeatureManagedAgentLimit|
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -8694,6 +8697,7 @@ Only certain features set these fields: - FeatureManagedAgentLimit|
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -11644,6 +11648,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -11651,6 +11656,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -11927,6 +11933,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -11934,6 +11941,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -12433,6 +12441,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -12440,24 +12449,41 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|----------------------|---------|----------|--------------|-------------|
|
||||
| `cron` | string | false | | |
|
||||
| `display_name` | string | false | | |
|
||||
| `id` | 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 | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|----------------------|----------------------------------------------------------------------------|----------|--------------|-------------|
|
||||
| `cron` | string | false | | |
|
||||
| `display_name` | string | false | | |
|
||||
| `exit_code` | integer | false | | |
|
||||
| `id` | 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 | | |
|
||||
| `status` | [codersdk.WorkspaceAgentScriptStatus](#codersdkworkspaceagentscriptstatus) | false | | |
|
||||
| `timeout` | integer | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentScriptStatus
|
||||
|
||||
```json
|
||||
"ok"
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Value(s) |
|
||||
|------------------------------------------------------|
|
||||
| `exit_failure`, `ok`, `pipes_left_open`, `timed_out` |
|
||||
|
||||
## codersdk.WorkspaceAgentStartupScriptBehavior
|
||||
|
||||
@@ -12803,6 +12829,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -12810,6 +12837,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -13271,6 +13299,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -13278,6 +13307,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -13619,6 +13649,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -13626,6 +13657,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
|
||||
Generated
+4
@@ -547,6 +547,7 @@ curl -X POST http://coder-server:8080/api/v2/tasks/{user}/{task}/pause \
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -554,6 +555,7 @@ curl -X POST http://coder-server:8080/api/v2/tasks/{user}/{task}/pause \
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -791,6 +793,7 @@ curl -X POST http://coder-server:8080/api/v2/tasks/{user}/{task}/resume \
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -798,6 +801,7 @@ curl -X POST http://coder-server:8080/api/v2/tasks/{user}/{task}/resume \
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
|
||||
Generated
+10
-2
@@ -2494,6 +2494,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -2501,6 +2502,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -2620,6 +2622,7 @@ Status Code **200**
|
||||
| `»» scripts` | array | false | | |
|
||||
| `»»» cron` | string | false | | |
|
||||
| `»»» display_name` | string | false | | |
|
||||
| `»»» exit_code` | integer | false | | |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» log_path` | string | false | | |
|
||||
| `»»» log_source_id` | string(uuid) | false | | |
|
||||
@@ -2627,6 +2630,7 @@ Status Code **200**
|
||||
| `»»» run_on_stop` | boolean | false | | |
|
||||
| `»»» script` | string | false | | |
|
||||
| `»»» start_blocks_login` | boolean | false | | |
|
||||
| `»»» status` | [codersdk.WorkspaceAgentScriptStatus](schemas.md#codersdkworkspaceagentscriptstatus) | 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! |
|
||||
@@ -2658,8 +2662,8 @@ Status Code **200**
|
||||
| `sharing_level` | `authenticated`, `organization`, `owner`, `public` |
|
||||
| `state` | `complete`, `failure`, `idle`, `working` |
|
||||
| `lifecycle_state` | `created`, `off`, `ready`, `shutdown_error`, `shutdown_timeout`, `shutting_down`, `start_error`, `start_timeout`, `starting` |
|
||||
| `status` | `connected`, `connecting`, `disconnected`, `exit_failure`, `ok`, `pipes_left_open`, `timed_out`, `timeout` |
|
||||
| `startup_script_behavior` | `blocking`, `non-blocking` |
|
||||
| `status` | `connected`, `connecting`, `disconnected`, `timeout` |
|
||||
| `workspace_transition` | `delete`, `start`, `stop` |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
@@ -3160,6 +3164,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -3167,6 +3172,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -3286,6 +3292,7 @@ Status Code **200**
|
||||
| `»» scripts` | array | false | | |
|
||||
| `»»» cron` | string | false | | |
|
||||
| `»»» display_name` | string | false | | |
|
||||
| `»»» exit_code` | integer | false | | |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» log_path` | string | false | | |
|
||||
| `»»» log_source_id` | string(uuid) | false | | |
|
||||
@@ -3293,6 +3300,7 @@ Status Code **200**
|
||||
| `»»» run_on_stop` | boolean | false | | |
|
||||
| `»»» script` | string | false | | |
|
||||
| `»»» start_blocks_login` | boolean | false | | |
|
||||
| `»»» status` | [codersdk.WorkspaceAgentScriptStatus](schemas.md#codersdkworkspaceagentscriptstatus) | 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! |
|
||||
@@ -3324,8 +3332,8 @@ Status Code **200**
|
||||
| `sharing_level` | `authenticated`, `organization`, `owner`, `public` |
|
||||
| `state` | `complete`, `failure`, `idle`, `working` |
|
||||
| `lifecycle_state` | `created`, `off`, `ready`, `shutdown_error`, `shutdown_timeout`, `shutting_down`, `start_error`, `start_timeout`, `starting` |
|
||||
| `status` | `connected`, `connecting`, `disconnected`, `exit_failure`, `ok`, `pipes_left_open`, `timed_out`, `timeout` |
|
||||
| `startup_script_behavior` | `blocking`, `non-blocking` |
|
||||
| `status` | `connected`, `connecting`, `disconnected`, `timeout` |
|
||||
| `workspace_transition` | `delete`, `start`, `stop` |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
Generated
+12
@@ -237,6 +237,7 @@ of the template will be used.
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -244,6 +245,7 @@ of the template will be used.
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -601,6 +603,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -608,6 +611,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -932,6 +936,7 @@ of the template will be used.
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -939,6 +944,7 @@ of the template will be used.
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -1224,6 +1230,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -1231,6 +1238,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -1531,6 +1539,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -1538,6 +1547,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
@@ -2098,6 +2108,7 @@ curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/dormant \
|
||||
{
|
||||
"cron": "string",
|
||||
"display_name": "string",
|
||||
"exit_code": 0,
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"log_path": "string",
|
||||
"log_source_id": "4197ab25-95cf-4b91-9c78-f7f2af5d353a",
|
||||
@@ -2105,6 +2116,7 @@ curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/dormant \
|
||||
"run_on_stop": true,
|
||||
"script": "string",
|
||||
"start_blocks_login": true,
|
||||
"status": "ok",
|
||||
"timeout": 0
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user