Download web events as a file
/api/web-events/downloadReturns the web events matching the given query as a downloadable file in the
requested format (txt, ndjson, yaml or csv).
A single export is capped at 5000 web events. 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 events, the export carries the first 5000 in result-set
order; there is no CLI equivalent for web events, so a larger export has to be taken
as several narrower queries.
The events are the same ones POST /api/web-events returns for the same query.
Web-event retrieval does not sample, so no sampling has to be disabled for the file to
be the query's whole result set.
The response is streamed as pages are retrieved and therefore carries no
Content-Length. Because the response headers are committed before the first event
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.
Sample request1234567891011121314151617curl --request POST 'https://api.eu-west-1.aws.dash0.com/api/web-events/download' \--header "Authorization: Bearer ${DASH0_AUTH_TOKEN}" \--header 'Content-Type: application/json' \--data-raw '{"timeRange": {"from": "now-10m","to": "now"},"format": "txt","filter": [{"key": "service.name","operator": "is","value": "shop"}]}'
Request body required
Request for the WebEventsDownload API. Accepts the same query as GetWebEvents
(serviceName, eventNames, filter, timeRange, dataset, ordering) and
returns the matching web events 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 events, capped at 5000. Unlike the log and span exports there is no
adaptive sampling to disable — web-event retrieval does not sample — so an exported
file is the query's whole result set up to the cap.
There is no Dash0 CLI command for web events, so the cap is the only limit; a query matching more than 5000 events has to be narrowed to be exported in full.
A range of time between two time references.
Optional dataset to query across. Defaults to whatever is configured to be the default dataset for the organization.
The ordering criteria for the exported web events. Events are written to the file
in this order.
Supported ordering key: otel.log.time (event timestamp, defaults to descending),
optionally followed by dash0.web.event.id ascending, which is the tiebreak
web-event retrieval appends to keep its cursor stable.
The serialization format of the exported file.
txt: One rendered line per web event, carrying a fixed field set of timestamp, service, event name, title, duration and trace ID. Ignorescolumns.ndjson: One OTLP JSON payload per line, each carrying a single web event inside the sameresourceLogsenvelopeGetWebEventsreturns — web events are stored as OTLP log records — so each line is independently parseable by any OTLP JSON consumer.yaml: The same per-event OTLP payloads asndjson, as a multi-document YAML stream with documents separated by---.csv: A header row plus one row per web event, flattened to the requestedcolumns.
"txt""ndjson""yaml""csv"The maximum number of web events to export. Defaults to, and is capped at, 5000. A larger value is rejected rather than silently clamped.
Attribute keys to emit as columns, in order, for the csv format — resource,
scope, or event attributes (e.g. service.name, event.name,
dash0.web.event.duration). Ignored by the other formats, which have a fixed
field set.
Responses
The exported web events. The body's actual content type matches the requested
format (text/plain for txt, application/x-ndjson for ndjson,
application/yaml for yaml, text/csv for csv).
"binary"Response headers
Content-Type"text/csv"Content-Disposition"attachment; filename=\"web-events-2026-07-27T10-15-00Z.csv\""