mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: rename startup logs to agent logs (#8649)
* chore: rename startup logs to agent logs This also adds a `source` property to every agent log. It should allow us to group logs and display them nicer in the UI as they stream in. * Fix migration order * Fix naming * Rename the frontend * Fix tests * Fix down migration * Match enums for workspace agent logs * Fix inserting log source * Fix migration order * Fix logs tests * Fix psql insert
This commit is contained in:
Generated
+141
-12
@@ -293,6 +293,66 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/gitsshkey \
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Patch workspace agent logs
|
||||
|
||||
### Code samples
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X PATCH http://coder-server:8080/api/v2/workspaceagents/me/logs \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`PATCH /workspaceagents/me/logs`
|
||||
|
||||
> Body parameter
|
||||
|
||||
```json
|
||||
{
|
||||
"logs": [
|
||||
{
|
||||
"created_at": "string",
|
||||
"level": "trace",
|
||||
"output": "string",
|
||||
"source": "startup_script"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| ------ | ---- | -------------------------------------------------- | -------- | ----------- |
|
||||
| `body` | body | [agentsdk.PatchLogs](schemas.md#agentsdkpatchlogs) | true | logs |
|
||||
|
||||
### Example responses
|
||||
|
||||
> 200 Response
|
||||
|
||||
```json
|
||||
{
|
||||
"detail": "string",
|
||||
"message": "string",
|
||||
"validations": [
|
||||
{
|
||||
"detail": "string",
|
||||
"field": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------ |
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Response](schemas.md#codersdkresponse) |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Get authorized workspace agent manifest
|
||||
|
||||
### Code samples
|
||||
@@ -488,7 +548,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaceagents/me/report-stats \
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Patch workspace agent startup logs
|
||||
## Removed: Patch workspace agent logs
|
||||
|
||||
### Code samples
|
||||
|
||||
@@ -510,7 +570,8 @@ curl -X PATCH http://coder-server:8080/api/v2/workspaceagents/me/startup-logs \
|
||||
{
|
||||
"created_at": "string",
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
"output": "string",
|
||||
"source": "startup_script"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -518,9 +579,9 @@ curl -X PATCH http://coder-server:8080/api/v2/workspaceagents/me/startup-logs \
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| ------ | ---- | ---------------------------------------------------------------- | -------- | ------------ |
|
||||
| `body` | body | [agentsdk.PatchStartupLogs](schemas.md#agentsdkpatchstartuplogs) | true | Startup logs |
|
||||
| Name | In | Type | Required | Description |
|
||||
| ------ | ---- | -------------------------------------------------- | -------- | ----------- |
|
||||
| `body` | body | [agentsdk.PatchLogs](schemas.md#agentsdkpatchlogs) | true | logs |
|
||||
|
||||
### Example responses
|
||||
|
||||
@@ -621,6 +682,8 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -628,8 +691,6 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -806,6 +867,74 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/lis
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Get logs by workspace agent
|
||||
|
||||
### Code samples
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/logs \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`GET /workspaceagents/{workspaceagent}/logs`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| ---------------- | ----- | ------------ | -------- | -------------------------------------------- |
|
||||
| `workspaceagent` | path | string(uuid) | true | Workspace agent ID |
|
||||
| `before` | query | integer | false | Before log id |
|
||||
| `after` | query | integer | false | After log id |
|
||||
| `follow` | query | boolean | false | Follow log stream |
|
||||
| `no_compression` | query | boolean | false | Disable compression for WebSocket connection |
|
||||
|
||||
### Example responses
|
||||
|
||||
> 200 Response
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"id": 0,
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | ------------------------------------------------------- | ----------- | --------------------------------------------------------------------------- |
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.WorkspaceAgentLog](schemas.md#codersdkworkspaceagentlog) |
|
||||
|
||||
<h3 id="get-logs-by-workspace-agent-responseschema">Response Schema</h3>
|
||||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------- | ------------------------------------------------ | -------- | ------------ | ----------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» id` | integer | false | | |
|
||||
| `» level` | [codersdk.LogLevel](schemas.md#codersdkloglevel) | false | | |
|
||||
| `» output` | string | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Property | Value |
|
||||
| -------- | ------- |
|
||||
| `level` | `trace` |
|
||||
| `level` | `debug` |
|
||||
| `level` | `info` |
|
||||
| `level` | `warn` |
|
||||
| `level` | `error` |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Open PTY to workspace agent
|
||||
|
||||
### Code samples
|
||||
@@ -832,7 +961,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/pty
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Get startup logs by workspace agent
|
||||
## Removed: Get logs by workspace agent
|
||||
|
||||
### Code samples
|
||||
|
||||
@@ -872,11 +1001,11 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/sta
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | ------------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------- |
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.WorkspaceAgentStartupLog](schemas.md#codersdkworkspaceagentstartuplog) |
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | ------------------------------------------------------- | ----------- | --------------------------------------------------------------------------- |
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.WorkspaceAgentLog](schemas.md#codersdkworkspaceagentlog) |
|
||||
|
||||
<h3 id="get-startup-logs-by-workspace-agent-responseschema">Response Schema</h3>
|
||||
<h3 id="removed:-get-logs-by-workspace-agent-responseschema">Response Schema</h3>
|
||||
|
||||
Status Code **200**
|
||||
|
||||
|
||||
Generated
+16
-16
@@ -107,6 +107,8 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -114,8 +116,6 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -269,6 +269,8 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -276,8 +278,6 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -570,6 +570,8 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -577,8 +579,6 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -659,6 +659,8 @@ Status Code **200**
|
||||
| `»»»» 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 | | |
|
||||
@@ -666,8 +668,6 @@ Status Code **200**
|
||||
| `»» shutdown_script` | string | false | | |
|
||||
| `»» shutdown_script_timeout_seconds` | integer | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» startup_logs_length` | integer | false | | |
|
||||
| `»» startup_logs_overflowed` | boolean | 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. |
|
||||
@@ -828,6 +828,8 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -835,8 +837,6 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -995,6 +995,8 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -1002,8 +1004,6 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -1120,6 +1120,8 @@ Status Code **200**
|
||||
| `»»»»» 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 | | |
|
||||
@@ -1127,8 +1129,6 @@ Status Code **200**
|
||||
| `»»» shutdown_script` | string | false | | |
|
||||
| `»»» shutdown_script_timeout_seconds` | integer | false | | |
|
||||
| `»»» started_at` | string(date-time) | false | | |
|
||||
| `»»» startup_logs_length` | integer | false | | |
|
||||
| `»»» startup_logs_overflowed` | boolean | 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. |
|
||||
@@ -1343,6 +1343,8 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -1350,8 +1352,6 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
|
||||
Generated
+77
-55
@@ -157,6 +157,26 @@
|
||||
| ---------------- | ------ | -------- | ------------ | ----------- |
|
||||
| `json_web_token` | string | true | | |
|
||||
|
||||
## agentsdk.Log
|
||||
|
||||
```json
|
||||
{
|
||||
"created_at": "string",
|
||||
"level": "trace",
|
||||
"output": "string",
|
||||
"source": "startup_script"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------ | -------------------------------------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `created_at` | string | false | | |
|
||||
| `level` | [codersdk.LogLevel](#codersdkloglevel) | false | | |
|
||||
| `output` | string | false | | |
|
||||
| `source` | [codersdk.WorkspaceAgentLogSource](#codersdkworkspaceagentlogsource) | false | | |
|
||||
|
||||
## agentsdk.Manifest
|
||||
|
||||
```json
|
||||
@@ -277,7 +297,7 @@
|
||||
| `startup_script_timeout` | integer | false | | |
|
||||
| `vscode_port_proxy_uri` | string | false | | |
|
||||
|
||||
## agentsdk.PatchStartupLogs
|
||||
## agentsdk.PatchLogs
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -285,7 +305,8 @@
|
||||
{
|
||||
"created_at": "string",
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
"output": "string",
|
||||
"source": "startup_script"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -293,9 +314,9 @@
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------ | --------------------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `logs` | array of [agentsdk.StartupLog](#agentsdkstartuplog) | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------ | ------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `logs` | array of [agentsdk.Log](#agentsdklog) | false | | |
|
||||
|
||||
## agentsdk.PostAppHealthsRequest
|
||||
|
||||
@@ -369,24 +390,6 @@
|
||||
| `subsystem` | [codersdk.AgentSubsystem](#codersdkagentsubsystem) | false | | |
|
||||
| `version` | string | false | | |
|
||||
|
||||
## agentsdk.StartupLog
|
||||
|
||||
```json
|
||||
{
|
||||
"created_at": "string",
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------ | -------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `created_at` | string | false | | |
|
||||
| `level` | [codersdk.LogLevel](#codersdkloglevel) | false | | |
|
||||
| `output` | string | false | | |
|
||||
|
||||
## agentsdk.Stats
|
||||
|
||||
```json
|
||||
@@ -5240,6 +5243,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -5247,8 +5252,6 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -5381,6 +5384,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -5388,8 +5393,6 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -5423,6 +5426,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
| » `[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 | | |
|
||||
@@ -5430,8 +5435,6 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
| `shutdown_script` | string | false | | |
|
||||
| `shutdown_script_timeout_seconds` | integer | false | | |
|
||||
| `started_at` | string | false | | |
|
||||
| `startup_logs_length` | integer | false | | |
|
||||
| `startup_logs_overflowed` | boolean | 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. |
|
||||
@@ -5583,6 +5586,45 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
| ------- | ------------------------------------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ports` | array of [codersdk.WorkspaceAgentListeningPort](#codersdkworkspaceagentlisteningport) | false | | If there are no ports in the list, nothing should be displayed in the UI. There must not be a "no ports available" message or anything similar, as there will always be no ports displayed on platforms where our port detection logic is unsupported. |
|
||||
|
||||
## codersdk.WorkspaceAgentLog
|
||||
|
||||
```json
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"id": 0,
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------ | -------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `created_at` | string | false | | |
|
||||
| `id` | integer | false | | |
|
||||
| `level` | [codersdk.LogLevel](#codersdkloglevel) | false | | |
|
||||
| `output` | string | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentLogSource
|
||||
|
||||
```json
|
||||
"startup_script"
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Value |
|
||||
| ----------------- |
|
||||
| `startup_script` |
|
||||
| `shutdown_script` |
|
||||
| `kubernetes` |
|
||||
| `envbox` |
|
||||
| `envbuilder` |
|
||||
| `external` |
|
||||
|
||||
## codersdk.WorkspaceAgentMetadataDescription
|
||||
|
||||
```json
|
||||
@@ -5605,26 +5647,6 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
| `script` | string | false | | |
|
||||
| `timeout` | integer | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentStartupLog
|
||||
|
||||
```json
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"id": 0,
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------ | -------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `created_at` | string | false | | |
|
||||
| `id` | integer | false | | |
|
||||
| `level` | [codersdk.LogLevel](#codersdkloglevel) | false | | |
|
||||
| `output` | string | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentStartupScriptBehavior
|
||||
|
||||
```json
|
||||
@@ -5820,6 +5842,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -5827,8 +5851,6 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -6129,6 +6151,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -6136,8 +6160,6 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -6341,6 +6363,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -6348,8 +6372,6 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
|
||||
Generated
+8
-8
@@ -1620,6 +1620,8 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -1627,8 +1629,6 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -1709,6 +1709,8 @@ Status Code **200**
|
||||
| `»»»» 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 | | |
|
||||
@@ -1716,8 +1718,6 @@ Status Code **200**
|
||||
| `»» shutdown_script` | string | false | | |
|
||||
| `»» shutdown_script_timeout_seconds` | integer | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» startup_logs_length` | integer | false | | |
|
||||
| `»» startup_logs_overflowed` | boolean | 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. |
|
||||
@@ -2012,6 +2012,8 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -2019,8 +2021,6 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -2101,6 +2101,8 @@ Status Code **200**
|
||||
| `»»»» 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 | | |
|
||||
@@ -2108,8 +2110,6 @@ Status Code **200**
|
||||
| `»» shutdown_script` | string | false | | |
|
||||
| `»» shutdown_script_timeout_seconds` | integer | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» startup_logs_length` | integer | false | | |
|
||||
| `»» startup_logs_overflowed` | boolean | 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. |
|
||||
|
||||
Generated
+8
-8
@@ -135,6 +135,8 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -142,8 +144,6 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -323,6 +323,8 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -330,8 +332,6 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -510,6 +510,8 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -517,8 +519,6 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
@@ -699,6 +699,8 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \
|
||||
},
|
||||
"lifecycle_state": "created",
|
||||
"login_before_ready": true,
|
||||
"logs_length": 0,
|
||||
"logs_overflowed": true,
|
||||
"name": "string",
|
||||
"operating_system": "string",
|
||||
"ready_at": "2019-08-24T14:15:22Z",
|
||||
@@ -706,8 +708,6 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \
|
||||
"shutdown_script": "string",
|
||||
"shutdown_script_timeout_seconds": 0,
|
||||
"started_at": "2019-08-24T14:15:22Z",
|
||||
"startup_logs_length": 0,
|
||||
"startup_logs_overflowed": true,
|
||||
"startup_script": "string",
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout_seconds": 0,
|
||||
|
||||
Reference in New Issue
Block a user