Export Dataset
POST
/v1/datasets/{dataset_id}/export
const url = 'https://example.com/v1/datasets/example/export';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"format":"csv","path":"example","connection_id":"example","include_row_id":false,"sql":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”dataset_id
required
Dataset Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ExportRequest
object
format
required
Format
string
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
include_row_id
Include Row Id
Keep __row_id, rowlab’s row number.
boolean
Responses
Section titled “Responses”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>
ValidationErrorobject
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": {} } ]}