Documentation

Audit log export

Get admin activity into your SIEM without downloading a CSV: a push export to your bucket or collector, or a paginated API for your own poller.

Two ways to get audit events out

Both are available on the Scale plan and every Custom plan, the same plans as the audit log in the console. Organization owners and admins set them up in the console under Organization settings → Audit log export.

If your plan changes to one without the audit log, the API answers 403 upgrade_required and the export pauses. The export keeps its place and resumes where it stopped when the plan allows it again.

What an event looks like

Every destination, and the API, carries the same JSON object per event as the console's audit log:

JSON
1{
2 "id": "0193a4f2-6c1e-7b7a-9d1e-5f2b8c3a4d10",
3 "inserted_at": "2026-11-25T10:00:00.123456Z",
4 "category": "security",
5 "action": "security.admin_key_created",
6 "result": "success",
7 "summary": "Created admin key",
8 "high_risk": true,
9 "actor_type": "user",
10 "actor_email": "[email protected]",
11 "actor_source": "console",
12 "actor_label": "Ana Lima",
13 "project_id": null,
14 "project_name": null,
15 "target_type": "organization_admin_key",
16 "target_id": "0193a4f2-6b00-7c11-8e2a-1a2b3c4d5e6f",
17 "target_label": "siem-poller",
18 "metadata": {"scopes": ["audit:read"], "expires_at": null},
19 "ip_address": "203.0.113.7",
20 "user_agent": "Mozilla/5.0 ..."
21}
FieldMeaning
idStable event ID. The same event always has the same id; use it to remove duplicates.
inserted_atWhen the event was recorded, ISO 8601 in UTC with microseconds.
category, actionWhat happened, for example security / security.admin_key_created.
resultsuccess or failure.
summaryOne line for people to read.
high_risktrue for actions worth alerting on (keys, exports, roles, SSO).
actor_type, actor_email, actor_source, actor_labelWho did it and from where (console, API key, system).
project_id, project_nameThe project, when the action belongs to one.
target_type, target_id, target_labelWhat the action changed.
metadataAction-specific details. Secrets are never included.
ip_address, user_agentThe client that made the request, when there was one.

Fields are only ever added, never renamed or removed, so a parser you write today keeps working.

Delivery semantics

  • Freshness. The export runs every minute and sends events that are at least 90 seconds old, so an event normally arrives within about three minutes. The delay makes sure an event recorded slightly late is never skipped.
  • Order. Events are sent oldest first, in batches of at most 500 events and 1 MB.
  • At least once. A batch that fails is sent again, with the same events and the same X-ModelRiver-Batch-Id. Over HTTPS a receiver can occasionally get a batch twice: when it accepted the batch but the answer never reached ModelRiver (a timeout, for example). Remove duplicates on the event id. S3 never has duplicates: a retried batch overwrites the same object key.
  • Retries. Timeouts, connection errors, HTTP 408, 429 and 5xx are retried with exponential backoff. A Retry-After header (in seconds) from your endpoint is respected. Other 4xx answers, such as a rejected token, are not retried until you fix the configuration.
  • Pause after a day of failures. After 24 hours without a successful delivery, the export pauses and organization owners and admins get an email. Nothing is skipped: once you fix the destination and resume, delivery continues from the last event that was delivered.
  • Gaps. If the export's position falls behind your plan's retention (for example after a long pause), the next batch starts with a gap record for that time range. Treat it as a possible gap: events in the range may have been deleted by retention before they were exported, or there may simply have been none (an organization with no activity for longer than its retention gets one too).
JSON
1{"record_type": "export.gap", "id": "gap_<last-delivered-id>_<next-id>", "missing_from": "2025-11-01T00:00:00Z", "missing_to": "2025-11-03T00:00:00Z", "reason": "retention"}

The export never changes or deletes what it already delivered.

Verifying HTTPS deliveries

Every HTTPS request from the export, whatever the preset, carries:

HeaderValue
X-ModelRiver-TimestampUnix time in seconds when the request was signed.
X-ModelRiver-SignatureLowercase hex HMAC-SHA256 of <timestamp>.<raw body>, keyed with the export's signing secret.
X-ModelRiver-Batch-IdThe batch ID. It is the same on every retry of the batch.

The signing secret is shown once, when you create the HTTPS export or rotate the secret. It starts with mr_sig_. To verify a request:

  1. Read the raw request body as bytes, before any JSON parsing.
  2. Compute hex(HMAC-SHA256(signing_secret, timestamp + "." + raw_body)).
  3. Compare it to X-ModelRiver-Signature in constant time.
  4. Reject the request if the timestamp is more than 5 minutes from your clock.

Unlike webhook signatures, the whole raw body is signed.

Python:

PYTHON
1import hashlib
2import hmac
3import time
4 
5 
6def verify(secret: str, timestamp: str, signature: str, raw_body: bytes) -> bool:
7 if abs(time.time() - int(timestamp)) > 300:
8 return False
9 expected = hmac.new(
10 secret.encode(), timestamp.encode() + b"." + raw_body, hashlib.sha256
11 ).hexdigest()
12 return hmac.compare_digest(expected, signature)

Node.js:

JAVASCRIPT
1const crypto = require('node:crypto');
2 
3function verify(secret, timestamp, signature, rawBody) {
4 if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
5 const expected = crypto
6 .createHmac('sha256', secret)
7 .update(`${timestamp}.`)
8 .update(rawBody) // a Buffer with the exact bytes received
9 .digest('hex');
10 const given = Buffer.from(String(signature));
11 return given.length === expected.length && crypto.timingSafeEqual(given, Buffer.from(expected));
12}

Splunk HEC and Datadog check their own token and don't read these headers. Verify them when you put your own proxy or function in front of the collector.

To rotate the secret, choose Rotate signing secret on the export page. The new secret is used for the next request. Update your receiver right away, or accept both secrets for a few minutes.

Troubleshooting

The export page shows the last error. Each error names the HTTP status, never your token or the response body.

Last errorWhat to check
Endpoint answered HTTP 401: credentials were rejected (or 403)The token or API key is wrong, revoked or lacks permission. Save a new one.
Endpoint answered HTTP 404: endpoint not foundThe URL path. Splunk needs /services/collector/event.
Endpoint answered HTTP 400: request rejectedSplunk: indexer acknowledgement is on for the token (turn it off), or the token's allowed indexes exclude its default index.
Endpoint answered HTTP 413: payload too largeA proxy in front of your collector limits bodies under 1 MB. Raise it to at least 1 MB.
Endpoint answered HTTP 3xx: redirects are not followedUse the final URL. Redirects are never followed.
Endpoint not allowed: URL must use HTTPS / URL host is not allowedThe URL must be https:// and its host must resolve to public addresses only.
Endpoint host could not be resolvedDNS for the host. This is retried.
Request timed out / Connection failedFirewall rules, and that the endpoint presents a certificate from a public CA (self-signed certificates are refused).
Endpoint answered HTTP 429 or 5xxYour collector is overloaded or down. This is retried.

Send test on the export page sends one batch with a single event whose action is export.test. It doesn't move the export's position.

Self-hosted installs

The export connects only to the destination you configure. The URL goes through the same checks as webhooks: HTTPS, public addresses only, pinned to the checked address, no redirects. To reach a collector on your own network, list it in ALLOWED_INTERNAL_HOSTS. See selfhost/EGRESS.md.