Skip to main content
POST
/
data
/
projects
/
{projectId}
/
queries
/
{queryId}
/
exports
curl --request POST \
  --url https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/{queryId}/exports \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "format": "CSV",
  "columns": [
    "id",
    "created",
    "amount"
  ]
}
'
{
  "id": "4c9fcb44-126a-45f8-99a0-f1d245083d78",
  "status": "PENDING"
}

Authorizations

Authorization
string
header
required

Use the Authorization header with the value 'Bearer ' to authenticate. Partner API Keys have full access; Project API Keys are limited to their project scope. Learn more: https://docs.peaka.com/api-reference/authentication

Path Parameters

projectId
string
required

ID of the Project

queryId
string
required

ID of the Query

Body

application/json

Export options

Async export request. The job is accepted (202) and runs in the background; the result is downloaded via presigned URLs returned by the status endpoint.

format
enum<string>
default:CSV

Output format

Available options:
CSV,
JSONL
Example:

"CSV"

limit
integer<int32>

Row limit; clamped to [1, 1000000]

Example:

100000

csvOptions
object

CSV formatting options (ignored for JSONL exports)

includeSystemColumns
boolean
default:true

When false, Peaka system columns (_id, _version, …) are excluded. Cache plumbing columns (q, cache) are always dropped.

Example:

true

columns
string[]

Explicit column selection; an unknown name yields 400. Omit to export all columns.

Explicit column selection; an unknown name yields 400. Omit to export all columns.

Example:
["id", "created", "amount"]
compression
enum<string>
default:NONE

Output compression; with GZIP every artifact is a gzip stream carrying a .gz suffix

Available options:
NONE,
GZIP
Example:

"NONE"

Response

202 - application/json

Export job accepted

Acknowledgement returned when an export job is accepted

id
string

Export job id

Example:

"4c9fcb44-126a-45f8-99a0-f1d245083d78"

status
string

Initial job status

Example:

"PENDING"