Administration manual · Sequence
A query through the API
A query through the API
Query API sequence: the program reads the catalog, validates the query with the database plan, submits it and receives 202 if it does not finish within the wait, polls until it receives 200 with the first page and downloads the whole CSV without going back to the database.
GET /catalog (Bearer ect_…)
visible tables, dimensions and metrics
POST /queries/validate
plan: estimated rows
valid, estimate
POST /queries?wait=10s
job with the holder's identity
SQL with their universes
202 {id, status: RUNNING} + Location
(or 200 + first page if it finishes earlier)
GET /queries/{id}?wait=30s
200 + first page
GET /queries/{id}/rows (Accept:
text/csv)
whole CSV, without going back to the
database
Program
Query API
Job queue
API class
Client database
The result lives 30 minutes and
only the same credential sees it