Skip to main content

Exports

What this is for

An export copies records out of the sandbox into a file you can keep, search or load into another tool. The file format is NDJSON (newline-delimited JSON): a plain text file where each line is one complete record. It is easy to read with a text editor and easy for programs to process line by line. This page is for exporting practice (test) data; live data is exported through the API.

Before you start

  • A test key (starts with clk_test_) with the Read scope. Create one on Access.
  • Any member can export sandbox data.
  • The sandbox must be running; otherwise the page says Sandbox coming soon.
  • Remember the limits: 5 exports per hour, up to 1,000 records of each type, and the whole export must fit in one response.

Run an export

1

Open Exports

Choose Exports in the sidebar. The page is titled Exports: “Export your sandbox records as NDJSON.” The card is headed Start an export.
2

Choose resource types

Under Resource types tick the kinds of record to include, such as Patient, Encounter or Observation. All ticks everything and None clears the choice. Patient is ticked to begin with. You must tick at least one.
3

Limit by date (optional)

Changed since (optional) picks a date; only records changed since then are included. Leave it empty to include everything.
4

Paste a test key

Paste the key into Test key. Beneath it: “The key is used for this request only and is not stored.”
5

Start

Select Start export (it reads Starting… while it runs). The button is disabled until at least one type is ticked and the key looks like a test key.
6

Download the file

A result box appears: “Export (id): completed” with the number of records, and a Download NDJSON button. Select it to save a file named after the export, ending in .ndjson.

What you’ll see

  • If no records matched: Nothing matched, so there is nothing to download.
  • Notes from the API are listed under the result. For example, a type that stopped at 1,000 records.
  • The page keeps no list of past exports. The result you see belongs to the export you just ran; download it before you leave.
  • If the sandbox is not up: Sandbox coming soon: “Exports from the console open together with the sandbox. Until then, exports are available through the API.”

Common questions

Open it in any text editor to read it. Each line is a complete JSON record, so you can load it line by line in a script, or import it into data tools that support NDJSON.
That is the sandbox limit per type. Narrow the date range and export in slices, or use the API.
No. The console uses test keys only. Use the API for live data; see Bulk operations.
The page does not keep them. An export is returned directly when it finishes, so download it straight away.
You may start 5 exports per hour. Wait for the hour to pass.

Troubleshooting