Skip to content

Commit 7bbe10a

Browse files
committed
Generate docs
1 parent 7e5196a commit 7bbe10a

File tree

7 files changed

+233
-6
lines changed

7 files changed

+233
-6
lines changed

coderd/apidoc/docs.go

Lines changed: 68 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/agents.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,41 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/metadata \
382382

383383
To perform this operation, you must be authenticated. [Learn more](authentication.md).
384384

385+
## Submit workspace agent state
386+
387+
### Code samples
388+
389+
```shell
390+
# Example request using curl
391+
curl -X POST http://coder-server:8080/api/v2/workspaceagents/me/report-state \
392+
-H 'Content-Type: application/json' \
393+
-H 'Coder-Session-Token: API_KEY'
394+
```
395+
396+
`POST /workspaceagents/me/report-state`
397+
398+
> Body parameter
399+
400+
```json
401+
{
402+
"state": "starting"
403+
}
404+
```
405+
406+
### Parameters
407+
408+
| Name | In | Type | Required | Description |
409+
| ------ | ---- | -------------------------------------------------------------------------------------------- | -------- | ----------------------------- |
410+
| `body` | body | [codersdk.PostWorkspaceAgentStateRequest](schemas.md#codersdkpostworkspaceagentstaterequest) | true | Workspace agent state request |
411+
412+
### Responses
413+
414+
| Status | Meaning | Description | Schema |
415+
| ------ | --------------------------------------------------------------- | ----------- | ------ |
416+
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | Success | |
417+
418+
To perform this operation, you must be authenticated. [Learn more](authentication.md).
419+
385420
## Submit workspace agent stats
386421

387422
### Code samples
@@ -507,6 +542,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
507542
"operating_system": "string",
508543
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
509544
"startup_script": "string",
545+
"state": "starting",
510546
"status": "connecting",
511547
"troubleshooting_url": "string",
512548
"updated_at": "2019-08-24T14:15:22Z",

docs/api/builds.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
100100
"operating_system": "string",
101101
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
102102
"startup_script": "string",
103+
"state": "starting",
103104
"status": "connecting",
104105
"troubleshooting_url": "string",
105106
"updated_at": "2019-08-24T14:15:22Z",
@@ -242,6 +243,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
242243
"operating_system": "string",
243244
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
244245
"startup_script": "string",
246+
"state": "starting",
245247
"status": "connecting",
246248
"troubleshooting_url": "string",
247249
"updated_at": "2019-08-24T14:15:22Z",
@@ -527,6 +529,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
527529
"operating_system": "string",
528530
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
529531
"startup_script": "string",
532+
"state": "starting",
530533
"status": "connecting",
531534
"troubleshooting_url": "string",
532535
"updated_at": "2019-08-24T14:15:22Z",
@@ -601,6 +604,7 @@ Status Code **200**
601604
| `»» operating_system` | string | false | | |
602605
| `»» resource_id` | string(uuid) | false | | |
603606
| `»» startup_script` | string | false | | |
607+
| `»» state` | [codersdk.WorkspaceAgentState](schemas.md#codersdkworkspaceagentstate) | false | | |
604608
| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
605609
| `»» troubleshooting_url` | string | false | | |
606610
| `»» updated_at` | string(date-time) | false | | |
@@ -630,6 +634,9 @@ Status Code **200**
630634
| `sharing_level` | `owner` |
631635
| `sharing_level` | `authenticated` |
632636
| `sharing_level` | `public` |
637+
| `state` | `starting` |
638+
| `state` | `start_timeout` |
639+
| `state` | `ready` |
633640
| `status` | `connecting` |
634641
| `status` | `connected` |
635642
| `status` | `disconnected` |
@@ -738,6 +745,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
738745
"operating_system": "string",
739746
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
740747
"startup_script": "string",
748+
"state": "starting",
741749
"status": "connecting",
742750
"troubleshooting_url": "string",
743751
"updated_at": "2019-08-24T14:15:22Z",
@@ -885,6 +893,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
885893
"operating_system": "string",
886894
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
887895
"startup_script": "string",
896+
"state": "starting",
888897
"status": "connecting",
889898
"troubleshooting_url": "string",
890899
"updated_at": "2019-08-24T14:15:22Z",
@@ -991,6 +1000,7 @@ Status Code **200**
9911000
| `»»» operating_system` | string | false | | |
9921001
| `»»» resource_id` | string(uuid) | false | | |
9931002
| `»»» startup_script` | string | false | | |
1003+
| `»»» state` | [codersdk.WorkspaceAgentState](schemas.md#codersdkworkspaceagentstate) | false | | |
9941004
| `»»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
9951005
| `»»» troubleshooting_url` | string | false | | |
9961006
| `»»» updated_at` | string(date-time) | false | | |
@@ -1038,6 +1048,9 @@ Status Code **200**
10381048
| `sharing_level` | `owner` |
10391049
| `sharing_level` | `authenticated` |
10401050
| `sharing_level` | `public` |
1051+
| `state` | `starting` |
1052+
| `state` | `start_timeout` |
1053+
| `state` | `ready` |
10411054
| `status` | `connecting` |
10421055
| `status` | `connected` |
10431056
| `status` | `disconnected` |
@@ -1188,6 +1201,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
11881201
"operating_system": "string",
11891202
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
11901203
"startup_script": "string",
1204+
"state": "starting",
11911205
"status": "connecting",
11921206
"troubleshooting_url": "string",
11931207
"updated_at": "2019-08-24T14:15:22Z",

0 commit comments

Comments
 (0)