hosting

PATCH /v1/sites/{siteId}/cdn/profile

Choose whether we keep the recommended CDN profile applied automatically.

所有 hosting 端点

所有开发者文档

身份验证

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

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

免费试用

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

curl -X PATCH https://api.zinndigital.com/v1/sites/{siteId}/cdn/profile \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "managed": <boolean> }'

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

详细信息

Turns the keep this applied toggle on or off for one site. With it off — the default, and what every existing site has — a setting changed at the provider is reported as drift and only a human puts it back. With it on, the zinn-managed-cdn-profile sweep re-applies the recommendation on a cadence. The default is off on purpose and it matters most for a customer on their own provider account: silently correcting a value they changed deliberately, inside an account they pay for, is not something to opt anybody into. Setting the toggle does not apply anything. Arming an automation and writing to a zone are different acts, so a customer switching it on to see what it does has not thereby had their edge rewritten — the sweep picks it up on its next pass, and anyone who wants it now uses the POST above. A site that is not served through our CDN is a 404. Requires hosting.cdn.manage.

参数

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

请求正文

名称类型必填内容简介
managedbooleantrue to have us keep the recommended profile applied; false to go back to reporting drift and changing nothing.

响应

名称类型必填内容简介
site_idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
profilestringWhich recommended profile applies to this site, chosen by product line — footprint_free caches HTML aggressively, mainstream leaves that decision to the origin.
settings_supportedbooleanWhether this site's CDN can express the profile's zone settings.
cache_rules_supportedbooleanWhether this site's CDN can express per-request cache rules. Separate from settings_supported because a provider may offer one and not the other.
driftedstring[]Setting keys whose live value differs from the recommendation, plus cache_rules when a recommended rule is missing at the provider. Empty means the zone matches what we…
settingsSiteCdnProfileSetting[]
rulesSiteCdnProfileRule[]The recommended rules, in evaluation order. Bypasses come first.
managedbooleanWhether the customer has asked us to keep this profile applied. false — the default — means drift is reported and nothing is corrected without a person pressing the button.…

此端点可能返回的错误

401 · 403 · 404 · 422 · 429 · 502 · 503