App öffnen
Moonborn — API · admin

Run audit_log archive cron once (admin/cron entrypoint)

Archives audit_log entries older than AUDIT_ARCHIVE_CUTOFF_DAYS (default 365) to R2 (or filesystem when R2 env vars absent) as Ed25519-signed NDJSON manifests, then physically deletes them. Recommended cron cadence: `0 4 * * *` (04:00 UTC daily, after retention sweep at 03:00).

POST/v1/admin/audit/archivescope · Bearer (API key or session JWT)

Responses

200Archive run completed
403Forbidden — platform admin only
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
503Archive cron entry point not wired (env missing)
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring

Examples

cURL
curl -X POST https://api.moonborn.co/v1/admin/audit/archive \
  -H "Authorization: Bearer $MOONBORN_API_KEY"
TypeScript
import Moonborn from '@moonborn/sdk';

const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });

const result = await client.admin.adminRunAuditArchive();
Python
import os
from moonborn import Moonborn

client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])

result = client.admin.admin_run_audit_archive()