Skip to main content

Data API

Endpoints for external consumption of visualizations via API key.

Execute Endpoint

POST/api/v1/data-api/:namespace/:slug/execute

Executes a visualization endpoint. The execution mode (sync or async) is set in the endpoint configuration.

Permission: data_api:execute

Path Parameters

FieldTypeDescription
namespacestringEndpoint namespace (kebab-case)
slugstringEndpoint slug (kebab-case)

Body (optional)

FieldTypeRequiredDescription
parameter_valuesobjectNoValues for the visualization parameters
callback_urlstringNoWebhook URL for the result (async mode only, HTTPS required)

Sync Response (200)

{
"columns": [{ "name": "regiao", "type": "varchar" }],
"rows": [{ "regiao": "Sul" }],
"row_count": 1,
"truncated": false,
"max_rows": 10000,
"executed_at": "2026-04-11T10:30:00Z"
}

Async Response (202)

{
"job_id": "507f1f77bcf86cd799439011",
"status": "processing",
"polling_url": "/api/v1/data-api/:namespace/:slug/jobs/507f1f77bcf86cd799439011"
}

Get Job

GET/api/v1/data-api/:namespace/:slug/jobs/:job_id

Returns the status of an async execution job.

Permission: data_api:get_job

Path Parameters

FieldTypeDescription
namespacestringEndpoint namespace
slugstringEndpoint slug
job_idstringJob ID returned by the async execution

Response (200)

{
"job_id": "507f1f77bcf86cd799439011",
"status": "processing | completed | failed",
"result": null,
"error": null,
"created_at": "2026-04-11T10:30:00Z",
"completed_at": null
}

When status is completed, the result field contains:

{
"columns": [{ "name": "string", "type": "string" }],
"rows": [{}],
"row_count": 0,
"truncated": false
}

When status is failed, the error field contains the error message.


Error Codes

HTTPCodeDescription
400INVALID_PARAMSMissing namespace or slug
401-Missing or invalid token
403FORBIDDENMissing required permission
404ENDPOINT_NOT_FOUNDEndpoint does not exist, is inactive, or belongs to another company
404JOB_NOT_FOUNDJob does not exist or does not belong to the endpoint
408EXECUTION_TIMEOUTSync execution timed out (60s)
422-Invalid parameter or share-context violation
500EXECUTION_ERRORQuery execution error
500INTERNAL_ERRORInternal error