Update user's harvester privileges
Updates user's ({uid}) privileges in a harvester ({id}).
This operation requires harvester_set_privileges privilege.
For administrators who do not have to be members of this harvester,
oz_harvesters_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 harvester
curl -u admin:password -X PATCH -H "Content-type: application/json" \
-d '{"grant": ["harvester_view", "harvester_update"], "revoke": ["harvester_delete"]}' \
https://$HOST/api/v3/onezone/harvesters/$HARVESTER_ID/users/$USER_ID/privileges
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Harvester Id. |
| uid required | string User Id. |
Request body
Harvester privileges update request.
| Property | Type & Description |
|---|---|
grant array of strings A list of privileges in the harvester. | |
revoke array of strings A list of privileges in the harvester. | |
Request Examples
{
"grant": [
"harvester_view",
"harvester_update",
"harvester_delete",
"harvester_view_privileges",
"harvester_set_privileges"
],
"revoke": [
"harvester_invite_user",
"harvester_remove_user",
"harvester_add_group",
"harvester_remove_group"
]
}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."
}
}