Keep the data map and run a personal data export
Register your collections in the data map, find the ones you missed, and request, check and download a personal data export.
Developers and superusers who add collections to Claviger and answer requests for a person's data.
Export, retention and erasure all read the data map. A collection that holds personal data and is not on the map is left out of all three.
What you will do, in one sentence
Map every collection, keep the unmapped list empty, then request the export and download the ZIP once.
Screens are captured from a seeded test system. Every name, address and number on the screens is invented. Prepared 15 November 2026.
1. What the data map is
The data map lists every collection and what it holds about people. It lives in the _dataMap system collection. Only superusers can see it. There is one row per collection.
| Field | Meaning |
|---|---|
collection | The collection name. |
treatment | What happens to the rows when a person is erased. |
subjectPaths | The fields that link a row to the person it is about, such as user. |
personalFields | The fields that hold personal data. |
retainReason | Why the rows are kept. Required for retain. |
note | Free text. |
The treatments are erase, anonymize, retain, export and none. Every treatment except none is included in an export. none means reviewed and holds no personal data. It is not the same as forgotten.
Collections that ship with Claviger already have a built-in entry. Even a superuser cannot change or delete them.
2. Map your own collections
Register an app collection as a normal record of _dataMap. The server checks it:
- The collection must exist.
retainneeds a reason.- Any treatment except
noneneeds a subject path.
To see what is still missing:
curl -H "Authorization: $TOKEN" https://auth.example.org/api/data-map/unmapped
{"totalItems": 1, "items": [{"name": "prayers", "type": "base", "system": false}]}
A collection that is not on the map is not exported, not retained and not erased. Check this route after every schema change.
3. What an export contains
An export is one ZIP file.
| File | Content |
|---|---|
manifest.json | When it was made, who it is about, row counts, skipped collections and why, errors, and files left out. |
README.txt | A short explanation for the person. |
data/<collection>.json | The rows about the person. |
files/<collection>/<record>/<file> | Files the person uploaded. |
Built-in collections use a fixed list of columns. Secrets, such as password hashes and passkey keys, are never exported. For your own collections, the export writes every field except password fields, token keys and fields whose name looks like a secret. Only the person's own rows are included.
Encrypted fields are exported decrypted. The key never leaves the server.
Files are included up to 100 MB each and 1 GB in total. A file over the limit is listed in the manifest and the request ends as partial. Request logs are not part of the export. The logs.maxDays setting removes them.
A person's pastoral notes are held back for review. See the pastoral notes guide.
4. Request an export
| Who | Route |
|---|---|
| A signed-in person, for themselves | POST /api/me/export |
| A superuser, for anyone | POST /api/gdpr/subjects/{id}/export |
A person needs proof that they are present. With a passkey, a fresh passkey assertion is needed. The response is 403 with code passkey_step_up_required until then. Without a passkey, the body carries the password: {"password": "..."}. A person with neither must ask an administrator. API keys cannot use these routes.
curl -X POST https://auth.example.org/api/gdpr/subjects/USER_ID/export \
-H "Authorization: $TOKEN"
The answer is 202 with the request, its state and a dueAt date 30 days away. A person has one export at a time, and a second request gets 409. Self-service is limited to 3 requests an hour.
5. Check and download
| Route | Use |
|---|---|
GET /api/gdpr/exports/{id} | State and counts. |
GET /api/me/exports | The person's own requests. |
GET /api/gdpr/exports | Superuser: all requests. Add ?subject=<id>. |
GET /api/gdpr/exports/{id}/download | The ZIP. |
DELETE /api/gdpr/exports/{id} | Cancel a queued request, or discard a finished file. |
States are queued, running, done, partial, failed, cancelled and expired.
After the ZIP is sent in full, the server deletes the file. A download that breaks halfway does not use it up. A finished export expires after 7 days by default. When a superuser makes the export for someone else, the superuser downloads it and passes it on. The person cannot fetch it through the API.
Limits live in Settings, then Data export, or in PATCH /api/settings under dataExport: maxFileMB, maxTotalMB, retentionDays, selfRequestsPerHour and adminRequestsPerHour.
Each step writes an audit entry: gdpr_export_request, gdpr_export and gdpr_export_download. They hold ids and counts, never content.
6. Quick reference card
Add a collection
- Add a
_dataMaprow with treatment and subject path. GET /api/data-map/unmappedmust be empty.
Export for a person
POST /api/gdpr/subjects/{id}/export.- Poll
GET /api/gdpr/exports/{id}. - Download once, within 7 days.
How long to keep and whether to give a person certain records are questions for your lawyer.