v1

latestOpenAPI 3.0.02026-07-2455104.8 MB
Report

Execute report query

Execute a stored report query synchronously and get result table. The number of records that you receive as results is limited to a reasonable amount (currently 5000 records). This endpoint is mainly for viewing the data. Use the export endpoints in order to fetch all results.

post/api/v1/analytics/report/{id}/query

Path parameters

idstring required

Resource identifier.

Example:17

The resource's identifier.

Query parameters

previewboolean

If true, only a limited amount of records will be returned, but the request does not cost any credits. If true, all results are returned up to a max number of 500 rows.

Request body

Example request

{
  "parameters": [
    {
      "name": "date",
      "type": "string",
      "defaultValue": "2021-01-01"
    }
  ]
}

Response

Query response

Example response

{
  "data": {
    "header": [
      "id",
      "name"
    ],
    "rows": [
      [
        "1",
        "Alice"
      ],
      [
        "2",
        "Bob"
      ]
    ]
  },
  "meta": {
    "query": "SELECT * FROM users",
    "executionTime": 0.123,
    "totalResults": 2,
    "columnTypes": [
      "integer",
      "string"
    ]
  }
}