Exports
Export Query
Run a constrained string query and stream the result as an Excel workbook (or CSV/Parquet). auth(india:read + data:export) -> OPA(export prices) -> as-of lakehouse read -> legal_basis drop -> project -> serialize. The default ``fmt=xlsx`` is the analyst surface (SPEC.md §8 "Query -> Excel"); ``csv``/``parquet`` are the same panel in other encodings.
POST /india/exports
Run a constrained string query and stream the result as an Excel workbook (or CSV/Parquet). auth(india:read + data:export) -> OPA(export prices) -> as-of lakehouse read -> legal_basis drop -> project -> serialize. The default fmt=xlsx is the analyst surface (SPEC.md §8 “Query -> Excel”); csv/parquet are the same panel in other encodings.
Category: India · Exports
Authentication
Send the provisioned API key in the X-API-KEY header.
Required scopes: india:read, data:export.
Request
| Name | In | Required | Type | Constraints | Description |
|---|---|---|---|---|---|
| q | query | yes | string | — | Constrained string query, e.g. ‘prices isin=INE_AAA,INE_BBB start=2020-01-01 end=2020-12-31 columns=close,volume’. |
| fmt | query | no | string | default “xlsx”; one of xlsx, csv, parquet | — |
| limit | query | no | integer | default 50000; min 1; max 200000 | — |
Example request
curl --request POST \
--url 'https://corpus-api.onera.app/india/exports?q=string' \
--header "X-API-KEY: ${CORPUS_API_KEY}"
Responses
| Status | Description | Content type | Schema |
|---|---|---|---|
| 200 | Governed export bytes in the requested format. | application/vnd.apache.parquet, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, text/csv | string (binary) |
| 400 | Invalid parameter combination | application/json | ErrorResponse |
| 401 | Missing or invalid API key | application/json | ErrorResponse |
| 403 | Insufficient jurisdiction or scope | application/json | ErrorResponse |
| 404 | Unknown resource | application/json | ErrorResponse |
| 422 | Request schema validation failed | application/json | ErrorResponse |
| 429 | Rate limit exceeded | application/json | ErrorResponse |
| 503 | Source content is unavailable or still processing | application/json | ErrorResponse |
Representative 200 response
The successful response uses application/vnd.apache.parquet.