Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Create a new space for given group

POST /groups/{id}/spaces

Creates a new space for a specific group.

This operation requires group_add_space privilege. For administrator who does not belong to this group oz_groups_add_relationships and oz_spaces_create privileges are required.

Example cURL requests

Create new space for group

curl -u admin:password -H "Content-type: application/json" \
-X POST -d '{"name": "new_space"}' \
https://$HOST/api/v3/onezone/groups/$GROUP_ID/spaces

Path parameters

Parameter Type & Description
id required
string

Group Id.

Request body

PropertyType & Description
name required
string

Name of the new space.

Request Examples

Shell
onezone-rest-cli createSpaceForGroup id=a4d3bc73aada63052310652d421609f1 name=="New space name"

Responses

application/json
204

Id of the created space in the form /groups/{id}/spaces/{sid} 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."
  }
}
403

Forbidden 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."
  }
}
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."
  }
}