mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add workspace sharing page (#19107)
This commit is contained in:
Generated
+4
-4
@@ -3582,10 +3582,10 @@ curl -X PATCH http://coder-server:8080/api/v2/templates/{template}/acl \
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
|------------|------|--------------------------------------------------------------------|----------|-------------------------|
|
||||
| `template` | path | string(uuid) | true | Template ID |
|
||||
| `body` | body | [codersdk.UpdateTemplateACL](schemas.md#codersdkupdatetemplateacl) | true | Update template request |
|
||||
| Name | In | Type | Required | Description |
|
||||
|------------|------|--------------------------------------------------------------------|----------|-----------------------------|
|
||||
| `template` | path | string(uuid) | true | Template ID |
|
||||
| `body` | body | [codersdk.UpdateTemplateACL](schemas.md#codersdkupdatetemplateacl) | true | Update template ACL request |
|
||||
|
||||
### Example responses
|
||||
|
||||
|
||||
Generated
+40
@@ -8149,6 +8149,30 @@ Restarts will only happen on weekdays in this list on weeks which line up with W
|
||||
The schedule must be daily with a single time, and should have a timezone specified via a CRON_TZ prefix (otherwise UTC will be used).
|
||||
If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
|
||||
## codersdk.UpdateWorkspaceACL
|
||||
|
||||
```json
|
||||
{
|
||||
"group_roles": {
|
||||
"property1": "admin",
|
||||
"property2": "admin"
|
||||
},
|
||||
"user_roles": {
|
||||
"property1": "admin",
|
||||
"property2": "admin"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|--------------------|--------------------------------------------------|----------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `group_roles` | object | false | | |
|
||||
| » `[any property]` | [codersdk.WorkspaceRole](#codersdkworkspacerole) | false | | |
|
||||
| `user_roles` | object | false | | Keys must be valid UUIDs. To remove a user/group from the ACL use "" as the role name (available as a constant named `codersdk.WorkspaceRoleDeleted`) |
|
||||
| » `[any property]` | [codersdk.WorkspaceRole](#codersdkworkspacerole) | false | | |
|
||||
|
||||
## codersdk.UpdateWorkspaceAutomaticUpdatesRequest
|
||||
|
||||
```json
|
||||
@@ -10548,6 +10572,22 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
| `sensitive` | boolean | false | | |
|
||||
| `value` | string | false | | |
|
||||
|
||||
## codersdk.WorkspaceRole
|
||||
|
||||
```json
|
||||
"admin"
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Value |
|
||||
|---------|
|
||||
| `admin` |
|
||||
| `use` |
|
||||
| `` |
|
||||
|
||||
## codersdk.WorkspaceStatus
|
||||
|
||||
```json
|
||||
|
||||
Generated
+43
@@ -1514,6 +1514,49 @@ curl -X PATCH http://coder-server:8080/api/v2/workspaces/{workspace} \
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Update workspace ACL
|
||||
|
||||
### Code samples
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X PATCH http://coder-server:8080/api/v2/workspaces/{workspace}/acl \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`PATCH /workspaces/{workspace}/acl`
|
||||
|
||||
> Body parameter
|
||||
|
||||
```json
|
||||
{
|
||||
"group_roles": {
|
||||
"property1": "admin",
|
||||
"property2": "admin"
|
||||
},
|
||||
"user_roles": {
|
||||
"property1": "admin",
|
||||
"property2": "admin"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
|-------------|------|----------------------------------------------------------------------|----------|------------------------------|
|
||||
| `workspace` | path | string(uuid) | true | Workspace ID |
|
||||
| `body` | body | [codersdk.UpdateWorkspaceACL](schemas.md#codersdkupdateworkspaceacl) | true | Update workspace ACL request |
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
|--------|-----------------------------------------------------------------|-------------|--------|
|
||||
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Update workspace autostart schedule by ID
|
||||
|
||||
### Code samples
|
||||
|
||||
Reference in New Issue
Block a user