方法路径摘要认证
GET/v1/sitesList websites visible in the authenticated scope登录会话
POST/v1/sitesCreate a website登录会话
POST/v1/sites/batch-actionEnable, disable, soft-delete, queue CNAME regeneration for, or set the HTTPS protocols of websites登录会话
GET/v1/sites/exportExport an immutable snapshot of site domains登录会话
GET/v1/sites/{id}Get one website and its basic settings登录会话
PATCH/v1/sites/{id}Replace the complete basic or origin settings section登录会话
DELETE/v1/sites/{id}Soft-delete a website登录会话
POST/v1/sites/{id}/access-check接入状态 > 立即检查 (resolve the site's domains now)登录会话
POST/v1/sites/{id}/auto-dns/sync解析检测 > 同步解析 (run the site's automatic DNS records again)登录会话
POST/v1/sites/{id}/lockLock a website against tenant writes登录会话
POST/v1/sites/{id}/origin-failbackSwitch the pool back to the highest healthy level (manual failback)登录会话
GET/v1/sites/{id}/origin-routingGet the normalized conditional origin-routing document登录会话
PUT/v1/sites/{id}/origin-routingReplace the complete conditional origin-routing document登录会话
GET/v1/sites/{id}/origin-statusOrigin pool probe state and the active origin level登录会话
GET/v1/sites/{id}/schedule302Get the site's HTTP 302 scheduling settings登录会话
PUT/v1/sites/{id}/schedule302Replace the site's HTTP 302 scheduling settings登录会话
POST/v1/sites/{id}/transferMove a website to another user登录会话
POST/v1/sites/{id}/unlockRestore tenant write access to a website登录会话
GET/v1/sites/{site_id}/accessGet a site's request handling settings登录会话
PUT/v1/sites/{site_id}/accessReplace a site's request handling settings登录会话
GET/v1/sites/{site_id}/certificate-bindingGet the active certificate binding for one site登录会话
POST/v1/sites/{site_id}/dns-reconcile/applyPersist and enqueue a DNS reconciliation task登录会话
POST/v1/sites/{site_id}/dns-reconcile/dry-runBuild a deterministic repair plan without provider side effects登录会话
GET/v1/sites/{site_id}/dns-reconcile/tasks/{task_id}Read one durable DNS reconciliation task登录会话
POST/v1/sites/{site_id}/dns-reconcile/tasks/{task_id}/cancelPersist a cancellation request for a DNS reconciliation task登录会话
POST/v1/sites/{site_id}/dns-reconcile/tasks/{task_id}/commitDelete superseded records after propagation is healthy登录会话
GET/v1/sites/{site_id}/traffic-limitRead a website's traffic caps and their enforcement (sites.read)登录会话
PUT/v1/sites/{site_id}/traffic-limitReplace a website's traffic caps (sites.manage)登录会话

契约文件:api/openapi/v1/sites.yaml api/control-site-access.openapi.yaml api/control-certificate-assets.openapi.yaml api/control-dns-reconcile.openapi.yaml api/control-site-traffic-limit.openapi.yaml

接口详情

GET /v1/sites

List websites visible in the authenticated scope

operationId
listSites
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Platform administrators can list all tenant scopes. Tenant principals are always restricted by the server to their active tenant scope, and owner and region are redacted in their response. The owner, region_id, and node_group_id filters are platform-only to prevent count-based disclosure of redacted metadata.

参数

listSites 参数
名称位置类型必填说明
pagequeryinteger否—
limitqueryinteger否—
domainquerystring否Case-insensitive domain substring; a positive decimal also matches the site display ID exactly.
domainsquerystring否Comma- or whitespace-separated exact domains, at most 50.
origin_ipquerystring否—
site_idsquerystring否Comma- or whitespace-separated UUIDs, at most 100.
ownerquerystring否—
package_idquerystring(uuid)否—
packagequerystring否Case-insensitive substring of the site's package name (the name form of package_id).
sitequerystring否Case-insensitive domain substring or exact site display ID (the name form of site_ids).
group_idquerystring(uuid)否—
region_idquerystring(uuid)否—
node_group_idquerystring(uuid)否—
cname_domainquerystring否—
cname_hostnamequerystring否—
http_portquerystring否—
https_portquerystring否—
https_enabledqueryboolean否—
enabledqueryboolean否—
statusquerystring: active / disabled / package_expired / traffic_exceeded / locked / syncing / sync_failed否—
is_defaultqueryboolean否—
sync_statusquerystring: synced / pending / failed否—

响应

listSites 响应
状态码说明
200Stable page ordered by creation time and ID descending.

字段:items: array<SiteListItem> total: integer(int64) page: integer limit: integer

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/sites

Create a website

operationId
createSite
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.manage and Idempotency-Key. A platform principal must provide target_scope_id and owner_id. A tenant principal is forced to its active scope and own user ID even if those fields are supplied.

参数

createSite 参数
名称位置类型必填说明
Idempotency-Keyheaderstring是Stable per-actor key. Reuse with different normalized input returns 409 idempotency_conflict.

请求体

application/json · 必填:是

createSite 请求体
名称类型必填说明
target_scope_idstring(uuid)否—
owner_idstring(uuid)否—
basicSiteBasicRequest是—
origin_poolOriginPool否Optional atomic rich origin configuration. When omitted, the server derives a pool from basic.origins. When present, its canonical host and port sequence must exactly match basic.origins. A missing balance_method follows the owner's site default (balance_way), then the platform website default, then round_robin. Missing connect_timeout_ms / read_timeout_ms follow the owner's site defaults, then 3000 / 30000.
dns_provider_idstring(uuid)否建站「DNS API(自动添加记录)」: a verified DNS API account of the owner (needs dns.manage). After the site is created, every domain gets a CNAME to the site CNAME through it (site.auto_dns). A failure there never fails the create; it shows in auto_dns and is retried. 422 dns_provider_unusable: not a verified account of the owner.

响应

createSite 响应
状态码说明
201Created, or the stored result of an identical idempotent retry.

字段:id: string(uuid) scope_id: string(uuid) display_id: string version: integer(int64) owner: OwnerReference | null created_at: string(date-time) updated_at: string(date-time) lock: SiteLockState listener_state: SiteListenerState https_certificate_bound?: boolean basic: SiteBasicResponse origin_pool: OriginPool package_expires_at?: string(date-time) | null(date-time) package_expired_days?: integer | null package_remaining_days?: integer | null access_readiness?: SiteAccessReadiness | null package_unavailable_reason?: string: no_package / package_disabled / package_deleted / null | null: no_package / package_disabled / package_deleted / null

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
409Domain, version, idempotency, website lock-state, or origin-section conflict.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/sites/batch-action

Enable, disable, soft-delete, queue CNAME regeneration for, or set the HTTPS protocols of websites

operationId
batchSiteAction
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.manage and Idempotency-Key. The response preserves input order while rows are locked in UUID order. Business failures are reported per item and do not undo successful items; a database or audit failure rolls back the complete batch. Tenant principals see resources outside their active scope as site_not_found. Tenant actions against a platform-locked site fail with site_locked, while platform principals retain maintenance access. Enable performs the same local entitlement feature, state, and domains.count checks as a single website update. Disable and delete remain available while entitlement is in grace or expired state. These actions change control-plane desired state only and do not claim that an edge configuration has been activated. regenerate_cname applies only to failed CNAME allocations, requires sites.manage and dns.manage, and transactionally creates one durable CNAME job per accepted site. Its per-item result is queued; the returned site.cname_task_id is the durable task identity and site.cname_state remains pending until provider reconciliation plus authoritative and public recursive convergence completes. set_protocols (网站协议批量设置) writes basic.http2_enabled, basic.http3_enabled and basic.tls_prefer_server_ciphers of each selected site at its expected_version, as a single-site basic update would; keys left out of protocols keep each site's value. Each changed site records site.tls_profile.update, and every scope with an updated site queues its automatic publication (site.update). Its per-item result is updated.

参数

batchSiteAction 参数
名称位置类型必填说明
Idempotency-Keyheaderstring是Stable per-actor key. Reuse with different normalized input returns 409 idempotency_conflict.

请求体

application/json · 必填:是

batchSiteAction 请求体
名称类型必填说明
actionstring: enable / disable / delete / regenerate_cname / set_protocols是—
itemsarray<BatchSiteActionItem>是Site IDs must be unique even when expected versions differ.
protocolsBatchSiteProtocols否Required with set_protocols and rejected with every other action. An omitted key keeps each site's value; tls_prefer_server_ciphers null follows the cipher preset again.

响应

batchSiteAction 响应
状态码说明
200Ordered per-item results, or the stored result of an identical idempotent retry.

字段:items: array<BatchSiteActionItemResult>

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
409Domain, version, idempotency, website lock-state, or origin-section conflict.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/sites/export

Export an immutable snapshot of site domains

operationId
exportSiteDomains
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.export. Tenant principals are restricted to their active tenant scope. Platform principals must provide target_scope_id. The response is a UTF-8 CSV produced from an immutable, actor- and filter-bound snapshot; cells that could be interpreted as spreadsheet formulas are escaped.

参数

exportSiteDomains 参数
名称位置类型必填说明
target_scope_idquerystring(uuid)否Required for platform principals; tenants may omit their own scope.
domainquerystring否Optional case-insensitive domain substring filter.
domainsquerystring否Comma- or whitespace-separated exact domains, at most 50.
origin_ipquerystring否—
site_idsquerystring否Comma- or whitespace-separated UUIDs, at most 100.
ownerquerystring否—
package_idquerystring(uuid)否—
packagequerystring否Case-insensitive substring of the site's package name (the name form of package_id).
sitequerystring否Case-insensitive domain substring or exact site display ID (the name form of site_ids).
group_idquerystring(uuid)否—
region_idquerystring(uuid)否—
node_group_idquerystring(uuid)否—
cname_domainquerystring否—
cname_hostnamequerystring否—
http_portquerystring否—
https_portquerystring否—
https_enabledqueryboolean否—
enabledqueryboolean否—
statusquerystring: active / disabled / package_expired / traffic_exceeded / locked / syncing / sync_failed否—
is_defaultqueryboolean否—
sync_statusquerystring: synced / pending / failed否—

响应

exportSiteDomains 响应
状态码说明
200Immutable site-domain snapshot in deterministic order.
400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/sites/{id}

Get one website and its basic settings

operationId
getSite
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

参数

getSite 参数
名称位置类型必填说明
idpathstring(uuid)是—

响应

getSite 响应
状态码说明
200Website detail. Tenant responses redact owner.

字段:id: string(uuid) scope_id: string(uuid) display_id: string version: integer(int64) owner: OwnerReference | null created_at: string(date-time) updated_at: string(date-time) lock: SiteLockState listener_state: SiteListenerState https_certificate_bound?: boolean basic: SiteBasicResponse origin_pool: OriginPool package_expires_at?: string(date-time) | null(date-time) package_expired_days?: integer | null package_remaining_days?: integer | null access_readiness?: SiteAccessReadiness | null package_unavailable_reason?: string: no_package / package_disabled / package_deleted / null | null: no_package / package_disabled / package_deleted / null

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

PATCH /v1/sites/{id}

Replace the complete basic or origin settings section

operationId
updateSiteSettings
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

section=basic and section=origin are writable discriminated variants. expected_version is a shared optimistic concurrency guard, so basic and origin writes against one website serialize on the same version. The complete selected section is required. Origin writes update control-plane desired state and the legacy basic.origins compatibility projection in one transaction; no edge configuration is generated or activated in this slice. A basic write may preserve an identical rich origin projection, but replacing origins while non-default origin metadata exists returns 409 origin_section_conflict. Identical retries require the same normalized payload and Idempotency-Key.

参数

updateSiteSettings 参数
名称位置类型必填说明
idpathstring(uuid)是—
Idempotency-Keyheaderstring是Stable per-actor key. Reuse with different normalized input returns 409 idempotency_conflict.

请求体

application/json · 必填:是

响应

updateSiteSettings 响应
状态码说明
200Updated, or the stored result of an identical retry.

字段:id: string(uuid) scope_id: string(uuid) display_id: string version: integer(int64) owner: OwnerReference | null created_at: string(date-time) updated_at: string(date-time) lock: SiteLockState listener_state: SiteListenerState https_certificate_bound?: boolean basic: SiteBasicResponse origin_pool: OriginPool package_expires_at?: string(date-time) | null(date-time) package_expired_days?: integer | null package_remaining_days?: integer | null access_readiness?: SiteAccessReadiness | null package_unavailable_reason?: string: no_package / package_disabled / package_deleted / null | null: no_package / package_disabled / package_deleted / null

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
409Domain, version, idempotency, website lock-state, or origin-section conflict.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

DELETE /v1/sites/{id}

Soft-delete a website

operationId
deleteSite
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

参数

deleteSite 参数
名称位置类型必填说明
idpathstring(uuid)是—
Idempotency-Keyheaderstring是Stable per-actor key. Reuse with different normalized input returns 409 idempotency_conflict.
If-Matchheaderstring是Quoted decimal version returned by ETag.

响应

deleteSite 响应
状态码说明
204Deleted, or an identical delete retry was replayed.
400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
409Domain, version, idempotency, website lock-state, or origin-section conflict.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/sites/{id}/access-check

接入状态 > 立即检查 (resolve the site's domains now)

operationId
checkSiteAccess
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.read. Resolves every domain of the site through the control plane host's resolver now (no DNS provider or third-party API), stores the result as the background check does and returns the site's access_readiness. Once a minute per site: 429 access_check_throttled with Retry-After (seconds) within the minute.

参数

checkSiteAccess 参数
名称位置类型必填说明
idpathstring(uuid)是—

响应

checkSiteAccess 响应
状态码说明
200The site's access readiness after the check.

字段:state: string: ready / pending / blocked checks: array<SiteAccessCheck>

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
429Rate limited; Retry-After gives the seconds to wait.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 429 被限速:等待后再试,降低并发。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/sites/{id}/auto-dns/sync

解析检测 > 同步解析 (run the site's automatic DNS records again)

operationId
syncSiteAutoDNS
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.manage and dns.manage. Resets the site's auto_dns task to pending (creating it with provider_id when the site has none) and returns at once; the records are written in the background. Repeating the call is harmless. 422 dns_provider_unusable: not a verified account of the site owner.

参数

syncSiteAutoDNS 参数
名称位置类型必填说明
idpathstring(uuid)是—

请求体

application/json · 必填:是

syncSiteAutoDNS 请求体
名称类型必填说明
provider_idstring(uuid)否another account of the owner; omitted keeps the task's

响应

syncSiteAutoDNS 响应
状态码说明
202Task scheduled.

字段:provider_id: string(uuid) provider_name: string state: string: pending / done / failed failure_code: string | null attempts: integer results: array<object> updated_at: string(date-time)

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
422Domain, version, idempotency, website lock-state, or origin-section conflict.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/sites/{id}/lock

Lock a website against tenant writes

operationId
lockSite
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.manage in a platform scope. The expected version is checked atomically. Locking changes only control-plane lock metadata and the website version; it does not disable or republish the active edge configuration. Tenant edit, enable/disable, and delete attempts return 409 site_locked until a platform administrator unlocks the site.

参数

lockSite 参数
名称位置类型必填说明
idpathstring(uuid)是—
Idempotency-Keyheaderstring是Stable per-actor key. Reuse with different normalized input returns 409 idempotency_conflict.

请求体

application/json · 必填:是

lockSite 请求体
名称类型必填说明
expected_versioninteger(int64)是—
reasonstring是—

响应

lockSite 响应
状态码说明
200Locked, or the stored result of an identical retry.

字段:id: string(uuid) scope_id: string(uuid) display_id: string version: integer(int64) owner: OwnerReference | null created_at: string(date-time) updated_at: string(date-time) lock: SiteLockState listener_state: SiteListenerState https_certificate_bound?: boolean basic: SiteBasicResponse origin_pool: OriginPool package_expires_at?: string(date-time) | null(date-time) package_expired_days?: integer | null package_remaining_days?: integer | null access_readiness?: SiteAccessReadiness | null package_unavailable_reason?: string: no_package / package_disabled / package_deleted / null | null: no_package / package_disabled / package_deleted / null

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
409Domain, version, idempotency, website lock-state, or origin-section conflict.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/sites/{id}/origin-failback

Switch the pool back to the highest healthy level (manual failback)

operationId
failbackSiteOrigin
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.manage and Idempotency-Key. Moves the active level to the lowest-numbered level that is healthy (the primary when it is), records site.origin.failback and republishes the site. 409 origin_failback_unavailable: no higher level is healthy.

参数

failbackSiteOrigin 参数
名称位置类型必填说明
idpathstring(uuid)是—
Idempotency-Keyheaderstring是Stable per-actor key. Reuse with different normalized input returns 409 idempotency_conflict.

响应

failbackSiteOrigin 响应
状态码说明
200State after the switch.

字段:site_id: string(uuid) failback_mode: string: auto / manual active_level: integer overall: string: healthy / unhealthy / unknown failback_ready: boolean levels: array<object> origins: array<object> switched_at: string(date-time) checked_at: string(date-time)

401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
409Domain, version, idempotency, website lock-state, or origin-section conflict.
500The operation failed without exposing internal details.

失败时怎么办

  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/sites/{id}/origin-routing

Get the normalized conditional origin-routing document

operationId
getSiteOriginRouting
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.read. Tenant principals can only read sites in their active scope. The document is ordered deterministically and represents control-plane desired state, not proof of edge activation. The response-only effective_retry and effective_l2_fallback objects expose the fixed fail-safe edge retry and L1-to-L2 direct-origin fallback guards. These guards are not caller-configurable and do not indicate that L2 routing is enabled for this site.

参数

getSiteOriginRouting 参数
名称位置类型必填说明
idpathstring(uuid)是—

响应

getSiteOriginRouting 响应
状态码说明
200Current normalized document and the shared site version.

字段:site_id: string(uuid) version: integer(int64) document: ConditionalOriginDocument effective_retry: ConditionalOriginEffectiveRetry effective_l2_fallback: ConditionalOriginEffectiveL2Fallback updated_at: string(date-time)

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

PUT /v1/sites/{id}/origin-routing

Replace the complete conditional origin-routing document

operationId
replaceSiteOriginRouting
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.manage, Idempotency-Key, and a strong If-Match value for the shared site version. The update, idempotency claim, automatic edge publication request, and site.origin_route.update audit event commit in one transaction. Identical semantic input is normalized before the idempotency digest is calculated. effective_retry and effective_l2_fallback are response-only and are rejected if supplied in this request document.

参数

replaceSiteOriginRouting 参数
名称位置类型必填说明
idpathstring(uuid)是—
Idempotency-Keyheaderstring是Stable per-actor key. Reuse with different normalized input returns 409 idempotency_conflict.
If-Matchheaderstring是Quoted decimal version returned by ETag.

请求体

application/json · 必填:是

replaceSiteOriginRouting 请求体
名称类型必填说明
schemastring是—
ingress_source_enabledboolean是—
poolsarray<ConditionalOriginPool>是—
default_pool_idstring是—
default_fallback_pool_idstring否—
routesarray<ConditionalOriginRoute>是—
retryConditionalOriginRetry是—

响应

replaceSiteOriginRouting 响应
状态码说明
200Updated state, or the stored result of an identical retry.

字段:site_id: string(uuid) version: integer(int64) document: ConditionalOriginDocument effective_retry: ConditionalOriginEffectiveRetry effective_l2_fallback: ConditionalOriginEffectiveL2Fallback updated_at: string(date-time)

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
409Domain, version, idempotency, website lock-state, or origin-section conflict.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/sites/{id}/origin-status

Origin pool probe state and the active origin level

operationId
getSiteOriginStatus
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.read. The control plane probes every origin of the pool (origin address with the pool's origin Host / SNI and health check path, from the tenant's own nodes when they can, else from the control plane). An origin is unhealthy after 3 consecutive failures, healthy after 2 consecutive successes, unknown before that or when it cannot be probed. Aggregated edge scheduling reads overall.

参数

getSiteOriginStatus 参数
名称位置类型必填说明
idpathstring(uuid)是—

响应

getSiteOriginStatus 响应
状态码说明
200Current state.

字段:site_id: string(uuid) failback_mode: string: auto / manual active_level: integer overall: string: healthy / unhealthy / unknown failback_ready: boolean levels: array<object> origins: array<object> switched_at: string(date-time) checked_at: string(date-time)

401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
500The operation failed without exposing internal details.

失败时怎么办

  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/sites/{id}/schedule302

Get the site's HTTP 302 scheduling settings

operationId
getSiteSchedule302
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.read. HTTP 302 scheduling (together with DNS scheduling) lets the node a visitor reaches redirect large downloads and video to the best node for the visitor's carrier and region. Disabled sites return the default settings with enabled false. plain_http reports whether the site has a plain HTTP port, which scheduling needs.

参数

getSiteSchedule302 参数
名称位置类型必填说明
idpathstring(uuid)是—

响应

getSiteSchedule302 响应
状态码说明
200Current settings and the shared site version.

字段:site_id: string(uuid) version: integer settings: SiteSchedule302Settings plain_http: boolean updated_at: string(date-time) | null(date-time)

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

PUT /v1/sites/{id}/schedule302

Replace the site's HTTP 302 scheduling settings

operationId
replaceSiteSchedule302
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.manage, Idempotency-Key, and a strong If-Match value for the shared site version. The update, idempotency claim, automatic edge publication request and the site.schedule302.update audit event commit in one transaction; a refused write records the event with result denied and a reason code. Turning scheduling off deletes the settings and the site's signing key. 422 schedule302_no_plain_http: the site has no plain HTTP port.

参数

replaceSiteSchedule302 参数
名称位置类型必填说明
idpathstring(uuid)是—
Idempotency-Keyheaderstring是Stable per-actor key. Reuse with different normalized input returns 409 idempotency_conflict.
If-Matchheaderstring是Quoted decimal version returned by ETag.

请求体

application/json · 必填:是

replaceSiteSchedule302 请求体
名称类型必填说明
enabledboolean是—
targetstring: address / hostname是Redirect to the node's line-group endpoint address, or to its direct hostname (nodes without one are skipped).
keep_pathboolean是—
keep_queryboolean是—
signature_ttl_secondsinteger是—
https_to_httpboolean是Also redirect HTTPS requests; they land on plain HTTP (nodes hold no certificate for their address).
extensionsarray<string>是—
path_prefixesarray<string>是—
min_size_bytesinteger是Redirect only URLs whose response the node already served at least this large (0 off).

响应

replaceSiteSchedule302 响应
状态码说明
200Updated state, or the stored result of an identical retry.

字段:site_id: string(uuid) version: integer settings: SiteSchedule302Settings plain_http: boolean updated_at: string(date-time) | null(date-time)

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
409Domain, version, idempotency, website lock-state, or origin-section conflict.
422Invalid JSON, field, or query input.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/sites/{id}/transfer

Move a website to another user

operationId
transferSite
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.manage in a platform scope held by a platform administrator. In one transaction the website is re-created in the target user's tenant (new website ID, newly allocated CNAME) and the current website is deleted; the old CNAME retires by the delete rules and the customer must repoint DNS from from_cname to the new site's CNAME. Historical statistics, logs and bills stay with the previous owner. The target is another active user with a tenant of its own; target_package_subscription_id is one of that user's own package subscriptions, or null for no package. copied lists what was carried to the new website and released what the administrator must configure again; item names are http_policy, cache_policy, certificate, waf_policy, cc_policy, acl_policy, auto_defense and js_challenge (automatic DNS records are not moved). Without a carried certificate HTTPS is off on the new website. Errors: 422 site_transfer_target_invalid (target is not an active user with its own tenant, or is the current owner), 422 domain_blocked, 409 domain_verified_by_other (an apex is verified by another account, including the previous owner; domain ownership is not transferred), 409 domain_ownership_required, 409 site_locked, 409 version_conflict (stale expected_version) and 409 idempotency_conflict. Domain errors carry the refused domain and apex.

参数

transferSite 参数
名称位置类型必填说明
idpathstring(uuid)是—
Idempotency-Keyheaderstring是Stable per-actor key. Reuse with different normalized input returns 409 idempotency_conflict.

请求体

application/json · 必填:是

transferSite 请求体
名称类型必填说明
expected_versioninteger(int64)是—
target_user_idstring(uuid)是—
target_package_subscription_idstring(uuid) | null(uuid)否—

响应

transferSite 响应
状态码说明
201Moved, or the stored result of an identical idempotent retry. The ETag is the new website's version.

字段:site: SiteDetail from_site_id: string(uuid) from_cname: string copied: array<string: http_policy / cache_policy / certificate / waf_policy / cc_policy / acl_policy / auto_defense / js_challenge> released: array<string: http_policy / cache_policy / certificate / waf_policy / cc_policy / acl_policy / auto_defense / js_challenge>

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
409domain_verified_by_other, domain_ownership_required, site_locked, version_conflict or idempotency_conflict.
422site_transfer_target_invalid or domain_blocked.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/sites/{id}/unlock

Restore tenant write access to a website

operationId
unlockSite
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires sites.manage in a platform scope. The expected version is checked atomically and the previous lock metadata is cleared. Existing edge traffic and operational website status are not changed.

参数

unlockSite 参数
名称位置类型必填说明
idpathstring(uuid)是—
Idempotency-Keyheaderstring是Stable per-actor key. Reuse with different normalized input returns 409 idempotency_conflict.

请求体

application/json · 必填:是

unlockSite 请求体
名称类型必填说明
expected_versioninteger(int64)是—

响应

unlockSite 响应
状态码说明
200Unlocked, or the stored result of an identical retry.

字段:id: string(uuid) scope_id: string(uuid) display_id: string version: integer(int64) owner: OwnerReference | null created_at: string(date-time) updated_at: string(date-time) lock: SiteLockState listener_state: SiteListenerState https_certificate_bound?: boolean basic: SiteBasicResponse origin_pool: OriginPool package_expires_at?: string(date-time) | null(date-time) package_expired_days?: integer | null package_remaining_days?: integer | null access_readiness?: SiteAccessReadiness | null package_unavailable_reason?: string: no_package / package_disabled / package_deleted / null | null: no_package / package_disabled / package_deleted / null

400Invalid JSON, field, or query input.
401Authentication is required.
403The principal lacks sites.read or sites.manage.
404The site is absent, deleted, or outside the tenant scope.
409Domain, version, idempotency, website lock-state, or origin-section conflict.
500The operation failed without exposing internal details.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/sites/{site_id}/access

Get a site's request handling settings

operationId
getSiteAccess
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:sites.read

说明(契约原文)

Basic auth users are returned by name only; passwords are never stored or returned. Tenant principals only reach sites of their scope. ETag is the site version.

参数

getSiteAccess 参数
名称位置类型必填说明
site_idpathstring(uuid)是—

响应

getSiteAccess 响应
状态码说明
200The site's settings

字段:site_id: string(uuid) version: integer settings: SiteAccessSettings https_enabled: boolean force_https: boolean domains: array<string> updated_at: string(date-time) | null(date-time)

400Error
401Error
403Error
404Error

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。

↑ 回到列表

PUT /v1/sites/{site_id}/access

Replace a site's request handling settings

operationId
replaceSiteAccess
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:sites.manage

说明(契约原文)

Replaces every setting; an absent or null setting is off, and all off removes the site's row. A basic auth user without password keeps its stored secret (SHA-256 of site_id:username:password). HSTS and a forced HTTPS status other than 301 or excluded domains need the site's HTTPS. The write advances the site version: a manual scope shows it pending, an automatic scope publishes it. The write and its site.access.update audit event (changes, no secrets) commit together; a refused write is audited as denied with its reason code.

参数

replaceSiteAccess 参数
名称位置类型必填说明
site_idpathstring(uuid)是—
Idempotency-Keyheaderstring是—
If-Matchheaderstring是The quoted site version (GET ETag)

请求体

application/json · 必填:是

replaceSiteAccess 请求体
名称类型必填说明
host_redirectsarray<HostRedirect>否—
hstsHSTS | null否—
compressionCompression | null否—
limitsLimits | null否—
basic_authBasicAuth | null否—
maintenanceMaintenance | null否—
webpWebP | null否—
response_rulesarray<ResponseRule>否Response phase rules, evaluated in order when the origin's response headers arrive (the body is never read). Absent or [] = none; a read always returns the list. Needs nodes declaring EDGE_RESPONSE_RULES (a release to others is refused and names them).
force_httpsForceHTTPS否—

响应

replaceSiteAccess 响应
状态码说明
200The site's settings after the write

字段:site_id: string(uuid) version: integer settings: SiteAccessSettings https_enabled: boolean force_https: boolean domains: array<string> updated_at: string(date-time) | null(date-time)

400Error
401Error
403Error
404Error
409site_locked, version_conflict or idempotency_conflict
422validation_error or site_access_https_required

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。

↑ 回到列表

GET /v1/sites/{site_id}/certificate-binding

Get the active certificate binding for one site

operationId
getCertificateSiteBinding
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:certificates.read

说明(契约原文)

Returns the current bound fact and its active immutable certificate version in one tenant-scoped read. An unbound site returns the stable certificate_site_binding_not_found error code.

参数

getCertificateSiteBinding 参数
名称位置类型必填说明
site_idpathstring(uuid)是—
target_scope_idquerystring(uuid)否Required for platform detail and write operations; optional for the collection GET to list active tenants. Forbidden when it differs from a tenant actor scope.
X-Request-IDheaderstring否—

响应

getCertificateSiteBinding 响应
状态码说明
200Active site certificate binding and version

字段:binding: CertificateAssetBinding version: CertificateAssetVersion

400Invalid request, metadata or certificate material
401Bearer session missing or invalid
403Tenant scope or live permission denied
404Certificate asset or version not found
405Method not allowed
500Sanitized internal failure

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/sites/{site_id}/dns-reconcile/apply

Persist and enqueue a DNS reconciliation task

operationId
applyDNSReconciliation
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:dns.manage

说明(契约原文)

Requires dns.manage and a live DNS reconciliation entitlement. The authenticated tenant, site path, idempotency key, canonical payload digest, and provider revision form the durable command identity. A same-key retry with a different payload returns 409.

参数

applyDNSReconciliation 参数
名称位置类型必填说明
site_idpathstring(uuid)是Canonical lower-case UUID of a site in the authenticated tenant.
X-Request-IDheaderstring是—
traceparentheaderstring是—
Idempotency-Keyheaderstring是Stable command key; retry only with the same route and payload.
If-Matchheaderstring是Strong quoted decimal provider/task revision, for example `"7"`.

请求体

application/json · 必填:是

applyDNSReconciliation 请求体
名称类型必填说明
namestring是—
expectedarray<ExpectedRecord>是—
authoritative_nsarray<string>是—
ttlinteger是—
linestring否Provider routing line. Empty/default values preserve the provider default line.
weightinteger否Provider record weight; zero is the provider default.
propagation_started_atstring(date-time)否—
propagation_window_secondsinteger是—
providerProviderSnapshot是—

响应

applyDNSReconciliation 响应
状态码说明
202Durable job created or replayed and available for workers.

字段:id: string(uuid) tenant_id: string(uuid) site_id: string(uuid) revision: integer(int64) required_consecutive: integer job: Job request: CheckRequest result: ReconcileResult created_at: string(date-time) updated_at: string(date-time) replayed: boolean

400Non-canonical path/header, unsupported media type, oversized body, unknown field, or invalid JSON.
401Exactly one valid Bearer session is required.
403Live IAM permission or DNS reconciliation entitlement denied.
405Method is not supported by this route.
409Idempotency payload conflict or task state does not permit the command.
412If-Match or provider revision is stale.
408Mutation result is unknown; retry only with the same key and payload.
503Mutation result is unknown; retry only with the same key and payload.
504Mutation result is unknown; retry only with the same key and payload.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 412 版本已变:回读最新 ETag 后重新判断,再带新的 If-Match 提交。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/sites/{site_id}/dns-reconcile/dry-run

Build a deterministic repair plan without provider side effects

operationId
dryRunDNSReconciliation
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:dns.read

参数

dryRunDNSReconciliation 参数
名称位置类型必填说明
site_idpathstring(uuid)是Canonical lower-case UUID of a site in the authenticated tenant.
X-Request-IDheaderstring是—
traceparentheaderstring是—

请求体

application/json · 必填:是

dryRunDNSReconciliation 请求体
名称类型必填说明
namestring是—
expectedarray<ExpectedRecord>是—
authoritative_nsarray<string>是—
ttlinteger是—
linestring否Provider routing line. Empty/default values preserve the provider default line.
weightinteger否Provider record weight; zero is the provider default.
propagation_started_atstring(date-time)否—
propagation_window_secondsinteger是—
providerProviderSnapshot是—

响应

dryRunDNSReconciliation 响应
状态码说明
200Deterministic side-effect-free reconciliation plan.

字段:tenant_id: string(uuid) site_id: string(uuid) zone_id: string(uuid) payload_digest: string plan: RepairPlan status: string: dry_run / applying / propagating / ready_to_commit / committed / failed / cancelled / timed_out / commit_failed replayed: boolean started_at: string(date-time) updated_at: string(date-time) ready_at?: string(date-time) initial_revision: integer(int64) provider_revision: integer(int64) operations: array<OperationResult> deferred_deletes: array<OperationResult> compensation_plan: array<ProviderOperation> propagation: array<PropagationAttempt> last_check?: CheckResult error_class: string: / transient / permanent / revision_conflict / cancelled / timeout error_code: string

400Non-canonical path/header, unsupported media type, oversized body, unknown field, or invalid JSON.
401Exactly one valid Bearer session is required.
403Live IAM permission or DNS reconciliation entitlement denied.
405Method is not supported by this route.
408Read-only request was cancelled.
503Required runtime dependency is unavailable.
504Read-only request timed out.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/sites/{site_id}/dns-reconcile/tasks/{task_id}

Read one durable DNS reconciliation task

operationId
getDNSReconciliationTask
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:dns.read

说明(契约原文)

Requires dns.read. Unknown, cross-tenant, and task/site mismatches all return the same 404 response. Tenant scope is never accepted from a path, query parameter, or request body.

参数

getDNSReconciliationTask 参数
名称位置类型必填说明
site_idpathstring(uuid)是Canonical lower-case UUID of a site in the authenticated tenant.
task_idpathstring(uuid)是Canonical lower-case UUID of a dns_reconcile job.
X-Request-IDheaderstring否—
traceparentheaderstring否—

响应

getDNSReconciliationTask 响应
状态码说明
200Current durable task facts.

字段:id: string(uuid) tenant_id: string(uuid) site_id: string(uuid) revision: integer(int64) required_consecutive: integer job: Job request: CheckRequest result: ReconcileResult created_at: string(date-time) updated_at: string(date-time) replayed: boolean

400Non-canonical path/header, unsupported media type, oversized body, unknown field, or invalid JSON.
401Exactly one valid Bearer session is required.
403Live IAM permission or DNS reconciliation entitlement denied.
404Task is absent or outside the authenticated tenant/site scope.
405Method is not supported by this route.
408Read-only request was cancelled.
503Required runtime dependency is unavailable.
504Read-only request timed out.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/sites/{site_id}/dns-reconcile/tasks/{task_id}/cancel

Persist a cancellation request for a DNS reconciliation task

operationId
cancelDNSReconciliationTask
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:dns.manage

参数

cancelDNSReconciliationTask 参数
名称位置类型必填说明
site_idpathstring(uuid)是Canonical lower-case UUID of a site in the authenticated tenant.
task_idpathstring(uuid)是Canonical lower-case UUID of a dns_reconcile job.
X-Request-IDheaderstring是—
traceparentheaderstring是—
Idempotency-Keyheaderstring是Stable command key; retry only with the same route and payload.
If-Matchheaderstring是Strong quoted decimal provider/task revision, for example `"7"`.

请求体

application/json · 必填:是

响应

cancelDNSReconciliationTask 响应
状态码说明
200Current durable task facts.

字段:id: string(uuid) tenant_id: string(uuid) site_id: string(uuid) revision: integer(int64) required_consecutive: integer job: Job request: CheckRequest result: ReconcileResult created_at: string(date-time) updated_at: string(date-time) replayed: boolean

400Non-canonical path/header, unsupported media type, oversized body, unknown field, or invalid JSON.
401Exactly one valid Bearer session is required.
403Live IAM permission or DNS reconciliation entitlement denied.
404Task is absent or outside the authenticated tenant/site scope.
405Method is not supported by this route.
409Idempotency payload conflict or a provider operation is still in flight.
412If-Match or provider revision is stale.
408Mutation result is unknown; retry only with the same key and payload.
503Mutation result is unknown; retry only with the same key and payload.
504Mutation result is unknown; retry only with the same key and payload.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 412 版本已变:回读最新 ETag 后重新判断,再带新的 If-Match 提交。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/sites/{site_id}/dns-reconcile/tasks/{task_id}/commit

Delete superseded records after propagation is healthy

operationId
commitDNSReconciliationTask
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:dns.manage

说明(契约原文)

Requires dns.manage and a live DNS reconciliation entitlement. Commit rechecks convergence and provider revision before processing deferred deletes. Crash/retry reuses the same command identity and durable task.

参数

commitDNSReconciliationTask 参数
名称位置类型必填说明
site_idpathstring(uuid)是Canonical lower-case UUID of a site in the authenticated tenant.
task_idpathstring(uuid)是Canonical lower-case UUID of a dns_reconcile job.
X-Request-IDheaderstring是—
traceparentheaderstring是—
Idempotency-Keyheaderstring是Stable command key; retry only with the same route and payload.
If-Matchheaderstring是Strong quoted decimal provider/task revision, for example `"7"`.

请求体

application/json · 必填:是

响应

commitDNSReconciliationTask 响应
状态码说明
200Current durable task facts.

字段:id: string(uuid) tenant_id: string(uuid) site_id: string(uuid) revision: integer(int64) required_consecutive: integer job: Job request: CheckRequest result: ReconcileResult created_at: string(date-time) updated_at: string(date-time) replayed: boolean

400Non-canonical path/header, unsupported media type, oversized body, unknown field, or invalid JSON.
401Exactly one valid Bearer session is required.
403Live IAM permission or DNS reconciliation entitlement denied.
404Task is absent or outside the authenticated tenant/site scope.
405Method is not supported by this route.
409Idempotency payload conflict or task state does not permit the command.
412If-Match or provider revision is stale.
408Mutation result is unknown; retry only with the same key and payload.
503Mutation result is unknown; retry only with the same key and payload.
504Mutation result is unknown; retry only with the same key and payload.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 412 版本已变:回读最新 ETag 后重新判断,再带新的 If-Match 提交。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/sites/{site_id}/traffic-limit

Read a website's traffic caps and their enforcement (sites.read)

operationId
getSiteTrafficLimit
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

参数

getSiteTrafficLimit 参数
名称位置类型必填说明
site_idpathstring(uuid)是—

响应

getSiteTrafficLimit 响应
状态码说明
200The caps; ETag is the site version.

字段:site_id: string(uuid) version: integer setting: SiteTrafficLimitSetting total_since: string(date-time) | null(date-time) exceeded_period: string: / daily / monthly / total exceeded_at: string(date-time) | null(date-time) evaluated_at: string(date-time) | null(date-time) updated_at: string(date-time) | null(date-time)

400validation_error, site_not_found, site_locked, version_conflict or idempotency_conflict.
403validation_error, site_not_found, site_locked, version_conflict or idempotency_conflict.
404validation_error, site_not_found, site_locked, version_conflict or idempotency_conflict.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。

↑ 回到列表

PUT /v1/sites/{site_id}/traffic-limit

Replace a website's traffic caps (sites.manage)

operationId
putSiteTrafficLimit
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

参数

putSiteTrafficLimit 参数
名称位置类型必填说明
site_idpathstring(uuid)是—
Idempotency-Keyheaderstring是—
If-Matchheaderstring是The quoted site version.

请求体

application/json · 必填:是

putSiteTrafficLimit 请求体
名称类型必填说明
enabledboolean是An enabled limit needs at least one cap.
daily_bytesinteger | null是—
monthly_bytesinteger | null是—
total_bytesinteger | null是Counted from total_since (set when the total cap is set or changed).
time_zonestring是IANA zone the daily and monthly periods start in ("" means Asia/Shanghai).
notice_htmlstring是Page served with status 509 while exceeded ("" the default page).

响应

putSiteTrafficLimit 响应
状态码说明
200The stored caps; the site's next release enforces them.

字段:site_id: string(uuid) version: integer setting: SiteTrafficLimitSetting total_since: string(date-time) | null(date-time) exceeded_period: string: / daily / monthly / total exceeded_at: string(date-time) | null(date-time) evaluated_at: string(date-time) | null(date-time) updated_at: string(date-time) | null(date-time)

400validation_error, site_not_found, site_locked, version_conflict or idempotency_conflict.
403validation_error, site_not_found, site_locked, version_conflict or idempotency_conflict.
404validation_error, site_not_found, site_locked, version_conflict or idempotency_conflict.
409validation_error, site_not_found, site_locked, version_conflict or idempotency_conflict.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。

↑ 回到列表