Register handle
Allows to register a new handle identifier, using a specific handle service.
The handle service must be registered in Onedata separately.
See also:
Create a new handle for the current user
Create a new handle for given group
This operation requires handle_service_register_handle privilege, which needs to
be assigned to a specific handle service
or oz_handles_create admin privilege.
Example cURL requests
Register handle
curl -u username:password -X POST -H "Content-type: application/json" \
-d '{ "handleServiceId": "ddb06ed993bae95f2f430664fff122f7", "resourceType": "Share", "resourceId": "4fa683cbda8d8f686d15d42720af431d", "metadata": "<?xml version=\'1.0\'?>..." }' \
https://$HOST/api/v3/handles
Request body
The Onedata GUID of the handle service registered.
The type of resource to be registered.
The Id of the resource to be assigned a handle identifier.
Dublin Core metadata for the resource encoded in XML.
Request Examples
{
"handleServiceId": "f1c8b1a37aa7447b22eb65a742d40524",
"resourceType": "Share",
"resourceId": "f7a6d2ea511e728c9b3f3972cecb7af4",
"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>"
}Responses
URI of the created handle in form https://$HOST/api/onezone/v3/handles/{id} is returned in the response Location header.
Invalid request.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}