Export the record for a time range

Starts an export of the project's rows in a time range, in a standard security-log format, with the chain head of every sandbox in it so the customer can keep the heads and check the chain themselves.

POST/v1/records/exports

Starts an export of the project's rows in a time range, in a standard security-log format, with the chain head of every sandbox in it so the customer can keep the heads and check the chain themselves. Follow it with getRecordExport. A project that keeps its record past the 90 days (getRecordRetention) exports any range it keeps. Delivery to the project's own store is setRecordDelivery.

A key with the permissions:records scope.

Request

curl -X POST "https://api.pod.mapier.ai/v1/records/exports?project=example" \
  -H "Authorization: Bearer $POD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from":"2026-11-23T12:00:00.000Z","to":"2026-11-23T12:00:00.000Z","format":"ocsf"}'

Parameters

NameInTypeRequiredWhat it is
projectquerystringYesThe project the call is about. Every route is scoped to one.
Pod-OrganisationheaderstringNoThe organization, for a person who belongs to several. An API key's organization is its own, and a different one here is forbidden.
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Body

FieldTypeRequiredWhat it is
fromstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
tostringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
format"ocsf" | "otlp"Yesocsf: OCSF events as JSON lines. otlp: OpenTelemetry log records as OTLP JSON.
sandboxstringNoOnly this sandbox's rows.

Answer

202. The export, started.

202
{
  "id": "example",
  "state": "running",
  "format": "ocsf",
  "from": "2026-11-23T12:00:00.000Z",
  "to": "2026-11-23T12:00:00.000Z",
  "sandbox": null,
  "rows": null,
  "chain_heads": [
    {
      "sandbox": "example",
      "seq": 0,
      "hash": "example"
    }
  ],
  "download_url": null,
  "expires_at": null,
  "created_at": "2026-11-23T12:00:00.000Z",
  "created_by": "example",
  "problem": null
}
FieldTypeAlwaysWhat it is
idstringYes
state"running" | "ready" | "failed"Yes
format"ocsf" | "otlp"Yesocsf: OCSF events as JSON lines. otlp: OpenTelemetry log records as OTLP JSON.
fromstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
tostringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
sandboxstring | nullYes
rowsinteger | nullYesAt least 0.
chain_headsChainHead[]Yes
download_urlstring | nullYesOnce ready, where to fetch the file, signed and short-lived.
expires_atstring | nullYes
created_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
created_bystringYesWho made a change. An identity account id for a person, or a key id (key_…) for an API key.
problemstring | nullYesWhy it failed.

Errors

The refusals this call is known for: invalid, unauthorized, forbidden, rate_limited. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.