Getting a Metadata Schema Document

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

Getting a Metadata Schema Document

For obtaining accessible metadata schemas you also have to provide the ‘schemaId’. For accessing schema document you don’t have to provide the ‘Accept’ header.

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

In the actual HTTP request there is nothing special. You just access the path of the resource using the base path and the ‘schemaId’.

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

As a result, you receive the XSD schema send before.

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 425
Accept-Ranges: bytes

{
  "$schema" : "http://json-schema.org/draft/2019-09/schema#",
  "$id" : "http://www.example.org/schema/json",
  "type" : "object",
  "title" : "Json schema for tests",
  "default" : { },
  "required" : [ "title" ],
  "properties" : {
    "title" : {
      "$id" : "#/properties/string",
      "type" : "string",
      "title" : "Title",
      "description" : "Title of object."
    }
  },
  "additionalProperties" : false
}
« PREVIOUS NEXT »