Skip to content
Skip to Content
Coder Docs

Update workspace ACL

PATCH
/api/v2/workspaces/{workspace}/acl

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

workspace*string

Workspace ID

Formatuuid

Request Body

Update workspace ACL request

application/json
  1. body
group_roles?

GroupRoles is a mapping from valid group UUIDs to the workspace role they should be granted. To remove a group from the workspace, use "" as the role (available as a constant named codersdk.WorkspaceRoleDeleted)

user_roles?

UserRoles is a mapping from valid user UUIDs to the workspace role they should be granted. To remove a user from the workspace, use "" as the role (available as a constant named codersdk.WorkspaceRoleDeleted)

Response Body

No Content

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X PATCH \	"$CODER_URL/api/v2/workspaces/{workspace}/acl" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "group_roles": {    "property1": "admin",    "property2": "admin"  },  "user_roles": {    "property1": "admin",    "property2": "admin"  }}'
Example Response204
Empty