A Research Data Repository Service for Managing Metadata Documents based on JSON or XML.
For accessing the metadata record the same URL as before has to be used. The only difference is the content type. It has to be set to “application/vnd.datamanager.metadata-record+json”. Then the command line looks like this:
$ curl 'http://localhost:8040/metastore/api/v2/metadata/d9c917ee-160e-460c-b169-8f952ab505c7?version=1' -i -X GET \
-H 'Accept: application/vnd.datacite.org+json'
HTTP-wise the call looks as follows:
----
GET /metastore/api/v2/metadata/d9c917ee-160e-460c-b169-8f952ab505c7?version=1 HTTP/1.1
Accept: application/vnd.datacite.org+json
Host: localhost:8040
The linked metadata will be returned. The result is sent back to the user and will look that way:
HTTP/1.1 200 OK
ETag: "2079736072"
Location: http://localhost:8040/metastore/api/v2/metadata/d9c917ee-160e-460c-b169-8f952ab505c7?version=1
Content-Type: application/vnd.datacite.org+json
Content-Length: 1206
{
"id" : "d9c917ee-160e-460c-b169-8f952ab505c7",
"identifier" : {
"id" : 3,
"value" : "(:tba)",
"identifierType" : "DOI"
},
"creators" : [ {
"id" : 3,
"givenName" : "SELF"
} ],
"titles" : [ {
"id" : 3,
"value" : "Title of first JSON metadata document"
} ],
"publisher" : "SELF",
"publicationYear" : "2024",
"resourceType" : {
"id" : 3,
"value" : "JSON_Metadata",
"typeGeneral" : "MODEL"
},
"dates" : [ {
"id" : 3,
"value" : "2024-11-25T13:50:06Z",
"type" : "CREATED"
} ],
"relatedIdentifiers" : [ {
"id" : 2,
"identifierType" : "URL",
"value" : "https://repo/anyResourceId",
"relationType" : "IS_METADATA_FOR"
}, {
"id" : 3,
"identifierType" : "URL",
"value" : "http://localhost:8040/metastore/api/v2/schemas/my_first_json?version=1",
"relationType" : "HAS_METADATA"
} ],
"alternateIdentifiers" : [ {
"id" : 3,
"value" : "d9c917ee-160e-460c-b169-8f952ab505c7",
"identifierType" : "INTERNAL"
} ],
"version" : "1",
"lastUpdate" : "2024-11-25T13:50:06.577Z",
"state" : "VOLATILE",
"acls" : [ {
"id" : 4,
"sid" : "SELF",
"permission" : "ADMINISTRATE"
} ]
}
You also get the metadata record seen before.
« PREVIOUS | NEXT » |
---|---|