Export
Export metadata for a specific data slice or the entire data connector, in JSON, CSV or JSONL format.
Request Body
| Field | Type | Description |
|---|---|---|
datasource_id | UUID | Id of the data connector to export metadata from. |
dataslice_id | Optional[str] | ID of the dataslice to export metadata from. If omitted, all data is included. |
export_file_level | bool | True for file-level export, False for chunk-level export. |
export_format | Optional[ExportFormat] | Desired export format: json, csv or jsonl. |
selected_tag_ids | Optional[List[str]] | Ids of the tags to include in the export. |
export_level | Optional[ExportLevel] | Scope of the tags to export: file, chunk or both. Read by jsonl; json/csv keep using export_file_level. |
export_content | ExportContent | metadata (tag values), nodes (chunk text) or both (default: metadata). |
export_chunk_text | bool | Include each chunk’s text. Requires jsonl. |
Response
- 200: Metadata exported successfully
- Returns: A streaming file response containing the exported metadata in the requested format.
- 400: Chunk text was requested in a format that cannot carry it, or the request selects nothing to export.
- 500: Internal Server Error
Notes
jsonl emits one JSON object per line: one line per chunk when chunk text or chunk tags
are in scope ({"filename", "chunk_id", "text"?, "tags"?, "file_level_tags"?}), otherwise
one line per file ({"filename", "tags"}). Chunk text is JSONL-only — CSV would have to
escape every newline in the text into a cell, and JSON would buffer the whole export.
Example
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
Download request for a dataslice's metadata and/or chunk text.
Two fields can ask for chunk text: export_content (the current vocabulary,
shared with the destination export request) and export_chunk_text (the older
bool). export_chunk_text is deprecated. Precedence, stated once and
implemented in export_data_slice: chunk text is included if either asks for
it, so a client that sets only the deprecated flag keeps working. New clients
should send export_content alone.
json, csv, jsonl file, chunk, both What a download carries: tag values, the chunk text itself, or both.
metadata, nodes, both Deprecated — use export_content (nodes or both) instead. Chunk text is included if either this flag or export_content asks for it.
Response
Successful Response
