Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Add space to harvester

PUT /harvesters/{id}/spaces/{sid}

Adds space {sid} as member of harvester {id}.

This operation requires harvester_add_space privilege in the harvester and space_add_harvester privilege in the space.

For administrator who does not belong to the space / harvester, oz_spaces_add_relationships and oz_harvesters_add_relationships privileges are required.

Example cURL requests

Add space to harvester

curl -u username:password -H "Content-type: application/json" -X PUT \
 https://$HOST/api/v3/onezone/harvesters/$HARVESTER_ID/spaces/$SPACE_ID

Path parameters

Parameter Type & Description
id required
string

Harvester Id.

sid required
string

Space Id.

Request body

application/json

No schema provided.

Request Examples

application/json
[
  "harvester_view",
  "harvester_update",
  "harvester_delete",
  "harvester_view_privileges",
  "harvester_set_privileges",
  "harvester_add_user",
  "harvester_remove_user",
  "harvester_add_group",
  "harvester_remove_group",
  "harvester_add_space",
  "harvester_remove_space"
]

Responses

application/json
204

The space was added to the harvester.

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