Skip to content

Export events to a file

View as Markdown

You need a streamview page that shows events from a broker, a file, HTTP, or streamview demo.

The file has one CloudEvent on each line. This format has the name NDJSON.

  1. Make the view that you want to save. Zoom in to a time range, select a set, or add filters.
  2. Click the button with three dots at the top right.
  3. Click Export events. A dialog opens.
  4. Select a time range: Current view, Last 30 seconds, Last 5 minutes, Last hour, or All events.
  5. Click Export.

The dialog shows the number of events for each time range.

The browser saves a file. Its name contains the time of the first event and the time of the last event, for example streamview-2026-12-02T16-37-18Z-to-2026-12-02T16-38-17Z.ndjson.

The set and the filters of the view apply to each time range. The file contains only these events:

  • Events in the time range that you selected.
  • Events of the channels in the selected set.
  • Events that match the filters.

The events are in the sequence of their time. The page then shows the number of events that it saved.

You cannot select a time range that has more than 100,000 events. Zoom in or add a filter, and then export Current view.

Start streamview with the file. For example, do this to look at the events of a bug report.

streamview serve streamview-export.ndjson --port 4800

The events keep their original times. To see them, click the time range button, and then click All.

Send the file to POST /events of a streamview server, or to an endpoint of your service that reads NDJSON.

curl -X POST --data-binary @streamview-export.ndjson http://localhost:4747/events

streamview ignores an event that it has already, because the source and the id are the same.