Add group to harvester
Adds group {gid} as member of harvester {id}. Optional privileges can be passed in the request body, otherwise default privileges will be set for the group in this harvester.
This operation requires harvester_add_group privilege in the harvester and
group_add_harvester privilege in the group. If privileges are
specified in the request, harvester_set_privileges privilege is also required.
For administrator who does not belong to the group / harvester,
oz_groups_add_relationships and oz_harvesters_add_relationships privileges
are required, and oz_harvesters_set_privileges if privileges are specified
in the request.
Example cURL requests
Add group to harvester
curl -u username:password -H "Content-type: application/json" -X PUT \
https://$ZONE_HOST/api/v3/onezone/harvesters/$HARVESTER_ID/groups/$GROUP_ID
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Harvester Id. |
| gid required | string Group Id. |
Request body
A list of privileges in the harvester.
Request Examples
onezone-rest-cli addGroupToHarvester id=b752ceafabb662b4e5728b2ded25cdd1 gid=f1c8b1a37aa7447b22eb65a742d40524Responses
The group was added to the harvester.
Invalid request.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}