feat: add dynamic parameters websocket endpoint (#17165)

This commit is contained in:
ケイラ
2025-04-10 13:08:50 -07:00
committed by GitHub
parent c9682cb6cf
commit 859dd2fc3f
19 changed files with 2291 additions and 347 deletions

View File

@ -1334,52 +1334,12 @@ This is required on creation to enable a user-flow of validating a template work
## codersdk.CreateTestAuditLogRequest
```json
{
"action": "create",
"additional_fields": [
0
],
"build_reason": "autostart",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
"resource_type": "template",
"time": "2019-08-24T14:15:22Z"
}
{}
```
### Properties
| Name | Type | Required | Restrictions | Description |
|---------------------|------------------------------------------------|----------|--------------|-------------|
| `action` | [codersdk.AuditAction](#codersdkauditaction) | false | | |
| `additional_fields` | array of integer | false | | |
| `build_reason` | [codersdk.BuildReason](#codersdkbuildreason) | false | | |
| `organization_id` | string | false | | |
| `request_id` | string | false | | |
| `resource_id` | string | false | | |
| `resource_type` | [codersdk.ResourceType](#codersdkresourcetype) | false | | |
| `time` | string | false | | |
#### Enumerated Values
| Property | Value |
|-----------------|--------------------|
| `action` | `create` |
| `action` | `write` |
| `action` | `delete` |
| `action` | `start` |
| `action` | `stop` |
| `build_reason` | `autostart` |
| `build_reason` | `autostop` |
| `build_reason` | `initiator` |
| `resource_type` | `template` |
| `resource_type` | `template_version` |
| `resource_type` | `user` |
| `resource_type` | `workspace` |
| `resource_type` | `workspace_build` |
| `resource_type` | `git_ssh_key` |
| `resource_type` | `auditable_group` |
None
## codersdk.CreateTokenRequest

View File

@ -2541,6 +2541,32 @@ Status Code **200**
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Open dynamic parameters WebSocket by template version
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/dynamic-parameters \
-H 'Coder-Session-Token: API_KEY'
```
`GET /templateversions/{templateversion}/dynamic-parameters`
### Parameters
| Name | In | Type | Required | Description |
|-------------------|------|--------------|----------|---------------------|
| `templateversion` | path | string(uuid) | true | Template version ID |
### Responses
| Status | Meaning | Description | Schema |
|--------|--------------------------------------------------------------------------|---------------------|--------|
| 101 | [Switching Protocols](https://tools.ietf.org/html/rfc7231#section-6.2.2) | Switching Protocols | |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get external auth by template version
### Code samples