Skip to content
Aggre Docs

Loading…

Console

API reference

OpenAPI and schema files

Download the machine-readable API description and JSON Schemas.

Everything in the reference is generated from files you can download and feed to a client generator, a validator or an agent.

OpenAPI#

FileDescribesFormats
Data APIEvery read route of https://api.aggre.org/openapi/data.yaml, /openapi/data.json
Accounts APIThe console's control-plane routes (platform-staff routes left out)/openapi/accounts.yaml, /openapi/accounts.json

Both are OpenAPI 3. In the data API file, row schemas are $refs to the JSON Schema files below, as absolute URLs on this site, so a tool resolves them without extra configuration. The files are served with Access-Control-Allow-Origin: *.

The data API file is kept equal to the service's own router by a contract test: every registered route is in the spec and every operation in the spec is registered, and the query parameters match what each route's parser accepts.

JSON Schemas#

One file per row type at /schemas/{name}.json, for example /schemas/candles.json. They are JSON Schema draft 2020-12. The schema reference lists the fields of each and the file names. The $id inside a schema is the schema's canonical identifier and may name aggre.org; the copy served here is the same file.

Using them#

bash
# validate a row against its schema
curl -s https://docs.aggre.org/schemas/candles.json -o candles.schema.json

# generate a typed client (any OpenAPI 3 generator works)
curl -s https://docs.aggre.org/openapi/data.yaml -o aggre-data.openapi.yaml

Ignore properties a schema does not list: fields are added over time (Versioning).

Source: content/api/openapi.md