hosting

GET /v1/wordpress/sites

List every WordPress site the caller owns, across all product lines.

所有 hosting 端点

身份验证

请将 API 密钥作为 bearer 令牌发送。该密钥必须具有 sites.view 权限;缺少该权限的密钥将被拒绝并返回 403 状态码,而非 404。

您的组织 ID 应填在此处

此端点将 org_id 作为查询参数。不填则调用涵盖您的整个租户子树;发送该参数则将调用范围缩小到一个组织。

您的组织ID位于控制面板的API密钥屏幕上,就在密钥本身的旁边。这是您在每次调用时使用的相同ID。

免费试用

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

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

已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 API 运行请求,以便您查看实际的响应。 在 API 控制台中打开此端点

详细信息

The fleet manager's list: every `wordpress` or `woocommerce` site in the caller's tenancy subtree, on every product line and every deploy target (own fleet, managed shared, managed cloud, CloudLinux), with each one's stored WordPress posture. ⛔ **This endpoint never calls a vendor**, however stale a row is. Collecting is `refreshWordPressSite`, an explicit act; a row that has never been collected reports `update_state: unknown` with a null `snapshot`, and the client renders that as *"not checked yet"* — **never** as "up to date". Those are different sentences and a customer acts differently on each. `update_state` and `needs_attention` are applied **after** pagination, because the state is derived from four snapshot columns with an explicit precedence and re-expressing that precedence in SQL would give this list and `getWordPressFleetOverview` two implementations of one rule. A filtered page can therefore be short; the totals come from the overview, which counts everything. Requires `sites.view`.

参数

名称类型必填内容简介
cursor (query)stringOpaque cursor from a previous page's `page.next_cursor`.
limit (query)integerMaximum items to return (page size).
org_id (query)stringNarrow to one organisation in the caller's subtree. Equivalent to the `X-Zinn-Org` header, which is now read centrally for every org-scoped operation — this parameter wins where…
q (query)stringSubstring match on the primary domain.
product_line (query)string
deploy_target (query)string
update_state (query)WordPressUpdateState`422` on an unrecognised value rather than silently returning everything — a filter that quietly does nothing is how a customer concludes their estate is clean.
needs_attention (query)booleanOnly sites with a core or component update waiting, no WordPress installed, or a homepage that is not answering.
health (query)string<, healthy, unhealthy>Filter by the stored health verdict. ⭐ Applied **in the database**, unlike `update_state` — `health_status` is one indexed column written by one function, so there is no precede…

响应

名称类型必填内容简介
dataWordPressFleetSite[]
pagePageMeta

此端点可能返回的错误

401 · 403 · 422 · 429