mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
docs: Add missing body parameter (#6132)
This commit is contained in:
@@ -1147,6 +1147,43 @@ CreateParameterRequest is a structure used to create a new parameter value for a
|
||||
| `transition` | `stop` |
|
||||
| `transition` | `delete` |
|
||||
|
||||
## codersdk.CreateWorkspaceRequest
|
||||
|
||||
```json
|
||||
{
|
||||
"autostart_schedule": "string",
|
||||
"name": "string",
|
||||
"parameter_values": [
|
||||
{
|
||||
"copy_from_parameter": "000e07d6-021d-446c-be14-48a9c20bca0b",
|
||||
"destination_scheme": "none",
|
||||
"name": "string",
|
||||
"source_scheme": "none",
|
||||
"source_value": "string"
|
||||
}
|
||||
],
|
||||
"rich_parameter_values": [
|
||||
{
|
||||
"name": "string",
|
||||
"value": "string"
|
||||
}
|
||||
],
|
||||
"template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
|
||||
"ttl_ms": 0
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ----------------------- | ----------------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------- |
|
||||
| `autostart_schedule` | string | false | | |
|
||||
| `name` | string | true | | |
|
||||
| `parameter_values` | array of [codersdk.CreateParameterRequest](#codersdkcreateparameterrequest) | false | | Parameter values allows for additional parameters to be provided during the initial provision. |
|
||||
| `rich_parameter_values` | array of [codersdk.WorkspaceBuildParameter](#codersdkworkspacebuildparameter) | false | | |
|
||||
| `template_id` | string | true | | |
|
||||
| `ttl_ms` | integer | false | | |
|
||||
|
||||
## codersdk.DAUEntry
|
||||
|
||||
```json
|
||||
|
||||
+32
-4
@@ -7,18 +7,46 @@
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/members/{user}/workspaces \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`POST /organizations/{organization}/members/{user}/workspaces`
|
||||
|
||||
> Body parameter
|
||||
|
||||
```json
|
||||
{
|
||||
"autostart_schedule": "string",
|
||||
"name": "string",
|
||||
"parameter_values": [
|
||||
{
|
||||
"copy_from_parameter": "000e07d6-021d-446c-be14-48a9c20bca0b",
|
||||
"destination_scheme": "none",
|
||||
"name": "string",
|
||||
"source_scheme": "none",
|
||||
"source_value": "string"
|
||||
}
|
||||
],
|
||||
"rich_parameter_values": [
|
||||
{
|
||||
"name": "string",
|
||||
"value": "string"
|
||||
}
|
||||
],
|
||||
"template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
|
||||
"ttl_ms": 0
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| -------------- | ---- | ------------ | -------- | --------------------- |
|
||||
| `organization` | path | string(uuid) | true | Organization ID |
|
||||
| `user` | path | string | true | Username, UUID, or me |
|
||||
| Name | In | Type | Required | Description |
|
||||
| -------------- | ---- | ---------------------------------------------------------------------------- | -------- | ------------------------ |
|
||||
| `organization` | path | string(uuid) | true | Organization ID |
|
||||
| `user` | path | string | true | Username, UUID, or me |
|
||||
| `body` | body | [codersdk.CreateWorkspaceRequest](schemas.md#codersdkcreateworkspacerequest) | true | Create workspace request |
|
||||
|
||||
### Example responses
|
||||
|
||||
|
||||
Reference in New Issue
Block a user