Add handle user
Allows to add a user to a handle.
This operation requires handle_update privilege
or oz_handles_add_relationships and oz_users_add_relationships admin privilege.
Example cURL requests
Add handle user
curl -u username:password -X PUT \
https://$HOST/api/v3/handles/$HANDLE_ID/users/$USER_ID
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Handle Id. |
| uid required | string The Id of the user to add to handle. |
Request body
| Property | Type & Description |
|---|---|
privileges array of strings A list of privileges in the handle. | |
Request Examples
onezone-rest-cli addHandleUser id=45bf25a5cb16e12a9faa6d088a2c7088 uid=5ca9574418d5a2c509265d37356ee549Responses
URI of the added user in form https://$HOST/api/onezone/v3/handles/{id}/users/{uid} is returned in the response Location header.
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."
}
}