ReferenceAPI

Get metrics

Get what your resources used against what the platform reserved for them.

GET https://api.nevia.cloud/v1/metrics
curl -X GET "https://api.nevia.cloud/v1/metrics" \
  -H "Authorization: Bearer $TOKEN"
{
  "metrics": [
    {
      "resource": {
        "id": "01d4cnjmn4fbb1r5btxb5mypv62",
        "kind": "computer",
        "name": "atlas-build",
        "workspace": "01d4cnjjq40hnnh0nwmkg35nv2h",
        "project": "01ck8y1dm5qqnf88mytnh4m0h4g"
      },
      "metric": "memory",
      "unit": "bytes",
      "attributes": {
        "volume": "data"
      },
      "summary": {
        "used": {
          "min": 0,
          "max": 0,
          "p95": 0,
          "latest": 0
        },
        "allocated": {
          "latest": 0,
          "max": 0
        }
      },
      "series": [
        {
          "time": "2026-09-10T12:34:56Z",
          "used": 0,
          "allocated": 0
        }
      ]
    }
  ],
  "window": {
    "from": "2026-09-10T12:34:56Z",
    "to": "2026-09-10T12:34:56Z"
  },
  "granularity": "day",
  "unreported": {
    "metrics": [
      "memory"
    ],
    "used": [
      "memory"
    ],
    "events": [
      "slept"
    ],
    "streams": [
      "stdout"
    ],
    "destinations": true
  },
  "console_url": "https://nevia.aiven.io/computers/01d4cnjmn4fbb1r5btxb5mypv62/logs?ws=01d4cnjjq40hnnh0nwmkg35nv2h&from=2026-11-28T02%3A46%3A58.000Z&to=2026-11-28T03%3A46%3A58.000Z"
}

Authorization

bearerAuth
Authorization Bearer <token>

Send the token in the Authorization: Bearer <token> header. See Authenticate.

In: header

Query Parameters

workspace?array< string>

Workspace ids or exact names. A deleted workspace is selected by its id only. When one is absent the answer covers every workspace the caller can see.

resource?array< string>

Computer or database ids, or their exact names together with workspace.

project?array< string>

Project ids. The answer covers the computers and databases in those projects, deleted ones included, and a member scoped to a project can read it. With resource, each resource must be in one of them.

kind? string computer · database

When present, the answer covers only resources of this kind.

from? string

Window start, RFC 3339, inclusive. Defaults to 24 hours before to.

Format date-time
to? string

Window end, RFC 3339, exclusive. Defaults to now.

Format date-time
metric?array<>

Only these metrics. Defaults to all.

granularity? string minute · hour · day

Bucket size of the series and of used percentiles. Chosen from the window when absent. A minute series may span at most two days.

series? boolean

Include one point per bucket. Allowed for at most 20 resources.

Default false

Behavior

The scope is the one GET /v1/usage takes. The answer has one entry per resource and metric for every resource in scope that held anything in the window, deleted ones included, and one with null values for a resource the scope names that has reported nothing yet. allocated is what the platform reserved, which is what Cost bills, or for connections the limit Postgres reported. Each metric applies to the kinds of resource metric lists, so a computer has no database metrics. used is what the workload used, and is null until the resource reports it. A stretch asleep is null, never interpolated, except disk, which stays allocated while the resource sleeps. Each entry carries a summary over the window. With series=true, it also carries one point per bucket, for at most 20 resources. The window defaults to the 24 hours before to and may span at most 92 days. Without granularity, buckets are minutes up to 6 hours, hours up to 14 days and days beyond, and the answer says which. console_url opens the same scope, window, metrics and buckets in the console. Answers 503 not_supported where metrics are not deployed.

Response

application/json

The metrics.