Join parent group
Adds given group as a child group of a specific group based on provided token.
The parent group to which the group will be added is identified from the token (the token is issued in the context of a group).
This operation requires group_add_parent privilege.
For administrator who does not belong to this group
oz_groups_add_relationships privilege is required.
Example cURL requests
Join parent group
curl -u admin:password -H "Content-type: application/json" -X POST \
-d '{"token":"MDAxNmxvY2F00aW9uIHJlZ2lzdHJ5CjAwM2JpZGVudGlmaW"}' \
https://$HOST/api/v3/onezone/groups/$GROUP_ID/parents/join
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Group Id. |
Request body
Group join token.
| Property | Type & Description |
|---|---|
token string The token for joining a group. | |
Request Examples
{
"token": "JKAxNWxvY2F0aW9uIG9uZXpvbmUKMDAzYmlkZW50aWZpZXIgOEhmSEFSSGdrbHFCa1pWSTRsNk1CVHZTU3Z0OThwcHA2OTQ4czhRN1NPawowMDFhY2lkIHRpbWUgPCAxNDk2MTQwMTQ0CjAwMmZzaWduYXR1cmUg88OI1d24c36707d99197c6cd995810a43aca"
}Responses
URI of the joined group in form https://$HOST/api/onezone/v3/groups/{id}/parents/{pid} 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."
}
}