Layerbeat

Get server performance metrics

GET
/v1/vms/{id}/metrics

Returns CPU, memory, disk and network performance for the last 24 hours, sampled every five minutes.

Access: vm:read and server metrics access. Owner/admin sessions have access; other members and API keys need a grant.

Authorization

headerAuthorizationBearer <token>

Send Authorization: Bearer <token>. A token is an API key (lb_live_…, scoped, for programs) or a session (lb_sess_…, from signup or login, for people). See Authentication above.

Path Parameters

id*string

The resource id.

Query Parameters

range?"24h"

Fixed 24-hour history window; other ranges, arbitrary timestamps and sampling periods are not accepted.

Default"24h"
Value in"24h"
metrics?array<>

Comma-separated distinct metric names. Omit for the five core metrics. Unknown names, duplicates, empty values, repeated parameters and unknown query parameters return 400.

Items1 <= items <= 20

Header Parameters

X-Org-ID?string

Sessions only: act on this organization (you must be a member). Default: your first organization.

Response Body

Performance series, including explicit unavailable and stale states

application/json
  1. response
vm_id*string
range*"24h"
Value in"24h"
period_seconds*300
Value in300
start_time*string
Formatdate-time
end_time*string
Formatdate-time
fetched_at*string
Formatdate-time
cache_ttl_seconds*300
Value in300
cached*boolean
series*array<>
Items1 <= items <= 20
curl -X GET 'https://layerbeat.com/v1/vms/string/metrics?range=24h&metrics=cpu_usage%2Cmemory_usage'
{  "vm_id": "vm_abc123",  "range": "24h",  "period_seconds": 300,  "start_time": "2026-10-02T12:20:00Z",  "end_time": "2026-10-03T12:20:00Z",  "fetched_at": "2026-10-03T12:25:55Z",  "cache_ttl_seconds": 300,  "cached": false,  "series": [    {      "name": "cpu_usage",      "unit": "percent",      "available": true,      "stale": true,      "latest_at": "2026-10-03T12:20:00Z",      "points": [        {          "timestamp": "2026-10-03T12:20:00Z",          "value": 1.25        }      ]    },    {      "name": "memory_usage",      "unit": "percent",      "available": false,      "stale": true,      "latest_at": null,      "points": []    }  ]}