Getting a List of all Schema Records for a Specific SchemaId

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

Getting a List of all Schema Records for a Specific SchemaId

If you want to obtain all versions of a specific schema you may add the schemaId as a filter parameter. This may look like this:

$ curl 'http://localhost:8040/api/v1/schemas?schemaId=my_first_json' -i -X GET

HTTP-wise the call looks as follows:

GET /api/v1/schemas?schemaId=my_first_json HTTP/1.1
Host: localhost:8040

As a result, you receive a list of metadata schema records in descending order. (current version first)

HTTP/1.1 200 OK
Content-Range: 0-9/2
Content-Type: application/json
Content-Length: 927

[ {
  "schemaId" : "my_first_json",
  "schemaVersion" : 2,
  "mimeType" : "application/json",
  "type" : "JSON",
  "createdAt" : "2022-05-20T09:54:01Z",
  "lastUpdate" : "2022-05-20T09:54:02.753Z",
  "acl" : [ {
    "id" : 1,
    "sid" : "SELF",
    "permission" : "ADMINISTRATE"
  } ],
  "schemaDocumentUri" : "http://localhost:8040/api/v1/schemas/my_first_json?version=2",
  "schemaHash" : "sha1:68c72ab169770015f9b68645d0a50ac33a98f46c",
  "doNotSync" : true
}, {
  "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 »