Metrics & Events

Get resource usage over time

Changed on

Returns one resource metric over time. The longer the range, the further apart the data points. How far back you can go depends on the bundle plan. Team permission: view, operate or manage.

get/v1/databases/{databaseID}/metrics/{stat}

Request

  • Base URL
    https://api.liara.ir
  • URL
    https://api.liara.ir/v1/databases/{databaseID}/metrics/{stat}
  • Auth
    HTTP bearer

Path parameters

databaseIDstring required

24-character hexadecimal ID.

The database's _id.

stat'cpu' | 'memory' | 'network-receive' | 'network-transmit' required

cpu: fraction of the database's CPU limit. memory: bytes. network-receive and network-transmit: bytes per second.

Query parameters

teamIDstring

24-character hexadecimal ID.

Run the request in the context of a team you belong to, instead of your personal account.

sinceinteger required

Start of the range, in Unix seconds.

Response

The metric over time.

endinteger

End of the range (now), in Unix seconds.

Changes