hosting

GET /v1/sites/{siteId}/usage

Get one site's metered visits for the current billing period.

所有 hosting 端点

身份验证

请将 API 密钥作为 bearer 令牌发送。此端点在规范中未指明具体的权限,因此请为您的密钥赋予所需的最小权限,并通过检查响应来确认,而不是盲目假设。

此端点不需要组织 ID。您的密钥已用于识别其所属的组织,且响应范围也仅限于该组织。

免费试用

将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。

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

已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 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)UuidSite ID (UUIDv7).

响应

名称类型必填内容简介
period_startstring
period_endstring
page_viewsintegerThis site's billable human page views this period.
excluded_page_viewsintegerThis site's page views excluded as automated.
org_page_viewsintegerBillable page views across every site on the plan.
org_allowanceintegerThe plan's allowance for this period. `-1` means unlimited.
org_unlimitedboolean
org_over_limitbooleanWhether the plan's allowance is exceeded. The site keeps serving either way.

此端点可能返回的错误

401 · 403 · 404 · 429