Retention
The Retention screen lets you define how long each kind of data is kept, run the retention now, erase the data of
a data subject (right to be forgotten) and place or release legal holds. Portal path: /data/retention. Data
stewards, security officers and tenant administrators use it.
What the screen shows
The header holds the Run retention now button; its JSON report appears under the header after a run.
Three tabs:
- Policies: the Retention policies table with Resource type, TTL (days), Action, Enabled,
Updated. The New policy form has Resource type (required:
sessions,memory,media,documents,usage_raw,telemetry), TTL (days) (required, 365), Action (required:eraseorarchive) and Enabled (checked). There is one policy per resource type: creating it again updates it. - Subject erasure: a form with Subject id (required), Reason (
gdpr_art_17), Dry run (checked) and Include documents, and its result panel. - Legal hold: a form with Resource type, Resource id, Subject id, Reason (required) and Active (checked), and its result panel.
Actions
| Button or action | What it does | API call | Roles |
|---|---|---|---|
| Run retention now | Applies every enabled policy now and shows the report | POST /v1/retention/run | tenant_admin, security_officer, data_steward |
| Refresh icon (Policies) | Reloads the policies | GET /v1/retention/policies | any tenant user |
| New policy > Create | Creates or updates the policy of a resource type | POST /v1/retention/policies | tenant_admin, security_officer, data_steward |
| Run (Subject erasure) | Erases, or simulates the erasure of, the data of a person | POST /v1/retention/erase | tenant_admin, security_officer, data_steward |
| Run (Legal hold) | Places a hold on a resource or a person; the data stops expiring | POST /v1/retention/legal-hold | tenant_admin, security_officer, data_steward |
Roles
The portal shows every button. The Control Plane
(services/control-plane/src/eai/domains/retention/__init__.py, constant ADMIN) accepts the writes only from
tenant_admin, security_officer and data_steward; others get forbidden. Every run, erasure and hold is
audited.
Typical tasks
Keep the sessions for one year
-
Create the policy. Without a policy, data is kept. Open Policies, click New policy, choose Resource type
sessions, TTL (days) 365, Actionerase, then Create.Expected result: the toast "Created" and the row in Retention policies.
If it fails:
invalid_requestwithresource_typelists the allowed types. -
Run it once. Click Run retention now.
Expected result: the toast "Done" and a report counting the processed items and the items skipped by a legal hold.
If it fails:
forbiddenmeans your role is not allowed to run retention.
Erase the data of a person
-
Simulate first. A dry run lists what would be erased without erasing. Open Subject erasure, type the Subject id, keep Dry run checked, then Run.
Expected result:
statusdry_runwith the counts indeletedandskipped_legal_hold.If it fails: check the subject id (the user id the platform records).
-
Erase. Uncheck Dry run, check Include documents if the documents created by the person must go too, then Run.
dangerWithout Dry run, the erasure cannot be undone. The audit trail and the financial usage records are kept by law; the answer lists them in
retained.Expected result:
statuscompleted.If it fails:
statusincompletemeans an external system did not erase; theexternalblock names it.
Freeze the data of a litigation
-
Place the hold. A hold stops retention and deletion. Open Legal hold, fill Subject id (or Resource type and Resource id), a Reason, keep Active checked, then Run.
Expected result: the hold record with
activetrue.If it fails:
invalid_requestwithrequiredmeans neither a subject nor a resource type and id were given.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
forbidden (403) with required_roles | Your role is not tenant_admin, security_officer or data_steward | Ask a data steward |
invalid_request (400) with resource_type | Unknown resource type | Use one of the allowed types |
invalid_request (400) with action | The action is not erase or archive | Choose erase or archive |
invalid_request (400) with required reason | A new hold needs a reason | Fill Reason |
not_found (404) with legal_hold | The hold id to release does not exist | Check the id of the hold |
A deletion elsewhere answers legal_hold (409) | A hold protects the item | Release it here with Active unchecked |