Get certificate statistics
const url = 'http://localhost:3000/api/v1/certificates/stats';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”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.
Responses
Section titled “Responses”Certificate statistics retrieved successfully
object
Total number of certificates
Number of valid certificates (not expiring within 30 days)
Number of certificates expiring within 30 days
Number of expired certificates
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 of revoked certificates
Example
{ "total": 150, "valid": 120, "expiring": 15, "expired": 5, "unknown": 953, "revoked": 10}Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions