`PUT /api/v1/audit/retention` — update the audit retention setting. Admin only.
PUT
/api/v1/audit/retention
const url = 'https://example.com/api/v1/audit/retention';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"retention_days":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/audit/retention \ --header 'Content-Type: application/json' \ --data '{ "retention_days": 1 }'Request Body required
Section titled “Request Body required ” 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}Responses
Section titled “ Responses ”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