hosting

GET /v1/sites/{siteId}/metrics

Get a site's current usage metrics.

Tất cả các điểm cuối hosting

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Điểm cuối này không nêu rõ quyền cụ thể trong thông số kỹ thuật, vì vậy hãy cấp cho khóa của bạn quyền tối thiểu cần thiết và kiểm tra phản hồi thay vì phỏng đoán.

Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

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

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

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.

Tham số

TênLoạiBắt buộcNội dung này là gì
siteId (path)UuidSite ID (UUIDv7).

Phản hồi

TênLoạiBắt buộcNội dung này là gì
availablebooleanWhether a metrics sample has been collected for this site yet.
disk_used_mbobjectDisk 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_mbobjectThe 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_mbobjectBandwidth used in the current period.
visitsobject
php_versionstringKhôngThe PHP version the site runs; empty when not applicable/unknown.
serving_okobjectKhôngWhether 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_atobjectKhôngWhen 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_detailstringKhôngThe short status line behind `serving_ok` — `"HTTP 522"`, `"ConnectTimeout"`. Never a raw vendor response body.
ssl_statusstring<active, pending, none, unknown>KhôngThe site's TLS certificate state.
ssl_expires_atobjectKhông
bandwidth_seriesinteger[]Recent daily bandwidth samples (MB), oldest first — for the usage chart. Empty when unavailable.
collected_atobjectWhen this sample was collected; null when unavailable.
error_rateSiteErrorRateHTTP 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…

Các lỗi điểm cuối này có thể trả về

401 · 403 · 404 · 429