Docs
Metrics and telemetry ›

Get metrics

GET/v1/metrics

What each of your sandboxes read at one moment.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const metrics = await agental.metrics();
Answer200 OK · MetricsAtMoment
  1. {
  2. "at": string,
  3. "sandboxes": [{
  4. "sandboxId": string,
  5. "name": string,
  6. "size": "tiny" | "small" | "medium" | "large",
  7. "reading": object,
  8. }],
  9. "complete": boolean,
  10. }

What each of the caller's sandboxes read at one moment.

Query

at
string
The moment to read at. Now when omitted. At most 15 days ago. e.g. "2026-10-14T09:35:00Z"

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

200 What each of the caller's sandboxes read at one moment. A sandbox that was stopped then has a null reading, and so has one that was started less than a minute before.

MetricsAtMoment3 fields
at
string
sandboxes
object[]4 fields
sandboxId
string
name
string
size
tinysmallmediumlarge
reading
object
complete
boolean
False when a server did not answer, so that a sandbox on it has a null reading though it was running.

Errors and other answers

400 at is in the future, or more than 15 days ago.
404 Not found.
501metrics_unavailable sandboxes are not read here. GET /v1/policy says so as metrics.
503metrics_unreadable not one of the servers answered for its readings. The sandboxes are as they were. Ask again in a minute.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.