Getting a specific Version of Metadata Schema Document (API v2)

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

Getting a specific Version of Metadata Schema Document (API v2)

To get a specific version of the metadata schema document just send an HTTP GET with the linked ‘schemaId’ and the version number you are looking for as query parameter:

$ curl 'http://localhost:8040/metastore/api/v2/schemas/my_first_json?version=1' -i -X GET \
    -H 'Accept: application/json'

HTTP-wise the call looks as follows:

GET /metastore/api/v2/schemas/my_first_json?version=1 HTTP/1.1
Accept: application/json
Host: localhost:8040

As a result, you receive the initial JSON schema document (version 1).

HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 388
Accept-Ranges: bytes

{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$id" : "http://www.example.org/schema/json",
  "type" : "object",
  "title" : "Json schema for tests",
  "default" : { },
  "required" : [ "title" ],
  "properties" : {
    "title" : {
      "type" : "string",
      "title" : "Title",
      "description" : "Title of object."
    }
  },
  "additionalProperties" : false
}

NOTE
Without the query paramter you will get the most recent version.
« PREVIOUS NEXT »