hosting

GET /v1/sites/{siteId}/metrics

Get a site's current usage metrics.

Lahat ng hosting endpoint

Pagpapatotoo

Magpadala ng API key bilang bearer token. Ang endpoint na ito ay hindi naglatag ng tiyak na pahintulot sa pagtutukoy, kaya ibigay sa iyong key ang pinakamababang kailangan nito at suriin ang tugon sa halip na umasa.

Ang endpoint na ito ay hindi nangangailangan ng id ng organisasyon. Natutukoy na ng iyong key ang organisasyong kinabibilangan nito, at nakatuon ang tugon dito.

Subukan ito

Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.

curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/metrics \
  -H "Authorization: Bearer zdk_live_…"

Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API

Mga Detalye

Point-in-time usage for the Overview panel — disk, bandwidth, visits, the PHP version, the TLS state, and a short daily bandwidth series for the usage chart. RLS-scoped to a site the caller can view (`sites.view`); an out-of-scope or unknown id is a `404`, exactly like `getSite`. **Collection is asynchronous.** Metrics are gathered off the request path (a scheduled pull from the site's fleet worker into a cached store — never a live per-request driver call, CLAUDE.md §2.16) and read back here. Until a sample has been collected — a freshly-provisioned or suspended site, or a site on a worker not yet reporting — `available` is `false`, `collected_at` is `null` and the usage counters are `null`; the shape is stable so the client renders "usage not yet available" without a contract change once the collector populates it.

Mga Parameter

PangalanUriKailanganAno ito
siteId (path)UuidOoSite ID (UUIDv7).

Tugon

PangalanUriKailanganAno ito
availablebooleanOoWhether a metrics sample has been collected for this site yet.
disk_used_mbobjectOoDisk the site is using, in MB, from the newest stored hourly reading. `null` when nothing has measured it yet **or** when the newest reading is too old to present as current — t…
disk_limit_mbobjectOoThe disk ceiling ENFORCED on the box, in MB, as last stored. `null` when no ceiling is recorded. ⛔ Not the plan allowance — see `getSiteQuota`, which returns both separately bec…
bandwidth_mbobjectOoBandwidth used in the current period.
visitsobjectOo
php_versionstringHindiThe PHP version the site runs; empty when not applicable/unknown.
serving_okobjectHindiWhether the site actually answered over HTTPS **from outside the box** at `serving_checked_at`, established by the recurring serving sweep rather than on this request. `null` me…
serving_checked_atobjectHindiWhen a DEFINITE serving verdict was last obtained; `null` until one has been. Deliberately separate from the sweep's rotation cursor, which advances for every site the sweep rea…
serving_detailstringHindiThe short status line behind `serving_ok` — `"HTTP 522"`, `"ConnectTimeout"`. Never a raw vendor response body.
ssl_statusstring<active, pending, none, unknown>HindiThe site's TLS certificate state.
ssl_expires_atobjectHindi
bandwidth_seriesinteger[]OoRecent daily bandwidth samples (MB), oldest first — for the usage chart. Empty when unavailable.
collected_atobjectOoWhen this sample was collected; null when unavailable.
error_rateSiteErrorRateOoHTTP and PHP errors for one site over the newest closed collection window (#626). What `features/uptime-monitoring` sells: *"HTTP and PHP errors captured per site, so a fatal fr…

Mga error na maibabalik ng endpoint na ito

401 · 403 · 404 · 429