Open app

Export

Download stored metrics as one file. The file is streamed to you as it is written.

GET/v1/export

Export covers metrics. To pull events, use the Events API.

Query params

ParamExampleDescription
sourcesrobot-01,robot-02Comma-separated device ids. Required. 1 to 50.
metricsbattery.voltage,motor.rpmComma-separated metric names. Up to 500. Omit for all metrics.
start2026-09-18T00:00:00ZStart of the range. ISO 8601 or Unix milliseconds. Required. An ISO time with no offset is read as UTC.
end2026-09-25T00:00:00ZEnd of the range. Same formats. Required, and must be after start.
resolutionraw, 1m, 1hraw (default) is every stored point. 1m and 1h are the rollups.
formatcsv, parquetFile format. Default csv.
estimate1Return a row count as JSON instead of the file.

Example

curl -o robot-01.csv \
  "https://api.plexus.company/v1/export?sources=robot-01&start=2026-09-18T00:00:00Z&end=2026-09-25T00:00:00Z" \
  -H "x-api-key: YOUR_API_KEY"

Response

A file, sent as an attachment named plexus-export-<start day>-<end day>.csv (or .parquet). Rows are ordered by source, then metric, then time.

resolutionColumns
rawtimestamp, source, metric, value, tags
1m, 1htimestamp, source, metric, min, max, avg, count
  • timestamp is UTC. In CSV it is ISO 8601 with milliseconds, like 2026-09-25T12:00:00.000Z. In Parquet it is a millisecond timestamp column.
  • tags is a JSON object written as a string.
  • The CSV has a header row. Parquet files are compressed with zstd.
  • The 1m rollup is kept for 90 days and the 1h rollup for 5 years, so an older range returns rows only at 1h.

Estimate first

Add estimate=1 to see how many rows an export would return, without downloading it:

curl "https://api.plexus.company/v1/export?sources=robot-01&start=2026-09-18T00:00:00Z&end=2026-09-25T00:00:00Z&estimate=1" \
  -H "x-api-key: YOUR_API_KEY"
{
  "rows": 1234,
  "start": "2026-09-18T00:00:00.000Z",
  "end": "2026-09-25T00:00:00.000Z",
  "clamped": false
}

start is the start actually used. clamped is true when your plan's history limit moved it.

Limits

  • History by plan. Free reads its last 7 days. If start is earlier than that, Plexus moves it up and returns the start it used in the X-Plexus-History-Start response header. A range that ends before the limit returns a file with no rows.
  • 3 exports at once per org. A 4th gets 429 with Retry-After: 30.
  • 120 requests a minute per key, shared with the rest of the API.
  • 300 seconds per export. For a long range, export it in pieces.
  • Device ids and metric names can be at most 256 characters each.

Errors

Export errors are { "error": "...", "message": "..." }.

StatuserrorWhen
400invalid_paramsA missing or bad parameter. message says which.
401unauthorizedMissing or invalid API key.
402payment_requiredAPI access is turned off for the org because of a billing problem.
404source_not_foundA device id in sources has no stored data in your org. message lists them.
429rate_limitedOver 120 requests a minute for this key.
429too_many_exports3 exports are already running for the org.

Both 429s carry a Retry-After header in seconds.