mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: accept payload on workspace usage route (#13544)
This commit is contained in:
Generated
+34
@@ -2362,6 +2362,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
| `auto-fill-parameters` |
|
||||
| `multi-organization` |
|
||||
| `custom-roles` |
|
||||
| `workspace-usage` |
|
||||
|
||||
## codersdk.ExternalAuth
|
||||
|
||||
@@ -3393,6 +3394,22 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
| `icon` | string | false | | |
|
||||
| `name` | string | true | | |
|
||||
|
||||
## codersdk.PostWorkspaceUsageRequest
|
||||
|
||||
```json
|
||||
{
|
||||
"agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
|
||||
"app_name": "vscode"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------- | ---------------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `agent_id` | string | false | | |
|
||||
| `app_name` | [codersdk.UsageAppName](#codersdkusageappname) | false | | |
|
||||
|
||||
## codersdk.PprofConfig
|
||||
|
||||
```json
|
||||
@@ -5263,6 +5280,23 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
| `share_level` | `authenticated` |
|
||||
| `share_level` | `public` |
|
||||
|
||||
## codersdk.UsageAppName
|
||||
|
||||
```json
|
||||
"vscode"
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Value |
|
||||
| ------------------ |
|
||||
| `vscode` |
|
||||
| `jetbrains` |
|
||||
| `reconnecting-pty` |
|
||||
| `ssh` |
|
||||
|
||||
## codersdk.User
|
||||
|
||||
```json
|
||||
|
||||
Generated
+14
-3
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user