A Research Data Repository Service for Managing Metadata Documents based on JSON or XML.
For obtaining accessible metadata schemas you also have to provide the ‘schemaId’. For accessing schema document you have to provide ‘application/xml’ as ‘Accept’ header.
$ curl 'http://localhost:8040/metastore/api/v2/schemas/my_first_json' -i -X GET \
-H 'Accept: application/json'
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 /metastore/api/v2/schemas/my_first_json HTTP/1.1
Accept: application/json
Host: localhost:8040
As a result, you receive the JSON schema send before.
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
}
« PREVIOUS | NEXT » |
---|---|