hosting
GET /v1/sites/{siteId}/usage
Get one site's metered visits for the current billing period.
احراز هویت
یک کلید API را به عنوان یک توکن برbearer ارسال کنید. این نقطه پایانی مجوز خاصی را در مشخصات خود ذکر نمیکند، بنابراین به جای فرض کردن، حداقل نیازهای کلید خود را بدهید و پاسخ را بررسی کنید.
این نقطه پایانی هیچ شناسه سازمانی را دریافت نمیکند. کلید شما در حال حاضر سازمان مربوطه را مشخص میکند و پاسخ در همان محدوده ارائه میشود.
امتحان کنید
هر چیزی را که داخل براکتهای زاویهدار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/usage \
-H "Authorization: Bearer zdk_live_…"وارد شدهاید؟ کنسول API در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر میکند و درخواست را روی API زنده اجرا میکند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول API باز کنید
جزئیات
This site's billable page views so far this billing period, alongside the organisation-wide allowance they count against. RLS-scoped to a site the caller can view (`sites.view`); an out-of-scope or unknown id is a `404`, exactly like `getSite`. **A visit is a human page view with bots excluded** (owner ruling 2026-08-11). Crawlers, automated agents, assets, redirects and error responses are all excluded, and `excludedPageViews` reports how many were — the rule is published so a customer can check it rather than take it on trust. **The organisation's totals are returned with the site's own** because a site figure cannot be read without its denominator: 40,000 views is unremarkable on Agency Growth and a chargeable overage on Starter. The allowance is granted to the plan, not to the site, and is shared across every site that plan pays for.
پارامترها
| نام | نوع | الزامی | چیست |
|---|---|---|---|
siteId (path) | Uuid | بله | Site ID (UUIDv7). |
پاسخ
| نام | نوع | الزامی | چیست |
|---|---|---|---|
period_start | string | بله | — |
period_end | string | بله | — |
page_views | integer | بله | This site's billable human page views this period. |
excluded_page_views | integer | بله | This site's page views excluded as automated. |
org_page_views | integer | بله | Billable page views across every site on the plan. |
org_allowance | integer | بله | The plan's allowance for this period. `-1` means unlimited. |
org_unlimited | boolean | بله | — |
org_over_limit | boolean | بله | Whether the plan's allowance is exceeded. The site keeps serving either way. |
خطاهایی که این نقطه پایانی میتواند برگرداند
401 · 403 · 404 · 429