Skip to main content
GET
Export table, view, or materialized-view data to CSV, TSV, NDJSON, or XLSX.

Authorizations

Authorization
string
header
required

Bearer JWT token or API Key (sk-*).

Path Parameters

databaseId
string
required

Provide a database, view, or materialized-view resource ID.

Query Parameters

jsonPreview
boolean

Return bounded JSON previews for grid presentation. Full values remain available through normal reads.

Example:

true

jsonPreviewBytes
number

JSON preview budget per cell; the server also applies a page budget.

Required range: 256 <= x <= 65536
Example:

2048

jsonPreviewHash
string

Read one complete JSON cell only if its preview fingerprint still matches. Requires take:1 and exactly one selected JSON column.

Pattern: ^[a-f0-9]{64}$
Example:

"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

skip
number

Number of rows to skip before pagination starts. Parsed from a query-string integer.

Required range: x >= 0
Example:

0

take
number

Maximum number of rows to return. Parsed from a query-string integer. Most list endpoints default to 100 when omitted.

Required range: 0 <= x <= 10000
Example:

100

count
boolean

Include the total count in the response envelope only when explicitly true. Omitted or false skips the count query.

Example:

true

filter
string

Filter tree as a JSON string or bracket-style query object. Supports and/or/not groups and field predicates with ops such as eq, ne, gt, gte, lt, lte, like, notLike, ilike, notILike, in, notIn, any, isNull, isNotNull, between, contains, containedBy, arrayHas, arrayHasAny, arrayHasAll, arrayContainedBy, jsonArrayHas, jsonArrayHasAny, jsonArrayHasAll, startsWith, endsWith, true, and false. Field names are allowed logical fields; relation fields use dot paths such as groups.groupId when exposed by the endpoint.

Example:

"{\"and\":[{\"field\":\"name\",\"op\":\"ilike\",\"value\":\"Ops\"},{\"field\":\"deletedAt\",\"op\":\"isNull\"}]}"

sort
string

Sort definition as a JSON string, indexed array query object, array, or legacy CSV. JSON object values should be ASC or DESC. CSV supports descending fields with a leading dash, for example name,-lastUpdateAt.

Example:

"{\"name\":\"ASC\",\"lastUpdateAt\":\"DESC\"}"

distinct
string

Optional DISTINCT ON logical fields as a JSON array string, indexed array query object, array, or legacy CSV. Selected distinct fields are included in the projection.

Example:

"category,global"

fields
string

Optional field projection as a JSON array string, indexed array query object, array, or legacy CSV. String fields must be allowlisted logical fields. Advanced select items may use field, fn, raw, cast, coalesce, or case expressions when the endpoint enables dynamic projection.

Example:

"[\"databaseId\",\"name\",{\"fn\":\"COUNT\",\"args\":[\"users.userId\"],\"as\":\"userCount\",\"filterType\":\"number\"}]"

joins
string

Optional join definitions as a JSON string or bracket-style query object. This is only honored by endpoints that explicitly enable dynamic joins, such as dynamic database data reads. Each join has table, alias, type (left or inner), and an on condition.

Example:

"[{\"table\":\"groups_users\",\"alias\":\"gu\",\"type\":\"left\",\"on\":{\"left\":\"gu.groupsGroupId\",\"op\":\"=\",\"right\":\"g.groupId\"}}]"

groupBy
string

Optional groupBy logical fields as a JSON array string, indexed array query object, array, or legacy CSV. Only honored when the endpoint enables dynamic grouping or already has grouped defaults.

Example:

"[\"category\",\"global\"]"

cast
string

Optional cast mapping as a JSON string or bracket-style query object. Keys are selected aliases or logical fields; values are database definition types such as TEXT, INTEGER, BIGINT, NUMERIC, BOOLEAN, DATE, TIMESTAMP, TIMESTAMPTZ, JSON, JSONB, or UUID where supported.

Example:

"{\"userCount\":\"INTEGER\"}"

with
string

Optional CTE definitions as a JSON string or bracket-style query object. Only honored by endpoints that explicitly enable dynamic CTEs.

Example:

"[{\"name\":\"active_groups\",\"query\":{\"from\":{\"table\":\"groups\",\"alias\":\"g\",\"definition\":[]}}}]"

join
string

Legacy dynamic database join map as a JSON string or bracket-style query object. Keys are related logical database names or database IDs. Values must be [rootColumn, joinedColumn, joinType], where joinType is left or inner. Prefer the newer joins array for new integrations.

Example:

"{\"orders\":[\"customerId\",\"customerId\",\"left\"]}"

debug
enum<boolean>

Exports do not support diagnostic mode. Use a data-read operation to preview the read plan.

Available options:
false
Example:

false

format
enum<string>
default:csv

Output format. CSV remains the default; XLSX uses the native streaming Storage writer.

Available options:
csv,
tsv,
ndjson,
xlsx
Example:

"xlsx"

compress
boolean
default:false

Stream the selected format into a gzip archive. The Storage file name ends in .gz.

Example:

true

prepareForRead
enum<string>

Prepare a compressed export for indexed reads. Requires compress:true. Sync waits for preparation. Async queues preparation after saving the archive. Omit for on-demand preparation.

Available options:
sync,
async
Example:

"async"

retention
object | null

Export file retention. Omit for the destination default, set null for no expiration, or provide exactly one of ttlSeconds and expiresAt.

Example:
delimiter
string

CSV field delimiter. Defaults to a comma and must contain fewer than 10 characters.

Example:

"|"

boolType
enum<string>

CSV boolean representation.

Available options:
emoji,
number,
boolean
Example:

"boolean"

emptyNull
boolean

Write null values as empty CSV fields instead of the string null.

Example:

true

encodedJson
boolean

Base64-encode JSON and JSONB values in the CSV output.

Example:

false

storageDestination
string

Optional storage destination. Omit to retain the private per-user export namespace, use ROOT for the explorer root, or provide an accessible explorer folder storageEntryId.

Example:

"ROOT"

fileName
string

Dedicated export file name. Path separators are not allowed. Omit to generate a database-and-timestamp name with the selected format extension.

Example:

"contracts-full.xlsx"

restricted
boolean
default:true

Whether the exported storage entry is restricted. Defaults to true. Restricted ancestors still apply when exporting into a folder.

Example:

false

groups
string[]

Explicit allowed group ids for the exported storage entry when restricted is true.

Example:
users
string[]

Explicit allowed user ids for the exported storage entry when restricted is true.

Example:
async
boolean
default:true

Run asynchronously and return after queue admission. Set false to keep the HTTP request open until the Storage entry is finalized.

Response

Export completed.