hosting

GET /v1/sites/{siteId}/wordpress

Get the WordPress install on a site.

所有 hosting 端点

所有开发者文档

身份验证

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

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

免费试用

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

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

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

详细信息

What WordPress is on the package, what version, whether an update is waiting, and — in one read — which of the eleven WordPress operations the package type permits. One read gates eleven buttons, so a customer never learns their plan's shape by pressing one and reading a refusal. is_latest is tri-state: null means the vendor did not say, which is not "out of date". update_available is the flag a screen should act on, because it is derived from the vendor's update object being non-empty rather than from a comparison between two version strings nobody parsed — ⛔ {} is how this platform says "no update", and it is falsy, so the presence of the key is not the signal. Reading what is installed is not gated on a capability: a screen has to be able to render "your plan does not include plugin management" beside the list of what is installed. 404 for a site with no vendor hosting package. Requires sites.view.

参数

名称类型必填内容简介
siteId (path)UuidSite ID (UUIDv7).

响应

名称类型必填内容简介
installedbooleanWhether WordPress is on the package at all.
versionstringThe installed version, or "" when the vendor did not state one.
is_latestbooleanTri-state. Null means the vendor did not say, which is not "out of date": rendering an unknown as out of date invites a customer to run a core update on a live site for…
is_multisitebooleanWhether the install is a WordPress network.
update_availablebooleanThe flag a screen should act on. Derived from the vendor's update object being non-empty rather than from a comparison between two version strings nobody parsed — ⛔ {} is how…
update_versionstringThe version waiting, or "" when the install is current.
site_urlstringThe URL WordPress believes it is served from.
wizard_requiredbooleanWhether the install has never been through WordPress's own setup wizard — a half-installed site, not a broken one.
unavailable_reasonstring<, database, config, unreadable, not-routed>Read this before rendering installed. Empty means installed is authoritative. Non-empty means it is not: the probe failed and we could not determine the answer, so a…
capabilitiesobjectWhich of the eleven WordPress operations this package type permits, keyed by our stable machine identifiers — never a vendor string and never display text, so they are usable…

此端点可能返回的错误

401 · 403 · 404 · 429 · 503