Update user handle privileges
Updates user's ({uid}) privileges in a handle ({id}).
This operation requires handle_update privilege
or oz_handles_set_privileges admin privilege.
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 group's privileges in a handle
curl -u username:password -X PATCH -H "Content-type: application/json" \
-d '{"grant": ["handle_view"], "revoke": ["handle_delete"]}' \
https://$HOST/api/v3/handles/$HANDLE_ID/users/$USER_ID/privileges
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Handle Id. |
| uid required | string User Id. |
Request body
Handle privileges update request.
| Property | Type & Description |
|---|---|
grant array of strings A list of privileges in the handle. | |
revoke array of strings A list of privileges in the handle. | |
Request Examples
{
"grant": [
"handle_view",
"handle_update"
],
"revoke": [
"handle_delete"
]
}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."
}
}