Update user or user group roles
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 roles array of objects:
- op— (Required) A string value that contains the operation to perform. Accepts the- addor- removevalue.
- path— (Required) A string value that contains the resource to perform the action on. Accepts the- /useror- /usergroupvalue.
- 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. To return user IDs as SCIM IDs in the endpoint's response, include- theidentifierType=scimheader in the request.
- role— (Required) A number value that contains the workspace role's ID:- 1— Viewer. Can view, fork, and export workspace resources
- 2— Editor. Can create and edit workspace resources.
- 3— Admin. Can manage workspace details and members.
 
 
Note:
- To use SCIM IDs, include the - identifierType=scimheader when you call this endpoint. To get SCIM user IDs, use the- include=scimquery parameter when calling the [GET /workspaces/{workspaceId}] or [GET /workspaces] endpoints.
- This endpoint does not support the external [Partner or Guest roles] 
- This endpoint is restricted to 50 operations per call. 
- The request body must contain one unique action per user or user group. For example, you cannot add and remove multiple roles for a user in the same request body. 
HEADERS
| Key | Datatype | Required | Description | 
|---|---|---|---|
| identifierType | null | Use SCIM user IDs instead of Postman user IDs. | 
RESPONSES
status: OK
{"roles":[{"id":1,"displayName":"Viewer","user":["405775fe15ed41872a8eea4c8aa2b38cda9749812cc55c99"]}]}