# Get a container's metrics

`GET /api/v1/servers/{nodeId}/container-series`

One container's CPU and memory over the last 24 hours, 7 or 30 days.

Sign-in: a dashboard session, an API token with `nodes:read` or the `monitorly` CLI's sign-in with `nodes:read`.

Section: Servers. Operation id in openapi.json: `get_server_container_series`.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `nodeId` | path | yes | string (uuid) | The id of the private node that runs on the server. |
| `name` | query | no | string | The container's name as the node reports it (without the leading `/`). |
| `range` | query | no | string | `24h` (5-minute points, the default), `7d` or `30d` (hourly points). |

## Responses

Errors are `application/problem+json` (`Problem`); branch on `type`.

### 200

The series.

`application/json`: ContainerSeries

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes |  |
| `points` | array of ContainerPoint | yes | Oldest first; a step in which the container was not running (or not reported) has no point. |
| `range` | string | yes |  |
| `stepSecs` | integer | yes |  |

### 400

Bad Request.

- `request.malformed`: the body or a parameter is not of the expected shape
- `auth.credentials_conflict`: the request carries both a session cookie and a token

### 401

Unauthorized.

- `auth.unauthenticated`, `auth.session_expired`: no session, or it ended
- `token.invalid`: the token is malformed, unknown, revoked or expired, or its creator left the workspace

### 403

Forbidden.

- `auth.forbidden`: your role is too low for this
- `token.scope_missing`: the token lacks the scope this needs; `detail` names it

### 404

Not Found.

- `request.not_found`: it does not exist, or you cannot see it

### 422

Unprocessable Entity.

- `field.invalid`, `field.required`: a parameter breaks a rule; `errors` points at it

### 429

Too Many Requests.

- `token.rate_limited`: more than 10 requests a second with this token

Schemas named above are listed with their fields in [the schema list](https://docs.monitorly.cloud/api/reference/schemas.md).
