Getting a Metadata Schema Record

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

Getting a Metadata Schema Record

For obtaining one metadata schema record you have to provide the value of the field ‘schemaId’.

NOTE
As ‘Accept’ field you have to provide ‘application/vnd.datamanager.schema-record+json’ otherwise you will get the metadata schema instead.
$ curl 'http://localhost:8040/api/v1/schemas/my_first_json' -i -X GET \
    -H 'Accept: application/vnd.datamanager.schema-record+json'

In the actual HTTP request just access the path of the resource using the base path and the ‘schemaid’. Be aware that you also have to provide the ‘Accept’ field.

GET /api/v1/schemas/my_first_json HTTP/1.1
Accept: application/vnd.datamanager.schema-record+json
Host: localhost:8040

As a result, you receive the metadata schema record send before and again the corresponding ETag in the HTTP response header.

HTTP/1.1 200 OK
ETag: "1855465506"
Content-Type: application/vnd.datamanager.schema-record+json
Content-Length: 460

{
  "schemaId" : "my_first_json",
  "schemaVersion" : 1,
  "mimeType" : "application/json",
  "type" : "JSON",
  "createdAt" : "2022-05-20T09:54:01Z",
  "lastUpdate" : "2022-05-20T09:54:01.89Z",
  "acl" : [ {
    "id" : 1,
    "sid" : "SELF",
    "permission" : "ADMINISTRATE"
  } ],
  "schemaDocumentUri" : "http://localhost:8040/api/v1/schemas/my_first_json?version=1",
  "schemaHash" : "sha1:98741f0d6115474ab69375be3bc9cd5b305ce200",
  "doNotSync" : true
}
« PREVIOUS NEXT »