Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Add child group

PUT /groups/{id}/children/{cid}

Adds group {cid} as child group of group {id}. Optional privileges can be passed in the request body, otherwise default privileges will be set for the child group in this group.

This operation requires group_add_child privilege in the parent group and group_add_parent privilege in the child group. If privileges are specified in the request, group_set_privileges privilege is also required.

For administrator who does not belong to those groups, oz_groups_add_relationships privilege is required, and oz_groups_set_privileges if privileges are specified in the request.

Example cURL requests

Add child group

curl -u username:password -X PUT \
https://$HOST/api/v3/onezone/groups/$GROUP_ID/children/$CHILD_GROUP_ID

Path parameters

Parameter Type & Description
id required
string

Group Id.

cid required
string

Child group Id.

Request body

PropertyType & Description
privileges
array of strings

A list of privileges in the group.

Request Examples

Shell
onezone-rest-cli addChildGroup id=538ef9643ae6b9e40817e51eece7e341 cid=0ec9817801d74e2fa6cc50a476ed5d4d

Responses

application/json
201

URI of the added group in form https://$HOST/api/onezone/v3/groups/{id}/children/{cid} is returned in the response Location header.

400

Invalid request.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
401

Authentication error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
403

Authorization error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
404

Resource not found.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
500

Internal server Error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}