Skip to content

Count records past their retention.

GET
/api/admin/data-retention/estimate
Code sample: Shell / cURL
curl --request GET \
--url 'https://auth.example.com/api/admin/data-retention/estimate?category=audit_events' \
--header 'Authorization: Bearer <token>'

Counts, per category, the records kept and those past their retention that the next scheduled retention run removes. Categories whose records expire where they are kept or are not stored have null counts.

category
string
Allowed values: audit_events audit_pii check_api_audit user_tombstones compliance_reports lookup_directory diagnostic_logs sessions refresh_tokens authorization_codes access_tokens

Count only this category.

Data retention estimate response.

Media type application/json
object
tenant_id
required
string
estimates
required
Array<object>
object
category
required
string
Allowed values: audit_events audit_pii check_api_audit user_tombstones compliance_reports lookup_directory diagnostic_logs sessions refresh_tokens authorization_codes access_tokens
retention
required
object
value
number
unit
string
Allowed values: days seconds
records
required
integer | null
records_past_retention
required
integer | null
key
additional properties
Example
{
"estimates": [
{
"category": "audit_events",
"retention": {
"unit": "days"
}
}
]
}

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"
}

What decides a retention cannot be read, so the values in effect are unknown.