Skip to content

`PUT /api/v1/audit/retention` — update the audit retention setting. Admin only.

PUT
/api/v1/audit/retention
curl --request PUT \
--url https://example.com/api/v1/audit/retention \
--header 'Content-Type: application/json' \
--data '{ "retention_days": 1 }'
Media type application/json

Request body for PUT /api/v1/audit/retention.

retention_days = None clears the override and falls back to the configuration-file default. Some(0) is not allowed — use None to disable pruning.

object
retention_days
integer | null format: int64
Example generated
{
"retention_days": 1
}

Updated audit retention setting

Media type application/json

Response body for GET /api/v1/audit/retention.

object
retention_days
integer | null format: int64
Example generated
{
"retention_days": 1
}

Invalid retention value

Admin role required