Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Create a new handle service for given group.

POST /groups/{id}/handle_services

Creates a new handle service for group.

This operation requires group_create_handle_service privilege and oz_handle_services_create admin privilege. For administrator who does not belong to this group oz_handle_services_create and oz_groups_add_relationships privileges are required.

Example cURL requests

Add group handle services

curl -u username:password -X POST -H "Content-type: application/json" \
-d '{ ... }' https://$HOST/api/v3/groups/4ebd9efd1e67f6c18695db1d762a914a/handle_services

Path parameters

Parameter Type & Description
id required
string

Group Id.

Request body

application/json
PropertyType & Description
name
string

The user defined name of the service.

proxyEndpoint
string

The endpoint of the Handle service proxy, i.e. a service which implements logic specific for particular Handle service.

serviceProperties
object (HandleServiceProperties)

An abstract type for Handle identifier services properties.

type required
discriminator string

The type of handle service.

The type of handle service.

Request Examples

application/json
{
  "name": "MyCommunity Handle service",
  "proxyEndpoint": "https://localhost:17000/handle_proxy",
  "serviceProperties": {
    "type": "DOI",
    "host": "https://mds.test.datacite.org",
    "doiEndpoint": "/doi",
    "metadataEndpoint": "/metadata",
    "mediaEndpoint": "/media",
    "prefix": 10.5072,
    "username": "alice",
    "password": "pa$$word",
    "identifierTemplate": "{{space.name}}-{{space.guid}}",
    "allowTemplateOverride": false
  }
}

Responses

application/json
201

URI of the created space in form https://$HOST/api/onezone/v3/groups/{id}/handle_services/{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."
  }
}
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."
  }
}