Skip to main content
POST
/
v2
/
data
/
export
curl --request POST \
  --url https://api.example.com/v2/data/export \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "export_paths": {
    "paths": [
      "/export/dir"
    ],
    "storage_config": {
      "bucket": "my_bucket",
      "credentials": {
        "access_key": "accesskey",
        "secret_key": "secretkey"
      },
      "options": {
        "allow_http": true,
        "endpoint": "http://127.0.0.1:8080",
        "region": null,
        "virtual_hosted_style": false
      },
      "storage_type": "S3"
    }
  },
  "format": "Parquet",
  "include_metrics": false,
  "max_row_groups_per_file": null,
  "mode": "multi_file",
  "row_group_size": 40000000,
  "target_file_size_bytes": null
}
'
{
  "code": 200,
  "data": {
    "export_result": {
      "average_uncompressed_row_group_size": 10000,
      "files": [
        "part-00000.parquet",
        "part-00001.parquet"
      ],
      "mode": "multi_file",
      "num_row_groups": 10,
      "output_prefix": "/export/dir",
      "total_row_count": 1000,
      "total_uncompressed_byte_size": 100000
    },
    "metrics": {
      "elapsed_time": 2.5,
      "rss_peak_bytes": 104857600
    }
  },
  "exception": null,
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Include the token in the Authorization header as 'Bearer '

Body

application/json

Export request including export destination (paths + optional storage_config for cloud storage) and export options (mode/row_group_size/etc). If you want to export data to a Cloud Storage, you need to provide the storage_type, bucket, credentials, and options.

export_paths
object
required

Export destination directory in paths (must contain exactly one directory). Keep using existing storage semantics via storage_config.

format
null | enum<string>
default:Parquet

File format to export. Currently only Parquet.

Available options:
Jsonl,
Parquet
include_metrics
boolean | null
default:false

Include detailed metrics such as peak memory in the response. Defaults to off.

max_row_groups_per_file
integer | null

Maximum number of row groups per part file for multi_file export. If set, this takes precedence over target_file_size_bytes.

Required range: x >= 0
mode
string | null
default:multi_file

Export mode. Defaults to multi_file.

Examples:

"multi_file"

"single_file"

row_group_size
integer | null
default:40000000

Row group size in bytes. Default is 40MB.

Required range: x >= 0
target_file_size_bytes
integer | null

Target parquet file size in bytes for multi_file export. Server may translate this to a row-group rollover threshold.

Required range: x >= 0

Response

Data successfully exported.

code
integer<int32>
required

HTTP status code.

Required range: x >= 0
success
boolean
required

Whether the request was successful.

data
object
exception
object