Importing log history
Migrations import old logs through the normal ingest endpoint with one
extra header (token needs the logs:import scope):
curl -X POST https://api.spawnbase.gg/api/v1/logs \ -H "Authorization: YOUR_TOKEN" \ -H "X-Spawnbase-Import: 1" \ -H "Content-Type: application/json" \ -d '[{"traceId":"old-id-1","timestamp":"2025-01-01T10:00:00Z","level":"info","message":"historical"}]'Differences from live ingest:
- Original
timestampis kept (required — entries without one are rejected; future beyond 5 min is400). Batches up to 100 entries / 5 MB. traceIdis required per entry and deduped per team — re-running an import is a no-op for entries already in.- Response adds counts:
{ "status": "ok", "data": { "accepted": 90, "skipped": 10 } }. - Imported rows expire from the import date + plan retention, not from their original date, so yesterday’s purge never eats last year’s history.
The migration wizard drives this for you.