Logs, Metrics & Events

Get resource usage over time

Changed on

Returns one resource metric over time, per instance. The longer the range, the further apart the data points. How far back you can go depends on your bundle plan. Team permission: any project permission.

get/v1/projects/{project_id}/metrics/{stat}

Request

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

Path parameters

project_idstring required

The app's name.

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

cpu: fraction of the app'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