PT EN

Execuções de relatórios

URL base: $BUSINESS_API

O objecto

idstring · obrigatório
tenant_idstring · obrigatório
definition_idstring · obrigatório
triggered_bystring · opcional
statusstring · obrigatório

um de pending, running, completed, failed

parametersobject · obrigatório
localestring · opcional

The requester's language, captured when the export is queued. The CSV download and the PDF label columns and enum values in it. Absent for API keys and system runs, whose CSV keeps the snake_case column keys and raw values.

um de pt-MZ, en-US

row_countinteger · obrigatório
download_urlstring · opcional
error_messagestring · opcional
started_atstring (date-time) · opcional
completed_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
O objecto
{
  "id": "rep_2PJiWXxcUzzWiDtIAPJaoNNWqNF",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "definition_id": "def_2dL2WhtIu5Vmo51mWVHA0zjwE3L",
  "triggered_by": "triggered by",
  "status": "pending",
  "parameters": {},
  "locale": "pt-MZ",
  "row_count": 1,
  "download_url": "https://example.org/",
  "error_message": "error message",
  "started_at": "2026-11-19T09:30:00Z",
  "completed_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z"
}

Listar execuções de relatórios

Registos

GET /executions

Returns the tenant's report runs with their definition, status (pending, running, completed or failed), row count, timings, error message and, when completed, the CSV download path. Results are cursor-paginated (default 20, maximum 100); the handler also accepts definition_id and status filters. Requires the reports:read permission.

Parâmetros

limitinteger · consulta · opcional

Maximum resources to return (default 20, maximum 100).

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 Report executions

Mostrar atributos
dataarray of ReportExecution · obrigatório
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
definition_idstring · obrigatório
triggered_bystring · opcional
statusstring · obrigatório

um de pending, running, completed, failed

parametersobject · obrigatório
localestring · opcional

The requester's language, captured when the export is queued. The CSV download and the PDF label columns and enum values in it. Absent for API keys and system runs, whose CSV keeps the snake_case column keys and raw values.

um de pt-MZ, en-US

row_countinteger · obrigatório
download_urlstring · opcional
error_messagestring · opcional
started_atstring (date-time) · opcional
completed_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
has_moreboolean · opcional
next_cursorstring · opcional

Erros 403

Permissões reports:read · Funções: admin, analyst, finance, owner

curl -X GET "$BUSINESS_API/executions" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    {
      "id": "rep_2PJiWXxcUzzWiDtIAPJaoNNWqNF",
      "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
      "definition_id": "def_2dL2WhtIu5Vmo51mWVHA0zjwE3L",
      "triggered_by": "triggered by",
      "status": "pending",
      "parameters": {},
      "locale": "pt-MZ",
      "row_count": 1,
      "download_url": "https://example.org/",
      "error_message": "error message",
      "started_at": "2026-11-19T09:30:00Z",
      "completed_at": "2026-11-19T09:30:00Z",
      "created_at": "2026-11-19T09:30:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "next cursor"
}

Executar um relatório

Registos

POST /executions

Requires reports:execute. Execution records are private to their utility tenant.

Corpo application/json

definition_idstring · obrigatório
parametersobject · opcional

Devolve

202 Report execution started

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
definition_idstring · obrigatório
triggered_bystring · opcional
statusstring · obrigatório

um de pending, running, completed, failed

parametersobject · obrigatório
localestring · opcional

The requester's language, captured when the export is queued. The CSV download and the PDF label columns and enum values in it. Absent for API keys and system runs, whose CSV keeps the snake_case column keys and raw values.

um de pt-MZ, en-US

row_countinteger · obrigatório
download_urlstring · opcional
error_messagestring · opcional
started_atstring (date-time) · opcional
completed_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório

Erros 403 · 404

Permissões reports:execute · Funções: admin, analyst, finance, owner

curl -X POST "$BUSINESS_API/executions" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "definition_id": "def_2dL2WhtIu5Vmo51mWVHA0zjwE3L",
  "parameters": {}
}'
Resposta 202
{
  "id": "rep_2PJiWXxcUzzWiDtIAPJaoNNWqNF",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "definition_id": "def_2dL2WhtIu5Vmo51mWVHA0zjwE3L",
  "triggered_by": "triggered by",
  "status": "pending",
  "parameters": {},
  "locale": "pt-MZ",
  "row_count": 1,
  "download_url": "https://example.org/",
  "error_message": "error message",
  "started_at": "2026-11-19T09:30:00Z",
  "completed_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z"
}

Obter uma execução de relatório

Registos

GET /executions/{id}

Returns one report run, which can be polled until its status is completed or failed. A completed run carries row_count and a download_url for the CSV export; the PDF rendering is available at /exports/{id}.pdf. Returns 404 when the run is not in the tenant. Requires the reports:read permission.

Parâmetros

idstring · caminho · obrigatório

Identifier of the report execution within the current tenant.

Devolve

200 Report execution details

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
definition_idstring · obrigatório
triggered_bystring · opcional
statusstring · obrigatório

um de pending, running, completed, failed

parametersobject · obrigatório
localestring · opcional

The requester's language, captured when the export is queued. The CSV download and the PDF label columns and enum values in it. Absent for API keys and system runs, whose CSV keeps the snake_case column keys and raw values.

um de pt-MZ, en-US

row_countinteger · obrigatório
download_urlstring · opcional
error_messagestring · opcional
started_atstring (date-time) · opcional
completed_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório

Erros 403 · 404

Permissões reports:read · Funções: admin, analyst, finance, owner

curl -X GET "$BUSINESS_API/executions/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "rep_2PJiWXxcUzzWiDtIAPJaoNNWqNF",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "definition_id": "def_2dL2WhtIu5Vmo51mWVHA0zjwE3L",
  "triggered_by": "triggered by",
  "status": "pending",
  "parameters": {},
  "locale": "pt-MZ",
  "row_count": 1,
  "download_url": "https://example.org/",
  "error_message": "error message",
  "started_at": "2026-11-19T09:30:00Z",
  "completed_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z"
}