Add space owner
Adds user {uid} as an owner of space {id}. Ownership can only be granted
to effective members of the space - if the desired user is not a member, they
have to be added to the space first. If the new owner is only an indirect
member (via a group), he is automatically added as a direct member when
granted ownership.
Space owners are members of the space (users) that have absolute power regarding the space API and files (analogical to "root", but in the scope of one space). Being an owner means that user privileges are essentially ignored and all API operations are allowed.
This operation requires any of the following authentication:
- as user who is currently an owner of the space (
{id}), - as user who has
oz_spaces_set_privilegesadmin privilege.
Example cURL requests
Add space space owner
curl -u username:password -H "Content-type: application/json" -X PUT \
https://$HOST/api/v3/onezone/spaces/$SPACE_ID/owners/$USER_ID
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Space Id. |
| uid required | string User Id. |
Request Examples
onezone-rest-cli addSpaceOwner id=b752ceafabb662b4e5728b2ded25cdd1 uid=a5b469a2b0516b662a49da74d6d7d7bcResponses
The user was added as an owner of the space.
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."
}
}