chore: accept payload on workspace usage route (#13544)

This commit is contained in:
Garrett Delfosse
2024-06-14 10:08:45 -04:00
committed by GitHub
parent 87820a29d7
commit 44d69139d5
9 changed files with 452 additions and 15 deletions

17
docs/api/workspaces.md generated
View File

@ -1397,16 +1397,27 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio
```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/usage \
-H 'Content-Type: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`POST /workspaces/{workspace}/usage`
> Body parameter
```json
{
"agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
"app_name": "vscode"
}
```
### Parameters
| Name | In | Type | Required | Description |
| ----------- | ---- | ------------ | -------- | ------------ |
| `workspace` | path | string(uuid) | true | Workspace ID |
| Name | In | Type | Required | Description |
| ----------- | ---- | ---------------------------------------------------------------------------------- | -------- | ---------------------------- |
| `workspace` | path | string(uuid) | true | Workspace ID |
| `body` | body | [codersdk.PostWorkspaceUsageRequest](schemas.md#codersdkpostworkspaceusagerequest) | false | Post workspace usage request |
### Responses