Update user's space privileges
Updates user's ({uid}) privileges in a space ({id}).
This operation requires space_set_privileges privilege.
For administrators who do not have to be members of this space,
oz_spaces_set_privileges privilege is required.
The grant field specifies a list of privileges to be granted. The revoke
field specifies a list of privileges to be revoked. At least one of those
fields must be given.
Example cURL requests
Update user's privileges in a space
curl -u admin:password -X PATCH -H "Content-type: application/json" \
-d '{"grant": ["space_view", "space_update"], "revoke": ["space_delete"]}' \
https://$HOST/api/v3/onezone/spaces/$SPACE_ID/users/$USER_ID/privileges
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Space Id. |
| uid required | string User Id. |
Request body
Space privileges update request.
| Property | Type & Description |
|---|---|
grant array of strings A list of privileges in the space. | |
revoke array of strings A list of privileges in the space. | |
Request Examples
{
"grant": [
"space_view",
"space_update",
"space_delete",
"space_view_privileges",
"space_set_privileges"
],
"revoke": [
"space_read_data",
"space_write_data",
"space_manage_shares",
"space_manage_views",
"space_query_views",
"space_view_statistics"
]
}Responses
The privileges have been updated.
Invalid request.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}