Get the database's health
/instances/database-health/read Read: looks, changes nothing. Scopes
How the panel's database is doing: response time, size, connections, largest tables and the last backup, with each problem found as a warning in plain words. Panel operators only.
Response
200 OK
statusstringrequiredok,warn(seewarnings) ordown.checked_atstring (date-time)requirederrorstringWhy the database cannot be reached (
downonly).ping_msnumberHow long a trivial query took.
versionstringThe database server's version.
uptime_secondsintegersize_bytesintegerconnectionsobjectactiveintegerrequiredidleintegerrequiredidle_in_transactionintegerrequiredpanel_totalintegerrequiredConnections to the panel's database.
server_totalintegerrequiredConnections to the whole database server.
maxintegerrequiredThe most the database server accepts.
cache_hit_rationumbercan be nullShare of reads served from memory (0–1).
deadlocksintegercommitsintegerrollbacksintegertemp_bytesintegerstats_sincestring (date-time)can be nullSince when the counters above count.
longest_transaction_secondsintegerlong_running_queriesintegerQueries running for over a minute.
lock_waitersintegerpending_migrationsintegercan be nullDatabase changes not applied yet (restart the panel).
largest_tablesobject[]tablestringrequiredlabelstringrequiredWhat the table holds, in plain words.
size_bytesintegerrequiredrowsintegerrequiredcan be nulldead_rowsintegerrequiredcan be nullOld rows waiting to be cleaned up.
last_vacuumstring (date-time)requiredcan be null
backupobjectcan be nulllast_success_atstring (date-time)requiredcan be nulllast_success_sizeintegerrequiredcan be nulllast_failure_atstring (date-time)requiredcan be nullnext_run_atstring (date-time)requiredcan be nullnext_planstringrequiredcan be nullThe backup schedule that runs next.
runningbooleanrequiredwarningstringrequiredcan be null
warningsobject[]requiredlevelstringrequiredwarn, ordownwhen the database cannot be reached.messagestringrequired
Errors
- 401 No credential, or one that is wrong, expired or revoked.
- 403 The account, or the key's or app's scopes, may not do this.
- 429 Slow down: wait the seconds in the Retry-After header, then try again.