PATCH {{baseUrl}}/workspaces/{{workspaceId}}/roles
Updates the roles of users or [user groups] in a workspace. To get a list of roles, use the [GET /workspace-roles] endpoint. Include the following values in the Note:roles
array of objects:
op
— (Required) A string value that contains the operation to perform. Accepts the add
or remove
value.path
— (Required) A string value that contains the resource to perform the action on. Accepts the /user
or /usergroup
value.value
— (Required) A list of objects that contain user or user group IDs and an assigned role ID.
id
— (Required) A string value that contains the user or user group ID.role
— (Required) A number value that contains the workspace role's ID:
1
— Viewer. Can view, fork, and export workspace resources2
— Editor. Can create and edit workspace resources.3
— Admin. Can manage workspace details and members.
Body
PARAM
Key | Datatype | Required | Description |
HEADERS
Key | Datatype | Required | Description |
RESPONSES
status OK
{
"roles": [
{
"id": 1,
"displayName": "Viewer",
"user": [
12345678
],
"usergroup": [
123
]
},
{
"id": 2,
"displayName": "Editor",
"user": [
87654321
],
"usergroup": [
123
]
},
{
"id": 3,
"displayName": "Admin",
"user": [
13428756
],
"usergroup": [
132
]
}
]
} |
ENDPOINTS