Download OTLP log records as a file

Returns the log records matching the given query as a downloadable file in the
requested format (txt, ndjson, yaml or csv).

A single export is capped at 5000 log records. A limit above that cap is
rejected rather than silently clamped: the response is a client error naming the cap.
When the query matches more than 5000 records, the export carries the first 5000 in
result-set order. Use the Dash0 CLI (dash0 logs query) to export larger volumes.

The records are the same ones POST /api/logs returns for the same query, except that
adaptive sampling is always disabled for exports: an exported file is never a sample,
whatever the query and whatever the data volume.

The response is streamed as pages are retrieved and therefore carries no
Content-Length. Because the response headers are committed before the first record
is written, a failure partway through cannot be reported as a status code — it
terminates the transfer instead. Clients MUST confirm the body was received completely
before treating the download as a successful export.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Request for the LogRecordsDownload API. Accepts the same query as GetLogRecords
(filter, timeRange, dataset, ordering) and returns the matching records
serialized as a downloadable file rather than as a JSON page.

The response is streamed, so the export is not paginated: a single request returns up
to limit records, capped at 5000. Adaptive sampling is always disabled for exports,
so an exported file is never a sample.

filter
array of objects
filter
timeRange
object
required

A range of time between two time references.

string
^[a-zA-Z0-9_-]{3,26}$

Optional dataset to query across. Defaults to whatever is configured to be the default dataset for the organization.

ordering
array of objects

The ordering criteria for the exported logs. Records are written to the file in
this order.
Supported ordering key: otel.log.time (log timestamp, defaults to descending)

ordering
string
enum
required

The serialization format of the exported file.

  • txt: One rendered log line per record, carrying a fixed field set of timestamp,
    severity, resource, body and trace ID. Ignores columns.
  • ndjson: One OTLP JSON payload per line, each carrying a single log record inside
    the same resourceLogs envelope GetLogRecords returns, so each line is
    independently parseable by any OTLP JSON consumer.
  • yaml: The same per-record OTLP payloads as ndjson, as a multi-document YAML
    stream with documents separated by ---.
  • csv: A header row plus one row per record, flattened to the requested columns.
Allowed:
int64
1 to 5000
Defaults to 5000

The maximum number of log records to export. Defaults to, and is capped at, 5000.
A larger value is rejected rather than silently clamped. Use the Dash0 CLI
(dash0 logs query) to export volumes beyond this cap.

columns
array of strings

Attribute keys to emit as columns, in order, for the csv format — resource,
scope, or log record attributes (e.g. service.name, otel.log.body). Ignored by
the other formats, which have a fixed field set.

columns
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/octet-stream
application/json