Get server performance 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.
- Select supported names with
metrics. Readings can lag by at least two minutes and are cached for five minutes. - Missing readings stay empty; they are not replaced with zero. A latest reading older than five minutes is marked stale.
- Memory percentage, memory used and disk percentage are separate measurements. They cannot be calculated from one another.
- Servers without a metrics grant or outside your workspace return
404. Provisioning/deletion returns409; unavailable readings return503. - Access is checked on every request, including cached readings. Do not cache responses in a browser or shared proxy.
AuthorizationBearer <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.
id*stringThe resource id.
range?"24h"Fixed 24-hour history window; other ranges, arbitrary timestamps and sampling periods are not accepted.
"24h""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.
1 <= items <= 20X-Org-ID?stringSessions only: act on this organization (you must be a member). Default: your first organization.
Performance series, including explicit unavailable and stale states
application/json- response
vm_id*stringrange*"24h""24h"period_seconds*300300start_time*stringdate-timeend_time*stringdate-timefetched_at*stringdate-timecache_ttl_seconds*300300cached*booleanseries*array<>1 <= items <= 20curl -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": [] } ]}