Skip to content

Export Dataset

POST
/v1/datasets/{dataset_id}/export
curl --request POST \
--url https://example.com/v1/datasets/example/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "format": "csv", "path": "example", "connection_id": "example", "include_row_id": false, "sql": "example" }'

Write the dataset as CSV, JSONL or Parquet to a file on the server, or to S3.

dataset_id
required
Dataset Id
string
Media typeapplication/json
ExportRequest
object
format
required
Format
string
Allowed values: csv jsonl parquet
path
required
Path

Where to write it: a file or folder on the server, or an s3://bucket/key. A folder, or an s3:// path ending in /, gets <name>.<format> in it.

string
connection_id
Any of:
string
include_row_id
Include Row Id

Keep __row_id, rowlab’s row number.

boolean
sql
Any of:
string

Successful Response

Media typeapplication/json
ExportResult
object
path
required
Path
string
size_bytes
required
Size Bytes
integer

Example generated

{
"path": "example",
"size_bytes": 1
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}