Create a new handle for the current user
Creates a new handle as current user.
This operation can be invoked on behalf of the current user only and requires 'handle_service_register_handle' privilege in the handle service where the new handle is to be registered
Example cURL requests
Create new user handle
curl -u admin:password -H "Content-type: application/json" -X POST \
-d '{ "handleServiceId": "ddb06ed993bae95f2f430664fff122f7", "resourceType": "Share", "resourceId": "4fa683cbda8d8f686d15d42720af431d", "metadata": "<?xml version=\'1.0\'?>..." }'
https://$HOST/api/v3/onezone/user/handles
Request body
New handle parameters.
| Property | Type & Description |
|---|---|
handleServiceId string The Onedata GUID of the handle service registered. | |
resourceType string The type of resource to be registered. | |
resourceId string The Id of the resource to be assigned a handle identifier. | |
metadata string 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 space in form https://$HOST/api/onezone/v3/user/handles/{id} is returned in the response Location header.
Invalid request.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}