Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get handle from handle service

GET /handle_services/{id}/handles/{hid}

Returns the details of a specific handle registered by handle service.

This operation requires handle_service_view privilege or oz_handles_view admin privilege.

Example cURL requests

Get handle services handle

curl -u username:password -X GET \
https://$HOST/api/v3/handle_services/13c6bf68ed88dd01f396571f976b148d/handles/$HANDLE_ID

{
  "handleId": "95b663a6467c72ab1256865efef9e387",
  "handleServiceId": "97c27230017cd54c1220189e357322c4",
  "resourceType": "Share",
  "resourceId": "d6ee1aecf03b23f09756d6a49e435455",
  "metadata": "<?xml version=\"1.0\"?>
      <!DOCTYPE rdf:RDF SYSTEM \\"http://dublincore.org/2000/12/01-dcmes-xml-dtd.dtd\">
      <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"
               xmlns:dc=\"http://purl.org/dc/elements/1.1/\">
        <rdf:Description rdf:about=\"http://example.com/resouces/1\">
          <dc:title>Example Resource</dc:title>
          <dc:creator>John Doe</dc:creator>
          <dc:publisher>MIT</dc:publisher>
          <dc:date>2000-06-06</dc:date>
        </rdf:Description>
      </rdf:RDF>",
  "timestamp": "1997-07-16T19:20",
  "creator": {
    "type": "user",
    "id": "7434b256e71e1052e0d5e3e9da657ebf"
  },
  "creationTime": 1576152793
}

Path parameters

Parameter Type & Description
id required
string

Handle service Id.

hid required
string

Handle Id.

Request Examples

Shell
onezone-rest-cli getHandleServiceHandle id=33f5e5925f6ec7ddf8f68516b2980fdb hid=f3322ec0d5557f9d94c89180f83b462f

Responses

application/json
200

The list of handle identifiers (Onedata internal GUIDs).

PropertyType & Description
handleId
string

Unique Id of the handle in Onedata.

publicHandle
string

Unique Id of the handle as registered in the handle service. Depending on the handle service, can be an Id (DOI: 10.5072/w95Zlng) or an URL (PID: http://hdl.handle.net/21.T15999/TgAl7s0).

handleServiceId
string

Id of the service where the handle was registered.

resourceType
string

The type of resource to be registered.

Enum:
Share
resourceId
string

The Onedata GUID of the resource to which the handle should be resolved.

metadata
string

Dublin Core metadata for the resource encoded in XML.

timestamp
string

Handle registration timestamp.

creator
object (Subject)

Object representing a subject in the system, can be perceived as client (actor) identity.

type
string

Type of the subject

Enum:
nobodyuseroneprovider
id
string

Id of the subject (null for nobody)

creationTime
integer (Timestamp)

Timestamp in seconds (UNIX epoch), e.g. 1563819329.

Example

application/json
{
  "handleId": "14208c48fe063d26fd45144b90977a56",
  "publicHandle": "10.5072/w95Zlng",
  "handleServiceId": "f480c4889db90d93996ee89d0ee5f8f0",
  "resourceType": "Share",
  "resourceId": "3d8cd457cef92ba08261bf1bb8d40438",
  "metadata": "<?xml version=\\\"1.0\\\"?> <!DOCTYPE rdf:RDF SYSTEM \\\\\"http://dublincore.org/2000/12/01-dcmes-xml-dtd.dtd\\\"> <rdf:RDF xmlns:rdf=\\\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\\\"\n         xmlns:dc=\\\"http://purl.org/dc/elements/1.1/\\\">\n  <rdf:Description rdf:about=\\\"http://example.com/resouces/1\\\">\n    <dc:title>Example Resource</dc:title>\n    <dc:creator>John Doe</dc:creator>\n    <dc:publisher>MIT</dc:publisher>\n    <dc:date>2000-06-06</dc:date>\n  </rdf:Description>\n</rdf:RDF>\n",
  "timestamp": "2016-07-16T18:20:30.450Z",
  "creator": {
    "type": "user",
    "id": "7434b256e71e1052e0d5e3e9da657ebf"
  },
  "creationTime": 1576152793
}
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."
  }
}