hosting
POST /v1/wordpress/sites/{siteId}/refresh
Ask this site's platform for its WordPress posture now.
身份验证
请将 API 密钥作为 bearer 令牌发送。此端点在规范中未指明具体的权限,因此请为您的密钥赋予所需的最小权限,并通过检查响应来确认,而不是盲目假设。
此端点不需要组织 ID。您的密钥已用于识别其所属的组织,且响应范围也仅限于该组织。
免费试用
将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。
curl -X POST https://api.zinndigital.com/v1/wordpress/sites/{siteId}/refresh \
-H "Authorization: Bearer zdk_live_…"已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 API 运行请求,以便您查看实际的响应。 在 API 控制台中打开此端点
详细信息
Collects core version, plugins, themes, administrators, enforced disk quota and a **cache-busted request to the site's own homepage**, then stores and returns them. ⛔ **Every read is independent.** A platform that answers the install call and refuses the user list produces a snapshot with a core version and no administrators — not an empty row. And a failed collection **keeps the previous figures**, recording `snapshot.collect_error_code` beside them: *"what we knew four hours ago, and why we could not refresh it"* is a better answer than a blanked screen, provided the screen says which it is showing. ⛔ `sites.panel_access`, not merely `sites.view`: this commissions real vendor work against a customer's site, and a read permission should not be able to spend somebody else's rate limit.
参数
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
siteId (path) | Uuid | 是 | Site ID (UUIDv7). |
响应
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
site_id | string | 是 | — |
name | string | 是 | — |
primary_domain | string | 是 | — |
stack_type | string | 是 | `wordpress` or `woocommerce` — a shop IS a WordPress site. |
product_line | string | 是 | — |
deploy_target | string | 是 | — |
status | string | 是 | — |
php_version | string | 是 | — |
plan_name | string | 是 | The plan a customer would recognise, or `""`. Never an id. |
site_url | string | 是 | — |
admin_url | string | 是 | — |
update_state | WordPressUpdateState | 是 | ⛔⛔ **`unknown` is a real member and must never be rendered as `current`.** *"We have not looked"* and *"you are up to date"* are different statements, and a manager that collaps… |
reachability | WordPressReachability | 是 | What a **visitor** gets from the site's own homepage, from a cache-busted request. ⛔⛔ This is the only field on this surface measured over the path a human actually uses. Every… |
http_status | integer | 是 | — |
http_error_code | WordPressProbeErrorCode | 是 | Why the homepage request did not complete, blank when it did (whatever the status). A code rather than a sentence, because a sentence composed in the engine is English for ever… |
http_checked_at | string | 是 | — |
can_install | boolean | 是 | Whether software can be installed on this site's platform at all. ⛔ `false` for every managed hosting site — this platform exposes no shell and no install endpoint across its AP… |
capabilities | object | 是 | What this site's platform permits, as of the last collection. |
disk | WordPressAllowance | 是 | One countable resource. ⛔ **Three states, not two.** `limit: null, unlimited: false` is *no ceiling is stated*; `unlimited: true` is *the plan sells this as unlimited*, which is… |
bandwidth | WordPressAllowance | 是 | One countable resource. ⛔ **Three states, not two.** `limit: null, unlimited: false` is *no ceiling is stated*; `unlimited: true` is *the plan sells this as unlimited*, which is… |
snapshot | WordPressSnapshot | 是 | ⛔ **Null means nobody has ever collected this site.** A client renders that as *"not checked yet"* with a refresh action — never as zeroes, which read as "you are up to date". |
plugins | WordPressComponent[] | 是 | — |
themes | WordPressComponent[] | 是 | — |
admins | WordPressAdmin[] | 是 | — |
此端点可能返回的错误
401 · 403 · 404 · 422 · 429 · 503