Moonborn — API · admin
Process one pending DSAR export (admin/cron entrypoint)
GDPR §15 right of access. Atomically claims the oldest pending DSAR export, collects user-scoped data across 8 tables, uploads a JSON bundle to R2 (or filesystem in dev), and marks the export_jobs row completed with the signed URL + expiry. Idempotent: invoke repeatedly until response.handled=false to drain the queue.
POST/v1/admin/dsar/build-onescope · Bearer (API key or session JWT)
Responses
200Build attempt completed
403Forbidden — platform admin only
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
503DSAR build entry point not wired (env missing)
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
Examples
cURL
curl -X POST https://api.moonborn.co/v1/admin/dsar/build-one \ -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.adminBuildOneDsar();Python
import os from moonborn import Moonborn client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"]) result = client.admin.admin_build_one_dsar()