Skip to main content
POST
Run a full readable-relation export from a structured request.

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.

Body

application/json
count
boolean

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

Example:

true

filter
object

Structured QueryWrapper filter tree.

Example:

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

sort

Structured sort definition or ordered sort fields.

Example:

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

distinct
string[]

Structured distinct field selection.

Example:

"category,global"

fields
(string | object)[]

Selected plain or computed QueryWrapper fields.

Example:

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

joins
object[]

Structured dynamic database joins.

Example:

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

groupBy
string[]

Structured group-by field selection.

Example:

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

cast
object

Structured selected-field cast mapping.

Example:

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

with
object[]

Structured CTE definitions when the export source permits them.

Example:

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

debug
boolean

Enable QueryWrapper debug output for the request, including compiled SQL, bound params, and bounded EXPLAIN plans when the underlying query service supports it.

Example:

false

join
object

Legacy dynamic database join map.

Example:

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

format
enum<string>
default:csv

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

Available options:
csv,
xlsx
Example:

"xlsx"

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.

Last modified on September 23, 2026