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
- Type: integerenumretention
Months requiredInteger numbers.
values1218243672
Responses
- application/json
- 400
Validation error (invalid retentionMonths value)
- 401
Authentication required
- 403
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"
}
}.png)