Accessing Metadata Record

A Research Data Repository Service for Managing Metadata Documents based on JSON or XML.

Accessing Metadata Record

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/api/v1/metadata/6785ad43-9a17-40b5-9653-220a8232ef2f?version=1' -i -X GET \
    -H 'Accept: application/vnd.datamanager.metadata-record+json'

HTTP-wise the call looks as follows:

GET /api/v1/metadata/6785ad43-9a17-40b5-9653-220a8232ef2f?version=1 HTTP/1.1
Accept: application/vnd.datamanager.metadata-record+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: "558661553"
Content-Type: application/vnd.datamanager.metadata-record+json
Content-Length: 691

{
  "id" : "6785ad43-9a17-40b5-9653-220a8232ef2f",
  "relatedResource" : {
    "identifier" : "https://repo/anyResourceId",
    "identifierType" : "URL"
  },
  "createdAt" : "2022-05-20T09:54:03Z",
  "lastUpdate" : "2022-05-20T09:54:03.45Z",
  "schema" : {
    "identifier" : "http://localhost:8040/api/v1/schemas/my_first_json?version=1",
    "identifierType" : "URL"
  },
  "schemaVersion" : 1,
  "recordVersion" : 1,
  "acl" : [ {
    "id" : 3,
    "sid" : "SELF",
    "permission" : "ADMINISTRATE"
  } ],
  "metadataDocumentUri" : "http://localhost:8040/api/v1/metadata/6785ad43-9a17-40b5-9653-220a8232ef2f?version=1",
  "documentHash" : "sha1:97ac2fb17cd40aac07a55444dc161d615c70af8a"
}

You also get the metadata record seen before.

« PREVIOUS NEXT »