mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: correct template API docs (#19228)
This commit is contained in:
Generated
+45
-5
@@ -955,7 +955,7 @@ Status Code **200**
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Get template metadata by ID
|
||||
## Get template settings by ID
|
||||
|
||||
### Code samples
|
||||
|
||||
@@ -1086,24 +1086,64 @@ curl -X DELETE http://coder-server:8080/api/v2/templates/{template} \
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Update template metadata by ID
|
||||
## Update template settings by ID
|
||||
|
||||
### Code samples
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X PATCH http://coder-server:8080/api/v2/templates/{template} \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`PATCH /templates/{template}`
|
||||
|
||||
> Body parameter
|
||||
|
||||
```json
|
||||
{
|
||||
"activity_bump_ms": 0,
|
||||
"allow_user_autostart": true,
|
||||
"allow_user_autostop": true,
|
||||
"allow_user_cancel_workspace_jobs": true,
|
||||
"autostart_requirement": {
|
||||
"days_of_week": [
|
||||
"monday"
|
||||
]
|
||||
},
|
||||
"autostop_requirement": {
|
||||
"days_of_week": [
|
||||
"monday"
|
||||
],
|
||||
"weeks": 0
|
||||
},
|
||||
"cors_behavior": "simple",
|
||||
"default_ttl_ms": 0,
|
||||
"deprecation_message": "string",
|
||||
"description": "string",
|
||||
"disable_everyone_group_access": true,
|
||||
"display_name": "string",
|
||||
"failure_ttl_ms": 0,
|
||||
"icon": "string",
|
||||
"max_port_share_level": "owner",
|
||||
"name": "string",
|
||||
"require_active_version": true,
|
||||
"time_til_dormant_autodelete_ms": 0,
|
||||
"time_til_dormant_ms": 0,
|
||||
"update_workspace_dormant_at": true,
|
||||
"update_workspace_last_used_at": true,
|
||||
"use_classic_parameter_flow": true
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
|------------|------|--------------|----------|-------------|
|
||||
| `template` | path | string(uuid) | true | Template ID |
|
||||
| Name | In | Type | Required | Description |
|
||||
|------------|------|----------------------------------------------------------------------|----------|---------------------------------|
|
||||
| `template` | path | string(uuid) | true | Template ID |
|
||||
| `body` | body | [codersdk.UpdateTemplateMeta](schemas.md#codersdkupdatetemplatemeta) | true | Patch template settings request |
|
||||
|
||||
### Example responses
|
||||
|
||||
|
||||
Reference in New Issue
Block a user