---
title: "Get resource usage over time"
method: GET
path: "/v1/projects/{project_id}/metrics/{stat}"
tags: ["Logs, Metrics & Events"]
---

# Get resource usage over time

`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

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.

## Path parameters

- `project_id` string, required
- `stat` 'cpu' | 'memory' | 'network-receive' | 'network-transmit', required

## Query parameters

- `teamID` string: 24-character hexadecimal ID.
- `since` integer, required

## Response `200`

The metric over time.

- object
  - `end` integer: End of the range (now), in Unix seconds.
  - `result` object[]
    - `applet` string: The instance the values belong to.
    - `values` array[]: `[timestamp, value]` pairs. The timestamp is in Unix seconds; the value is a string.
      - unknown[]
        - unknown

## Other responses

- `400`: The body or a parameter is invalid (`message` says which), or `teamID` isn't a valid ID.
- `401`: The API token is missing, invalid or expired.
- `403`: With `teamID`: you aren't a member of the team (`team_not_found`), or you don't have the required permission on this app (`no_permission`).
- `404`: The app doesn't exist.
- `428`: `since` is further back than your bundle plan allows.
- `503`: The data is temporarily unavailable. Try again later.

## Changes

- **2026-11-02** `610162e8a623`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/liara-cloud/apis/paas/changes/v1/projects/:project_id/metrics/:stat/get.md)

---

[API](https://skmtc.dev/liara-cloud/apis/paas.md) - [All operations](https://skmtc.dev/liara-cloud/apis/paas/llms.txt) - [OpenAPI document](https://skmtc.dev/liara-cloud/apis/paas/revisions/610162e8a623?raw)
