Update current user's admin privileges
Updates currently authenticated user's admin privileges in Onezone.
This operation can be invoked on behalf of the current user only and requires
oz_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
Updates current user's admin privileges in Onezone
curl -u username:password -H "Content-type: application/json" -X PATCH \
-d '{"grant": ["oz_spaces_list"], "revoke": ["oz_groups_update"]}' \
https://$HOST/api/v3/onezone/user/privileges
Request body
User admin privileges.
| Property | Type & Description |
|---|---|
grant array of strings A list of admin privileges in Onezone. | |
revoke array of strings A list of admin privileges in Onezone. | |
Request Examples
{
"grant": [
"oz_groups_add_relationships",
"oz_groups_remove_relationships",
"oz_groups_view_privileges",
"oz_groups_set_privileges",
"oz_groups_list",
"oz_groups_view",
"oz_groups_list_relationships",
"oz_spaces_create",
"oz_spaces_update"
],
"revoke": [
"oz_providers_list",
"oz_providers_view",
"oz_providers_update",
"oz_providers_delete",
"oz_providers_invite",
"oz_providers_list_relationships",
"oz_handle_services_create"
]
}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."
}
}