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

# Get resource usage over time

`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

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`.

## Path parameters

- `databaseID` string, required: 24-character hexadecimal ID.
- `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 database (`no_permission`).
- `404`: The database doesn't exist.
- `428`: `since` is further back than the bundle plan allows.
- `503`: The data is temporarily unavailable. Try again later.

## Changes

> 21 revisions in range; 1 not diffed.

- **2026-11-02** `f6f78c6f05c6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/liara-cloud/apis/dbaas/changes/v1/databases/:databaseID/metrics/:stat/get.md)

---

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