Skip to Content
ReferenceAPI referenceSystem

Get the database size, retention and table stats

GET
/api/v1/system/database

Returns the database size, the PostgreSQL and TimescaleDB versions, the retention days, and row and size estimates for the geo_events, access_logs and access_log_debug tables. With the database unreachable it still answers 200, with reachable false and the stats null or empty.

Authorization

cookiesession<token>

Session cookie authentication.

Response Body

Request fulfilled, document follows

application/json
  1. response

Database size, versions, retention and table stats for the Status page.

debugRetentionDays*integer

Days to keep the access log debug lines.

hypertables*array<>

Empty when the database is unreachable.

postgresVersion*string|null
reachable*boolean
retentionDays*integer

Days to keep raw geo events and access log lines.

sizeBytes*|

The whole database on disk, in bytes.

timescaledbVersion*string|null
Example Request
curl -X GET 'https://geometrikks.example.com/api/v1/system/database'
Example Response200
{  "debugRetentionDays": 0,  "hypertables": [    {      "afterCompressionBytes": 0,      "approxRows": 0,      "beforeCompressionBytes": 0,      "name": "string",      "totalBytes": 0    }  ],  "postgresVersion": "string",  "reachable": true,  "retentionDays": 0,  "sizeBytes": 0,  "timescaledbVersion": "string"}