Atlas
Admin — Audit Retention

Update audit retention policy

Sets or updates the audit retention policy. Retention period must be at least 7 days or null (unlimited).

PUT
/api/v1/admin/audit/retention

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "http://localhost:3001/api/v1/admin/audit/retention" \  -H "Content-Type: application/json" \  -d '{    "retentionDays": 90  }'
{
  "policy": {
    "orgId": "string",
    "retentionDays": 0,
    "hardDeleteDelayDays": 0,
    "updatedAt": "string",
    "updatedBy": "string",
    "lastPurgeAt": "string",
    "lastPurgeCount": 0
  }
}
{
  "error": "string",
  "message": "string",
  "requestId": "string"
}
{
  "property1": null,
  "property2": null
}
{
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "message": "string",
  "requestId": "string"
}
{
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "message": "string",
  "requestId": "string"
}