AurionAI Docs

Attachment Cleanup

Delete expired conversation attachments and S3 orphans. Issue #475. Runs daily (see infrastructure/kubernetes/*/jobs/attachment-cleanup-cronjob.yaml). Behaviour: - Reads ATTACHMENT_RETENTION_DAYS (default 365; 0 = unlimited, skips cleanup). - Fetches batches of aurion_conversation_attachments older than the retention window. - Deletes their storage files (S3 or local) then deletes the DB rows. - After retention cleanup, runs the S3 orphan reaper to remove objects with no DB row. - All deletions are written to audit_logs for GDPR traceability.

POST
/api/sync/attachment-cleanup

Delete expired conversation attachments and S3 orphans.

Issue #475. Runs daily (see infrastructure/kubernetes/*/jobs/attachment-cleanup-cronjob.yaml).

Behaviour:

  • Reads ATTACHMENT_RETENTION_DAYS (default 365; 0 = unlimited, skips cleanup).
  • Fetches batches of aurion_conversation_attachments older than the retention window.
  • Deletes their storage files (S3 or local) then deletes the DB rows.
  • After retention cleanup, runs the S3 orphan reaper to remove objects with no DB row.
  • All deletions are written to audit_logs for GDPR traceability.

Response Body

application/json

curl -X POST "https://loading/api/sync/attachment-cleanup"
{
  "results": {},
  "status": "completed"
}