feat: add workspace agent APIVersion (#10419)

Fixes #10339
This commit is contained in:
Spike Curtis
2023-10-31 10:08:43 +04:00
committed by GitHub
parent 90573a6e99
commit a7c671ca07
16 changed files with 47 additions and 3 deletions
+1
View File
@@ -699,6 +699,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
```json
{
"api_version": "string",
"apps": [
{
"command": "string",
+8
View File
@@ -58,6 +58,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -238,6 +239,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -557,6 +559,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -677,6 +680,7 @@ Status Code **200**
| ------------------------------- | ------------------------------------------------------------------------------------------------------ | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `[array item]` | array | false | | |
| `» agents` | array | false | | |
| `»» api_version` | string | false | | |
| `»» apps` | array | false | | |
| `»»» command` | string | false | | |
| `»»» display_name` | string | false | | Display name is a friendly name for the app. |
@@ -844,6 +848,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -1029,6 +1034,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -1185,6 +1191,7 @@ Status Code **200**
| `» reason` | [codersdk.BuildReason](schemas.md#codersdkbuildreason) | false | | |
| `» resources` | array | false | | |
| `»» agents` | array | false | | |
| `»»» api_version` | string | false | | |
| `»»» apps` | array | false | | |
| `»»»» command` | string | false | | |
| `»»»» display_name` | string | false | | Display name is a friendly name for the app. |
@@ -1405,6 +1412,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
+6
View File
@@ -5642,6 +5642,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -5812,6 +5813,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
```json
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -5903,6 +5905,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
| Name | Type | Required | Restrictions | Description |
| ---------------------------- | -------------------------------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `api_version` | string | false | | |
| `apps` | array of [codersdk.WorkspaceApp](#codersdkworkspaceapp) | false | | |
| `architecture` | string | false | | |
| `connection_timeout_seconds` | integer | false | | |
@@ -6331,6 +6334,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -6660,6 +6664,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -6896,6 +6901,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
+4
View File
@@ -1704,6 +1704,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -1824,6 +1825,7 @@ Status Code **200**
| ------------------------------- | ------------------------------------------------------------------------------------------------------ | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `[array item]` | array | false | | |
| `» agents` | array | false | | |
| `»» api_version` | string | false | | |
| `»» apps` | array | false | | |
| `»»» command` | string | false | | |
| `»»» display_name` | string | false | | Display name is a friendly name for the app. |
@@ -2120,6 +2122,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -2240,6 +2243,7 @@ Status Code **200**
| ------------------------------- | ------------------------------------------------------------------------------------------------------ | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `[array item]` | array | false | | |
| `» agents` | array | false | | |
| `»» api_version` | string | false | | |
| `»» apps` | array | false | | |
| `»»» command` | string | false | | |
| `»»» display_name` | string | false | | Display name is a friendly name for the app. |
+5
View File
@@ -90,6 +90,7 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -299,6 +300,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -511,6 +513,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -717,6 +720,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",
@@ -1042,6 +1046,7 @@ curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/dormant \
{
"agents": [
{
"api_version": "string",
"apps": [
{
"command": "string",