Docs/Guides/Infraction Importing
Infraction Importing
Bring another bot's moderation history into HepBoat over the API.
Requires the WEB_API feature and an API key with the import scope.
If your server has years of history in another bot, import it: searches, escalation decisions and appeals all get better when the past is on the record.
The shape
Import is a bulk API endpoint that accepts JSON arrays of historical
infractions - type, target, moderator, reason, timestamps, and (for timed
actions) expiry. Imported records are numbered into your server's sequence.
To keep provenance, put your own marker in each record's metadata (for
example {"source": "old-bot"}) - the API stores it verbatim, and nothing
is added for you.
The process
- Export from your old bot (most can produce JSON or CSV; massage it to the import shape).
- Create an API key with the
importscope on the dashboard's API page. - POST batches to the import endpoint - the exact body shape, batch size, and quota rules are in the Web API reference.
- Spot-check with
!infractions searchagainst members whose history you know.
Send one batch at a time and wait for each response before sending the next. An import is a single request rather than a queued job, so a connection lost mid-import can leave part of that batch already written. If one fails, check what actually landed before retrying - sending the same batch twice inserts it twice.
Getting your data out again
The same page issues export-scoped keys; export produces the complete
infraction set as JSON. Your data stays yours in both directions.