Databases

Size, open connections, version and engine figures (cached for a minute; refresh=true reads them now)

get/databases/{databaseId}/insights

Request

  • Base URL: https://hostingsurge.com/api/v1
  • URL: https://hostingsurge.com/api/v1/databases/{databaseId}/insights
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Host-hs_session

Path parameters

databaseIdstring uuid required

Query parameters

refresh'0' | '1' | 'true' | 'false'

Response

Insights

databaseIdstring uuid required
engine'postgresql' | 'mysql' | 'mariadb' | 'redis' | 'mongodb' required
statusstring required

provisioning, running, stopped, error or deleting

versionstring nullable required

server version reported by the database (falls back to the image tag)

imagestring nullable required
sizeBytesnumber nullable required

data size: database size (PostgreSQL), tables + indexes (MySQL/MariaDB), storage (MongoDB), used memory (Redis)

connectionsinteger nullable required

open client connections

maxConnectionsinteger nullable required
state'fresh' | 'cached' | 'preparing' | 'unavailable' required

fresh: read just now; cached: from the last read; preparing: the database tools are starting, retry shortly; unavailable: the database is not running

checkedAtstring nullable required

ISO-8601 timestamp

errorstring nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.