Update retention settings for your tenant

​

Updates the audit log retention window. The change is logged inside the transaction so the before/after delta stays consistent. Allowed values are 12, 18, 24, 36, or 72 months. When shrinking the window a warning field is included in the response. Requires audit-log:manage plus entity-wide resource-group:bypass: the purge this schedules is irreversible and deletes rows for every resource group, so a caller whose reads are clamped to their own groups cannot change it (the GET needs only audit-log:manage).

Body

required
application/json
  • Integer numbers.

    values
    1218243672

Responses

  • application/json
  • Validation error (invalid retentionMonths value)

  • Authentication required

  • Insufficient permissions (requires audit-log:manage and entity-wide resource-group:bypass)

Request Example for put/audit-logs/retention
curl https://api.gpcn.com/v1/audit-logs/retention \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: YOUR_SECRET_TOKEN' \
  --data '{
  "retentionMonths": 12
}'
{
  "success": true,
  "data": {
    "retentionMonths": 1,
    "warning": "string"
  }
}