hosting
POST /v1/sites/{siteId}/hosting/applications
Install a one-click application onto a live site.
身份验证
请将 API 密钥作为 bearer 令牌发送。此端点在规范中未指明具体的权限,因此请为您的密钥赋予所需的最小权限,并通过检查响应来确认,而不是盲目假设。
此端点不需要组织 ID。您的密钥已用于识别其所属的组织,且响应范围也仅限于该组织。
免费试用
将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/hosting/applications \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "application": <string> }'已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 API 运行请求,以便您查看实际的响应。 在 API 控制台中打开此端点
详细信息
Installs `application` onto the site's hosting package. The submit is instant and the work runs as a durable workflow (§2.16), so this answers `202` with the install row — poll `GET` on this path and read `current` for its state. ⛔ **This is destructive**: a one-click install unpacks a whole application over the site's document root and creates a database, so it is gated on `hosting.applications.manage` rather than on `hosting.deploy.manage`, and only one install may run per site at a time (`409` otherwise). `404` for a site whose platform has no application catalogue at all — a site on our own fleet simply does not have this resource, and naming the platform it is *not* on would disclose which vendor a site runs on. `422` when the catalogue exists but that application is not offered: either the product line does not sell it, or the vendor no longer carries it. The application list is per **product line** — the footprint-free line deliberately offers a narrower set than mainstream — and it is read live, so a page left open can offer something that has since gone.
参数
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
siteId (path) | Uuid | 是 | Site ID (UUIDv7). |
请求正文
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
application | string | 是 | The `key` of an application from this site's own list. Validated against the **live** catalogue rather than a fixed enum, because the range changes without a release on our side. |
locale | string | 否 | The language to install the site in, as a platform language code (`de`, `pt-BR`). Applies to `wordpress` only, and is saved to the site so a later reinstall keeps it. Omit to us… |
响应
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
id | string | 是 | — |
application_key | string | 是 | — |
application_name | string | 是 | The display name captured at the moment of installing — a snapshot, so history still reads correctly after the platform renames or retires an application. |
status | string<queued, installing, installed, failed> | 是 | — |
message | string | 是 | Customer-facing English. Only meaningful when `failed`. |
requested_by | string | 否 | The actor who asked for it, for the audit trail. |
started_at | string | 否 | — |
finished_at | string | 否 | — |
created_at | string | 是 | — |
此端点可能返回的错误
401 · 403 · 404 · 409 · 422 · 429 · 503