DB Lifecycle

Get the database metrics history

Changed on

Returns up to 288 points (24h sampled every 5 minutes) of CPU, RAM, network, disk I/O and storage usage for the database, newest first. On Pro and Enterprise plans, range=7d returns up to 168 hourly points (7 days) with the hour's average (cpu, ram) and peak (cpu_max, ram_max); other plans get the 24h answer instead. Cached for 2.5 minutes per (user, database), 10 minutes for 7d.

Each point: cpu (% of the plan's CPU), ram (MB), net = [bytes received, bytes sent] and disk = [bytes read, bytes written], both cumulative since the container started (a value lower than the previous point means it restarted; disk is null on a point without a reading), and storage = bytes the container's disk holds (null without a reading).

Rate limited to 10 requests per 5s per user, with a 60s block on the cap.

get/v2/databases/{databaseId}/metrics

Request

Path parameters

databaseIdstring required

Database identifier.

Query parameters

range'24h' | '7d'

24h (default): one point every 5 minutes (every 10 minutes for applications below 512 MB). 7d: one point per hour with the hour's average and peak, on Pro and Enterprise plans; other plans and applications below 512 MB get the last 24 hours instead of an error.

Response

Array of metric points, newest first. Empty when the database has no recent data.

status'success' required

Changes

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status