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.
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
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
project | query | string | Yes | The project the call is about. Every route is scoped to one. |
Pod-Organisation | header | string | No | The organization, for a person who belongs to several. An API key's organization is its own, and a different one here is forbidden. |
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
from | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
to | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
format | "ocsf" | "otlp" | Yes | ocsf: OCSF events as JSON lines. otlp: OpenTelemetry log records as OTLP JSON. |
sandbox | string | No | Only this sandbox's rows. |
Answer
202. The export, started.
{
"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
}| Field | Type | Always | What it is |
|---|---|---|---|
id | string | Yes | |
state | "running" | "ready" | "failed" | Yes | |
format | "ocsf" | "otlp" | Yes | ocsf: OCSF events as JSON lines. otlp: OpenTelemetry log records as OTLP JSON. |
from | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
to | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
sandbox | string | null | Yes | |
rows | integer | null | Yes | At least 0. |
chain_heads | ChainHead[] | Yes | |
download_url | string | null | Yes | Once ready, where to fetch the file, signed and short-lived. |
expires_at | string | null | Yes | |
created_at | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
created_by | string | Yes | Who made a change. An identity account id for a person, or a key id (key_…) for an API key. |
problem | string | null | Yes | Why 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.