hosting

GET /v1/sites/{siteId}/metrics

Get a site's current usage metrics.

सबै hosting इन्डपइन्टहरू

प्रमाणीकरण

एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। यो इन्डपोइन्टले विशिष्ट अनुमति खुलाएको छैन, त्यसैले अनुमान गर्नुको सट्टा आफ्नो कुञ्जीलाई आवश्यक पर्ने न्यूनतम अधिकार दिनुहोस् र प्रतिक्रिया जाँच गर्नुहोस्।

यो इन्डपोइन्टले कुनै संस्थाको आइडी लिँदैन। तपाईंको कुञ्जीले यस अन्तर्गत पर्ने संस्थालाई पहिल्यै पहिचान गर्छ, र प्रतिक्रिया त्यसैमा सीमित हुन्छ।

प्रयास गर्नुहोस्

कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।

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

लगइन गर्नुभएको छ? तपाईंको ड्यासबोर्डमा रहेको API कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ 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 — t…
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 bec…
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` me…
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 rea…
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: *"HTTP and PHP errors captured per site, so a fatal fr…

यो इन्डपोइन्टले फर्काउन सक्ने त्रुटिहरू

401 · 403 · 404 · 429