v1
latestOpenAPI 3.0.02026-07-2455104.8 MBQuery
Create query export
Create a query export. This starts a query execution. The query will be executed asynchronously. You can check the status of the query using the GET /api/analytics/query/export/{uuid} endpoint.
post/api/v1/analytics/query/export
Request body
Example request
{
"query": "SELECT * FROM users",
"settings": {
"exportFormat": "csv",
"delimiter": ","
},
"parameters": [
{
"name": "date",
"type": "string",
"defaultValue": "2021-01-01"
}
]
}Response
Query execution response
Example response
{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "pending",
"query": "SELECT * FROM users",
"url": "https://example.com",
"error": "SQL statement is invalid",
"exportFormat": "txt",
"createdAt": "2023-01-01T00:00:00+00:00",
"updatedAt": "2023-01-01T00:00:00+00:00"
}
]
}