mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add prebuild invalidation via last_invalidated_at timestamp (#20582)
Updates #17917
This commit is contained in:
Generated
+43
@@ -3788,6 +3788,49 @@ Status Code **200**
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Invalidate presets for template
|
||||
|
||||
### Code samples
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X POST http://coder-server:8080/api/v2/templates/{template}/prebuilds/invalidate \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`POST /templates/{template}/prebuilds/invalidate`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
|------------|------|--------------|----------|-------------|
|
||||
| `template` | path | string(uuid) | true | Template ID |
|
||||
|
||||
### Example responses
|
||||
|
||||
> 200 Response
|
||||
|
||||
```json
|
||||
{
|
||||
"invalidated": [
|
||||
{
|
||||
"preset_name": "string",
|
||||
"template_name": "string",
|
||||
"template_version_name": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
|--------|---------------------------------------------------------|-------------|------------------------------------------------------------------------------------|
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.InvalidatePresetsResponse](schemas.md#codersdkinvalidatepresetsresponse) |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Get user quiet hours schedule
|
||||
|
||||
### Code samples
|
||||
|
||||
Generated
+38
@@ -4715,6 +4715,44 @@ Only certain features set these fields: - FeatureManagedAgentLimit|
|
||||
| `day` |
|
||||
| `week` |
|
||||
|
||||
## codersdk.InvalidatePresetsResponse
|
||||
|
||||
```json
|
||||
{
|
||||
"invalidated": [
|
||||
{
|
||||
"preset_name": "string",
|
||||
"template_name": "string",
|
||||
"template_version_name": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|---------------|-------------------------------------------------------------------|----------|--------------|-------------|
|
||||
| `invalidated` | array of [codersdk.InvalidatedPreset](#codersdkinvalidatedpreset) | false | | |
|
||||
|
||||
## codersdk.InvalidatedPreset
|
||||
|
||||
```json
|
||||
{
|
||||
"preset_name": "string",
|
||||
"template_name": "string",
|
||||
"template_version_name": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|-------------------------|--------|----------|--------------|-------------|
|
||||
| `preset_name` | string | false | | |
|
||||
| `template_name` | string | false | | |
|
||||
| `template_version_name` | string | false | | |
|
||||
|
||||
## codersdk.IssueReconnectingPTYSignedTokenRequest
|
||||
|
||||
```json
|
||||
|
||||
Reference in New Issue
Block a user