compute
GET /v1/compute/servers/{serverId}/metrics
How hard a server has worked over a window — CPU, network and disk rates.
Аутентификация
Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение sites.view; ключ без него отклоняется с кодом 403, а не 404.
Этот эндпоинт не принимает идентификатор организации. Ваш ключ уже определяет организацию, к которой он принадлежит, и ответ ограничивается ее рамками.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X GET https://api.zinndigital.com/v1/compute/servers/{serverId}/metrics \
-H "Authorization: Bearer zdk_live_…"Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
Read live from the provider and stored nowhere. window is one of 1h, 24h, 7d or 30d (default 24h); anything else is a 422 naming the four, never widened to the nearest. ⛔ A sample the provider did not have is null — a gap in the line, never zero. ⛔ A quantity this range does not measure is ABSENT from series, which is a different state from a series with no points. 503 on a range with no metrics history (see the compute:metrics_history capability). Requires sites.view.
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
serverId (path) | Uuid | Да | The server's id, as listComputeServers reports it. Ours (UUIDv7), minted when the order row was written — never the provider's own identifier for the machine. |
window (query) | string<1h, 24h, 7d, 30d> | Нет | — |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
window | string<1h, 24h, 7d, 30d> | Да | — |
step_seconds | integer | Да | The spacing between samples, as the provider answered it. |
series | object[] | Да | ⛔ A quantity this range does not measure is absent, not empty. |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 422 · 429 · 503