hosting

GET /v1/sites/{siteId}/metrics

Get a site's current usage metrics.

すべての hosting エンドポイント

すべての開発者向けドキュメント

認証

ベアラー トークンとして API キーを送信します。このエンドポイントでは仕様に特定の権限が記載されていないため、キーに必要な最小限の権限を付与し、推測するのではなくレスポンスを確認してください。

このエンドポイントは組織IDを受け付けません。お使いのキーによって所属する組織がすでに特定されており、レスポンスはその組織にスコープされます。

試してみる

アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。

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

ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く

詳細

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.

パラメータ

名前タイプ必須これがその内容です
siteId (path)UuidはいSite ID (UUIDv7).

返信

名前タイプ必須これがその内容です
availablebooleanはいWhether a metrics sample has been collected for this site yet.
disk_used_mbobjectはいDisk 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 — the…
disk_limit_mbobjectはいThe 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…
bandwidth_mbobjectはいBandwidth used in the current period.
visitsobjectはい
php_versionstringいいえThe PHP version the site runs; empty when not applicable/unknown.
serving_okobjectいいえWhether 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
serving_checked_atobjectいいえWhen 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…
serving_detailstringいいえThe short status line behind serving_ok"HTTP 522", "ConnectTimeout". Never a raw vendor response body.
ssl_statusstring<active, pending, none, unknown>いいえThe site's TLS certificate state.
ssl_expires_atobjectいいえ
bandwidth_seriesinteger[]はいRecent daily bandwidth samples (MB), oldest first — for the usage chart. Empty when unavailable.
collected_atobjectはいWhen this sample was collected; null when unavailable.
error_rateSiteErrorRateはいHTTP and PHP errors for one site over the newest closed collection window (#626). What features/uptime-monitoring sells:…

このエンドポイントが返すエラー

401 · 403 · 404 · 429