Skip to main content

GetApiSchema

Retrieve the JSON Schema of the current query API.

Parameters​

This command takes no parameters.

Details​

The response contains the server version and a JSON Schema (draft-07) of a query: an array of commands, each an object naming exactly one command.

The server generates the schema from the parameters each of its commands declares, so it lists the commands of the running server with their parameter names, types, required parameters, and enumerated values. Editors can use it to suggest and check commands while a query is written.

The server checks some rules that the schema does not describe, such as references between commands, value ranges, and combinations of parameters. A query that matches the schema can still be refused.

The schema of a server only changes when it is upgraded, so clients can cache it under the version returned with it.

For example,

[{
"GetApiSchema": {
}
}]

Successful response, abridged:

[{
"GetApiSchema": {
"schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CmdConstraints": { ... },
...
},
"items": {
"additionalProperties": false,
"maxProperties": 1,
"minProperties": 1,
"properties": {
"AddBlob": { ... },
...
},
"type": "object"
},
"minItems": 1,
"title": "ApertureDB query",
"type": "array"
},
"status": 0,
"version": "0.19.0"
}
}]