Skip to content

Get audit retention settings

GET
/api/admin/settings/audit-storage/retention
Code sample: Shell / cURL
curl --request GET \
--url https://auth.example.com/api/admin/settings/audit-storage/retention \
--header 'Authorization: Bearer <token>'

Returns effective audit retention configuration, defaults, constraints, profile source, and KV key metadata.

Successful JSON response.

Media type application/json
object
config
object
eventLogRetentionDays
integer
>= 1 <= 730
piiLogRetentionDays
integer
>= 1 <= 2555
archiveBeforeDelete
boolean
minimumRetentionDays
integer
>= 1 <= 2555
key
additional properties
source
string
default
object
eventLogRetentionDays
integer
>= 1 <= 730
piiLogRetentionDays
integer
>= 1 <= 2555
archiveBeforeDelete
boolean
minimumRetentionDays
integer
>= 1 <= 2555
key
additional properties
kv_key
string
constraints

Retention min/max constraints.

object
key
additional properties
archive_note
string
key
additional properties
Example
{
"config": {
"eventLogRetentionDays": 90,
"piiLogRetentionDays": 365,
"archiveBeforeDelete": true,
"minimumRetentionDays": 30
},
"source": "runtime_profile",
"default": {
"eventLogRetentionDays": 90,
"piiLogRetentionDays": 365
},
"kv_key": "audit_storage:retention_config",
"constraints": {
"event_log": {
"min_days": 1,
"max_days": 730
},
"pii_log": {
"min_days": 1,
"max_days": 2555
}
},
"archive_note": "When archiveBeforeDelete is enabled, logs are copied to R2 before deletion for compliance and recovery purposes."
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}