Create a new handle for the current user
Registers a new Public Data handle in the specified handle service as the current user.
A Public Data handle is essentially a persistent identifier (PID/DOI) that points to a resource in Onedata that is to be shared publicly as a Public Data record. All handles are advertised via the OAI-PMH protocol (Onezone serves as a repository of Public Data records, to be harvested by Public Data aggregators).
The handle service serves as a proxy that registers persistent identifiers in an external service such as DataCite or handle.net. It is typically set up by Onezone admins, who grant the rights to register handles to specific users/groups.
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 handle for the current user
curl -H "x-auth-token: $TOKEN" -H "content-type: application/json" \
-X POST https://$ZONE_HOST/api/v3/onezone/user/handles \
-d '{
"handleServiceId": "ddb06ed993bae95f2f430664fff122f7",
"resourceType": "Share",
"resourceId": "4fa683cbda8d8f686d15d42720af431d",
"metadataSchema": "oai_dc",
"metadata": "<?xml version=\"1.0\" encoding=\"utf-8\" ?><metadata><dc:contributor>John Doe</dc:contributor></metadata>"
}'
Request body
New handle parameters.
The Id of the handle service through which the handle will be registered.
The type of resource for which a handle will be registered - currently, only the Share type is supported.
The Id of the resource to be assigned a handle identifier (currently, always a share Id).
Short keyword that indicates the schema of the metadata attached to the handle. The keywords are borrowed from the concept of metadataPrefix in the OAI-PMH protocol.
oai_dc- Dublin Coreoai_datacite- Dataciteedm- Europeana Data Model Each handle metadata schema can be disseminated using one or more OAI-PMH metadata prefixes, but each OAI-PMH metadata prefix has only one corresponding handle metadata schema.
Metadata (in XML format) compliant with the schema indicated by the metadata prefix.
Request Examples
{
"handleServiceId": "f1c8b1a37aa7447b22eb65a742d40524",
"resourceType": "Share",
"resourceId": "f7a6d2ea511e728c9b3f3972cecb7af4",
"metadataSchema": "oai_dc",
"metadata": "<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?> <metadata xmlns:dc=\\\"http://purl.org/dc/elements/1.1/\\\">\n <dc:title>Example Resource</dc:title>\n <dc:creator>John Doe</dc:creator>\n <dc:publisher>ACC Cyfronet AGH</dc:publisher>\n <dc:date>2024-06-15</dc:date>\n</metadata>\n"
}Responses
URI of the created space in form https://$ZONE_HOST/api/onezone/v3/user/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."
}
}