Skip to content

Get certificate statistics

GET
/api/v1/certificates/stats
curl --request GET \
--url http://localhost:3000/api/v1/certificates/stats \
--header 'X-API-Key: <X-API-Key>'

Retrieves certificate statistics including total, valid, expiring, expired, and revoked counts.

x-organization-id
string format: uuid

UUID of the organization (tenant) the request acts in. It selects the tenant and grants nothing: the server checks membership or an open tenant switch. Not needed for global operations. A malformed value returns 400. API keys are fixed to their own organization; another organization returns 403. The x-organization-source header grants nothing.

Certificate statistics retrieved successfully

Media typeapplication/json
object
total
required

Total number of certificates

number
valid
required

Number of valid certificates (not expiring within 30 days)

number
expiring
required

Number of certificates expiring within 30 days

number
expired
required

Number of expired certificates

number
unknown
required

Number of non-revoked legacy device certificates whose validity is unknown (stored before the real certificate was kept). They are never counted as valid, expiring or expired.

number
revoked
required

Number of revoked certificates

number
Example
{
"total": 150,
"valid": 120,
"expiring": 15,
"expired": 5,
"unknown": 953,
"revoked": 10
}

Unauthorized - Invalid or missing authentication

Forbidden - Insufficient permissions