hosting

DELETE /v1/sites/{siteId}/deletion

Stop a site's scheduled deletion.

所有 hosting 端点

所有开发者文档

身份验证

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

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

免费试用

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

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

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

详细信息

Cancels the countdown and returns the site's deletion state, which will read none. Takes no body. ⛔ DELETE on the deletion, not POST …/cancel. The resource being removed is the scheduled request, and giving the undo its own noun means no request body can ever turn a cancel into a delete by being slightly wrong. The teardown is stopped before the row is marked cancelled, never the other way round: a failed stop leaves a still-scheduled row the customer can retry, while the reverse leaves a row saying "cancelled" above a workflow that deletes their site. 422 when nothing is scheduled or the teardown has already started; 503 when the stop could not be performed, in which case the deletion is still scheduled and the request is safe to repeat. 404 for a site with no vendor hosting package, or one that is not theirs. Requires sites.view and sites.delete.

参数

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

响应

名称类型必填内容简介
site_idstringThe site this deletion state belongs to.
primary_domainstring⛔ What the customer must type into deleteSite, and what the engine compares against. Read it from here rather than from a Site object already on screen: one value on both…
statestring<none, scheduled, running, stalled, deleted>Where the site is in its lifecycle. A stable machine value the client turns into a localised sentence — never English composed by the engine (§2.19). ⛔ stalled is running that…
deletablebooleanWhether a deletion could be requested right now. False on a site whose state does not allow it, so the form is explained rather than offered and refused.
scheduled_forstringWhen the teardown fires, or null when nothing is scheduled.
requested_atstringWhen the deletion was requested, or null when nothing is scheduled.
grace_daysintegerHow many days the countdown runs. Clamped at both ends — a floor of one day is what stops a misconfiguration meaning delete now.
grace_free_reasonstring<, internal, never_provisioned>Why this site would skip the grace period entirely, or "" when it would not. never_provisioned means the site is failed — provisioning never completed, so nothing was ever…
can_cancelbooleanIts own field, and never recomputed as state == "scheduled". Once the teardown starts, the request row still says scheduled while the site is already being deleted; a…

此端点可能返回的错误

401 · 403 · 404 · 409 · 422 · 429 · 503