Databases

Get database consumption metrics

Changed on

Retrieve consumption metrics including storage, compute time, and data transfer. Metrics are aggregated at the project level. Defaults to last 24 hours.

Note: Advanced metrics require an upgraded plan.

get/projects/{id}/databases/{databaseName}/stats

Request

  • Base URL: https://api.volcano.dev
  • URL: https://api.volcano.dev/projects/{id}/databases/{databaseName}/stats
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

idstring uuid required

Project ID

databaseNamestring required

Database name (unique within project, lowercase letters, numbers, and underscores only)

Query parameters

fromstring date-time

Start time in RFC3339 format (e.g., "2024-01-01T00:00:00Z"). Defaults to 24 hours ago.

tostring date-time

End time in RFC3339 format (e.g., "2024-01-02T00:00:00Z"). Defaults to now.

granularity'hourly' | 'daily' | 'monthly'

Level of detail for metrics aggregation

Response

Successful response

current_storage_bytesinteger required

On-disk size right now, in bytes: the database itself, plus every branch's divergence from it, plus what its backups cost to hold. This is the figure the storage allowance is enforced against. branches and backup_storage_bytes break it down.

current_storage_mbnumber double required

current_storage_bytes expressed in megabytes.

backup_storage_bytesinteger required

What this database's backups contribute to current_storage_bytes.

A backup taken on request is charged as a full copy of the database as it was at that moment, so two backups of a 2 GB database are 4 GB. A backup schedule is charged its first snapshot in full and each later one only for the storage it adds. Deleting a backup releases its storage immediately.

Sampled from the provider rather than measured live, so it can lag a change by a few minutes, and a backup taken seconds ago may not be costed yet. Zero on a plan without backups.

storage_bytesinteger required

Total storage used in bytes (data + WAL)

data_written_bytesinteger required

Total data written in bytes

data_transfer_bytesinteger required

Total data transferred in bytes

compute_time_secondsnumber double required

Total CPU seconds consumed

active_time_secondsnumber double required

Total active compute time in seconds

time_rangestring

Time range of the metrics (e.g., "2024-01-01T00:00:00Z to 2024-01-02T00:00:00Z")

granularity'hourly' | 'daily' | 'monthly'

Granularity of the aggregated metrics

Changes

    • ○

      the endpoint scheme security ProjectAccessToken was added to the API

    • ▲

      added the new path request parameter databaseName

    • ▲

      added the new path request parameter id

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status