Joltio Data / data.query
Run a governed Data query
Run one read-only SELECT or GraphQL query. Raw rows and aggregate rows have separate plan limits; a response over the limit has truncated: true.
POST /v1/data/query
- Autenticación
- X-API-Key / Bearer
- Formatos
- JSON · CSV · Markdown · Toon
- Filas por consulta
- Según tu plan
Parámetros
| Nombre | Tipo | Ubicación |
|---|---|---|
sql | string | body |
graphql | string | body |
variables | object | body |
limit | integer | body |
view | string | body |
format | string | body |
intent | string | body |
Respuestas
200 | OK |
400 | query_error: The query could not be executed. |
401 | unauthorized: An API key or Bearer token is required. |
403 | readonly: Write operations are not allowed. Only SELECT queries are permitted. |
408 | timeout: Query timed out ({timeoutSeconds}s). Try adding more filters or reducing the date range. |
422 | query_too_expensive: This query reads too many rows. Filter by date or program, aggregate a smaller range, or use /coverage for the latest data. |
429 | quota_exhausted: The query allowance for this traffic class is exhausted. Retry after the quota interval resets; use /coverage for table bounds and filter future queries by date. |
curl
curl -X POST 'https://api.joltio.app/v1/data/query' -H 'X-API-Key: $JOLTIO_API_KEY' -H 'Content-Type: application/json' -d '{"sql":"SELECT max(datetime) AS latest_price_at FROM omie.prices WHERE datetime >= today() - 7","format":"json"}'Python
from joltio import Client
import json
with Client() as j:
result = j.post('/v1/data/query', json=json.loads('{"sql":"SELECT max(datetime) AS latest_price_at FROM omie.prices WHERE datetime >= today() - 7","format":"json"}'))