Stats
Endpoints for retrieving aggregate counts of panel resources (websites, cron jobs, databases, backups, SSL certificates, and DNS zones).
Get Stats
GET /api/v1/stats
Scope: read:stats
Returns total and active counts for each resource type. Counts are computed at request time.
Response
{
"data": {
"websites": {
"total": 1,
"active": 1
},
"cron": {
"total": 1,
"active": 0
},
"databases": {
"total": 0,
"mariadb": {
"total": 0,
"active": 0
},
"postgresql": {
"total": 0,
"active": 0
}
},
"backups": {
"total": 5,
"active": 5
},
"ssl": {
"total": 0,
"active": 0
},
"dns_zones": {
"total": 1,
"active": 1
}
}
}
| Field | Type | Description |
|---|---|---|
websites.total |
integer | Total number of websites |
websites.active |
integer | Number of websites currently active |
cron.total |
integer | Total number of cron jobs |
cron.active |
integer | Number of cron jobs currently active |
databases.total |
integer | Total number of databases across all engines |
databases.mariadb.total |
integer | Total number of MariaDB databases |
databases.mariadb.active |
integer | Number of MariaDB databases currently active |
databases.postgresql.total |
integer | Total number of PostgreSQL databases |
databases.postgresql.active |
integer | Number of PostgreSQL databases currently active |
backups.total |
integer | Total number of backups |
backups.active |
integer | Number of backups currently active |
ssl.total |
integer | Total number of SSL certificates |
ssl.active |
integer | Number of SSL certificates currently active |
dns_zones.total |
integer | Total number of DNS zones |
dns_zones.active |
integer | Number of DNS zones currently active |
Errors
| Code | Status | Condition |
|---|---|---|
internal_error |
500 | Failed to load stats |
Example
curl -H "Authorization: Bearer $TOKEN" \
https://panel.example.com/api/v1/stats
Related
- Authentication - token format and auth failures
- Responses - success response shape
- Errors - error codes