开放接口

/v1/site-publications

9 个接口 · 8 个接口支持 API Key

← 全部分组 · 第一次调用?先看教程:认证、权限、请求与响应、常见失败

方法路径摘要认证
GET/v1/site-publicationsList publications in the authenticated tenant scopeAPI Key 可调登录会话
POST/v1/site-publicationsPublish the authenticated tenant scope登录会话
GET/v1/site-publications/security-activationsGet the authoritative security binding and latest activation candidateAPI Key 可调登录会话
POST/v1/site-publications/security-activationsStage a security policy candidate and start its canary rolloutAPI Key 可调登录会话
GET/v1/site-publications/security-activations/rebind-statusCount bound sites still behind their WAF/CC library and those the package does not entitleAPI Key 可调登录会话
GET/v1/site-publications/security-activations/{candidate_id}Get a security policy activation candidateAPI Key 可调登录会话
POST/v1/site-publications/security-activations/{candidate_id}/reconcileReconcile canary, expansion, recovery, and promotionAPI Key 可调登录会话
POST/v1/site-publications/security-activations/{candidate_id}/rollbackClone an old policy into a new monotonic version and stage itAPI Key 可调登录会话
GET/v1/site-publications/{publication_id}Get one publication in the authenticated tenant scopeAPI Key 可调登录会话

契约文件:api/control-site-publications.openapi.yaml

接口详情

GET /v1/site-publications

List publications in the authenticated tenant scope

operationId
listTenantSitePublications
认证
  • API Key:请求头 Authorization: CdncaKey <key_id>.<secret>。有效权限是 Key 的范围与所有者当前权限的交集。
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:sites.read

说明(契约原文)

Requires a tenant-scoped principal with sites.read. scope_id is not accepted. Signatures, hashes, target snapshot metadata, and platform scope identifiers are omitted from tenant responses.

参数

listTenantSitePublications 参数
名称位置类型必填说明
limitqueryinteger否—
cursorquerystring否Versioned base64url HMAC-SHA256 envelope returned by the immediately preceding page. It is bound to audience, resolved tenant scope, resource kind, and the rollout ID for deployment pages. It cannot be reused across those boundaries or modified.

响应

listTenantSitePublications 响应
状态码说明
200Stable tenant publication page with target metadata redacted.

字段:items: array<TenantPublication> current_source_revision: integer(int64) next_cursor?: string pending_modules?: array<PendingModule> automatic_failure?: AutomaticPublicationFailure

400Invalid UUID, RFC3339 value, enum, cursor, header, query, or JSON body.
401Authentication is missing or invalid.
403Wrong audience, missing permission, or tenant scope override.
503Storage, signing, cancellation, response validation, or another internal dependency is unavailable.

失败时怎么办

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

↑ 回到列表

POST /v1/site-publications

Publish the authenticated tenant scope

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

全部需要:sites.manage

说明(契约原文)

Requires a tenant session with sites.manage. configuration_scope_id must exactly equal the authenticated scope; authorization and scope binding complete before any publication mutation.

参数

publishTenantSiteConfiguration 参数
名称位置类型必填说明
Idempotency-Keyheaderstring是Stable for the frozen business payload. Request, correlation, trace, and task identifiers may change on an identical retry.
X-Request-IDheaderstring(uuid)是—
Traceparentheaderstring是—
X-Correlation-IDheaderstring(uuid)否Defaults to X-Request-ID when omitted.
X-Task-IDheaderstring否—

请求体

application/json · 必填:是

publishTenantSiteConfiguration 请求体
名称类型必填说明
configuration_scope_idstring(uuid)是—
expected_source_revisioninteger(int64)是—
targetExplicitNodeTarget | LineGroupSnapshotTarget是—
health_checkHealthCheck是—
rolloutRolloutPolicyInput否Progressive policy for a target frozen at publication time. Nodes are ordered by UUID bytes, then assigned to the canary and fixed-size cohorts. Commands outside the released cohort remain held. The failure threshold is an absolute failed-node count within the current cohort; reaching it pauses the rollout.
max_attemptsinteger是—
deadlinestring(date-time)是Future RFC3339 deployment deadline.

响应

publishTenantSiteConfiguration 响应
状态码说明
201Created tenant publication, or the stored result of an identical retry.

字段:id: string(uuid) source_revision: integer(int64) config_version_id: string(uuid) rollout_id: string(uuid) target: TenantPublicationTarget node_count: integer created_at: string(date-time)

400Invalid UUID, RFC3339 value, enum, cursor, header, query, or JSON body.
401Authentication is missing or invalid.
403Wrong audience, missing permission, or tenant scope override.
409Idempotency, target snapshot, rollout state, active deployment, or retry conflict.
412The source or rollout expected revision is stale.
422Entitlement or target/resource readiness prevents publication.
503Storage, signing, cancellation, response validation, or another internal dependency is unavailable.

失败时怎么办

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

↑ 回到列表

GET /v1/site-publications/security-activations

Get the authoritative security binding and latest activation candidate

operationId
getSecurityPolicyActivationStatus
认证
  • API Key:请求头 Authorization: CdncaKey <key_id>.<secret>。有效权限是 Key 的范围与所有者当前权限的交集。
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:security_policies.read

说明(契约原文)

Requires security_policies.read in the authenticated tenant scope, or a platform session holding security_policies.read or platform.admin, which reads the site's own tenant scope (the site edit page of the platform console). When no binding exists, binding, latest_candidate, and operation are null; clients use binding and active-policy CAS values 0/0 for first publish.

参数

getSecurityPolicyActivationStatus 参数
名称位置类型必填说明
site_idquerystring(uuid)是—
policy_kindquerystring: cc / acl / waf是—

响应

getSecurityPolicyActivationStatus 响应
状态码说明
200Authoritative binding and latest candidate from one permission-checked transaction.

字段:binding: SecurityActivationBinding | null latest_candidate: SecurityActivationCandidate | null operation: string: activation / rollback / null | null: activation / rollback / null failure_reasons?: array<object> latest_detach?: boolean rollback?: object

400Invalid UUID, RFC3339 value, enum, cursor, header, query, or JSON body.
401Authentication is missing or invalid.
403Wrong audience, missing permission, or tenant scope override.
503Storage, signing, cancellation, response validation, or another internal dependency is unavailable.

失败时怎么办

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

↑ 回到列表

POST /v1/site-publications/security-activations

Stage a security policy candidate and start its canary rollout

operationId
createSecurityPolicyActivation
认证
  • API Key:请求头 Authorization: CdncaKey <key_id>.<secret>。有效权限是 Key 的范围与所有者当前权限的交集。
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:security_policies.manage

说明(契约原文)

Requires security_policies.manage in the authenticated tenant scope. A platform session holding security_policies.manage or platform.admin starts it in the site's tenant scope without switching identity; the candidate and the audit event record the platform actor, the audit event's scope is the site's tenant scope. The candidate pins one source revision, config version, signed artifact digest, and target snapshot. The active policy and source revision do not advance until every pinned target reports healthy.

参数

createSecurityPolicyActivation 参数
名称位置类型必填说明
Idempotency-Keyheaderstring是Stable for the frozen business payload. Request, correlation, trace, and task identifiers may change on an identical retry.
X-Request-IDheaderstring(uuid)是—
Traceparentheaderstring是—
X-Correlation-IDheaderstring(uuid)否Defaults to X-Request-ID when omitted.
X-Task-IDheaderstring否—

请求体

application/json · 必填:是

createSecurityPolicyActivation 请求体
名称类型必填说明
site_idstring(uuid)是—
policy_idstring(uuid)是—
policy_versioninteger(int64)是—
expected_binding_revisioninteger(int64)是—
expected_active_policy_versioninteger(int64)是—
target_node_idsarray<string(uuid)>否Omitted or empty targets the active nodes of the site's own and its package's primary/backup line groups (no_target_nodes when there are none).
canary_sizeinteger否0 or omitted is 1 when the targets are resolved from the site.
expires_atstring(date-time)是At most 15 minutes ahead (activation_expiry_too_late).
detachboolean否Withdraw the site's active library of this kind (policy_id/policy_version are the binding's active ones; the library may be deleted). policy_id differing from the binding's library rebinds the site to it; a deleted library cannot be bound (security_policy_deleted).

响应

createSecurityPolicyActivation 响应
状态码说明
201Candidate claimed and immutable canary rollout created.

字段:candidate: SecurityActivationCandidate replayed?: boolean

400Invalid UUID, RFC3339 value, enum, cursor, header, query, or JSON body.
401Authentication is missing or invalid.
403Wrong audience, missing permission, or tenant scope override.
409Idempotency, target snapshot, rollout state, active deployment, or retry conflict.
422Entitlement or target/resource readiness prevents publication.
503Storage, signing, cancellation, response validation, or another internal dependency is unavailable.

失败时怎么办

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

↑ 回到列表

GET /v1/site-publications/security-activations/rebind-status

Count bound sites still behind their WAF/CC library and those the package does not entitle

operationId
getSecurityPolicyRebindStatus
认证
  • API Key:请求头 Authorization: CdncaKey <key_id>.<secret>。有效权限是 Key 的范围与所有者当前权限的交集。
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:security_policies.read

说明(契约原文)

Requires security_policies.read in the authenticated tenant scope; a platform session is refused (403), it has no tenant scope to count. A library saved without a site context is republished automatically to every bound site whose binding is behind it (the site's package primary/backup line-group nodes, canary first). pending_sites counts the scope's sites still behind for policy_kind; package_denied_sites counts those whose package does not include the feature (they are retried and publish once it is enabled).

参数

getSecurityPolicyRebindStatus 参数
名称位置类型必填说明
policy_kindquerystring: waf / cc是—

响应

getSecurityPolicyRebindStatus 响应
状态码说明
200Counts of the authenticated scope only.

字段:pending_sites: integer package_denied_sites: integer

400Invalid UUID, RFC3339 value, enum, cursor, header, query, or JSON body.
401Authentication is missing or invalid.
403Wrong audience, missing permission, or tenant scope override.
503Storage, signing, cancellation, response validation, or another internal dependency is unavailable.

失败时怎么办

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

↑ 回到列表

GET /v1/site-publications/security-activations/{candidate_id}

Get a security policy activation candidate

operationId
getSecurityPolicyActivation
认证
  • API Key:请求头 Authorization: CdncaKey <key_id>.<secret>。有效权限是 Key 的范围与所有者当前权限的交集。
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:security_policies.read

参数

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

响应

getSecurityPolicyActivation 响应
状态码说明
200Current persisted candidate identity and status.

字段:id: string(uuid) tenant_scope_id: string(uuid) site_id: string(uuid) binding_id: string(uuid) binding_revision: integer(int64) last_bundle_id: string(uuid) last_claimed_policy_version: integer(int64) expected_active_policy_version: integer(int64) candidate_source_revision: integer(int64) candidate_config_version_id: string(uuid) candidate_artifact_sha256: array<integer> target_snapshot_sha256: array<integer> required_capabilities: array<SecurityActivationCapability> candidate_status: string: claimed / canary / expanding / healthy / failed / cancelled / expired / promoted canary_node_ids: array<string(uuid)> expand_node_ids: array<string(uuid)> expires_at: string(date-time) created_at: string(date-time) updated_at: string(date-time) recovered_at?: string(date-time)

400Invalid UUID, RFC3339 value, enum, cursor, header, query, or JSON body.
401Authentication is missing or invalid.
403Wrong audience, missing permission, or tenant scope override.
404Resource is absent in the authorized tenant scope. Cross-tenant IDs use the same response.
503Storage, signing, cancellation, response validation, or another internal dependency is unavailable.

失败时怎么办

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

↑ 回到列表

POST /v1/site-publications/security-activations/{candidate_id}/reconcile

Reconcile canary, expansion, recovery, and promotion

operationId
reconcileSecurityPolicyActivation
认证
  • API Key:请求头 Authorization: CdncaKey <key_id>.<secret>。有效权限是 Key 的范围与所有者当前权限的交集。
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:security_policies.manage

说明(契约原文)

Reuses the candidate config and artifact digest for every phase. Promotion uses the complete expected active, binding, publication, config, artifact, source revision, and target snapshot CAS identity.

参数

reconcileSecurityPolicyActivation 参数
名称位置类型必填说明
candidate_idpathstring(uuid)是—
Idempotency-Keyheaderstring是Stable for the frozen business payload. Request, correlation, trace, and task identifiers may change on an identical retry.
X-Request-IDheaderstring(uuid)是—
Traceparentheaderstring是—
X-Correlation-IDheaderstring(uuid)否Defaults to X-Request-ID when omitted.
X-Task-IDheaderstring否—

请求体

application/json · 必填:是

reconcileSecurityPolicyActivation 请求体
名称类型必填说明
promotion_casSecurityActivationPromotionCAS是—

响应

reconcileSecurityPolicyActivation 响应
状态码说明
200Reconciled candidate state or identical stored replay.

字段:candidate: SecurityActivationCandidate action: string: / wait / expand / promote / recover / fail / cancel / expire replayed?: boolean

400Invalid UUID, RFC3339 value, enum, cursor, header, query, or JSON body.
401Authentication is missing or invalid.
403Wrong audience, missing permission, or tenant scope override.
404Resource is absent in the authorized tenant scope. Cross-tenant IDs use the same response.
409Idempotency, target snapshot, rollout state, active deployment, or retry conflict.
503Storage, signing, cancellation, response validation, or another internal dependency is unavailable.

失败时怎么办

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

↑ 回到列表

POST /v1/site-publications/security-activations/{candidate_id}/rollback

Clone an old policy into a new monotonic version and stage it

operationId
rollbackSecurityPolicyActivation
认证
  • API Key:请求头 Authorization: CdncaKey <key_id>.<secret>。有效权限是 Key 的范围与所有者当前权限的交集。
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:security_policies.manage

参数

rollbackSecurityPolicyActivation 参数
名称位置类型必填说明
candidate_idpathstring(uuid)是—
Idempotency-Keyheaderstring是Stable for the frozen business payload. Request, correlation, trace, and task identifiers may change on an identical retry.
X-Request-IDheaderstring(uuid)是—
Traceparentheaderstring是—
X-Correlation-IDheaderstring(uuid)否Defaults to X-Request-ID when omitted.
X-Task-IDheaderstring否—

请求体

application/json · 必填:是

rollbackSecurityPolicyActivation 请求体
名称类型必填说明
source_policy_versioninteger(int64)是—
expected_binding_revisioninteger(int64)是—
expected_active_policy_versioninteger(int64)是—
target_node_idsarray<string(uuid)>否Omitted or empty targets the candidate site's line-group nodes, as SecurityActivationCreateRequest.
canary_sizeinteger否—
expires_atstring(date-time)是At most 15 minutes ahead (activation_expiry_too_late).

响应

rollbackSecurityPolicyActivation 响应
状态码说明
201New monotonic rollback candidate claimed.

字段:candidate: SecurityActivationCandidate replayed?: boolean

400Invalid UUID, RFC3339 value, enum, cursor, header, query, or JSON body.
401Authentication is missing or invalid.
403Wrong audience, missing permission, or tenant scope override.
404Resource is absent in the authorized tenant scope. Cross-tenant IDs use the same response.
409Idempotency, target snapshot, rollout state, active deployment, or retry conflict.
503Storage, signing, cancellation, response validation, or another internal dependency is unavailable.

失败时怎么办

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

↑ 回到列表

GET /v1/site-publications/{publication_id}

Get one publication in the authenticated tenant scope

operationId
getTenantSitePublication
认证
  • API Key:请求头 Authorization: CdncaKey <key_id>.<secret>。有效权限是 Key 的范围与所有者当前权限的交集。
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:sites.read

参数

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

响应

getTenantSitePublication 响应
状态码说明
200Tenant publication detail with internal metadata redacted.

字段:id: string(uuid) source_revision: integer(int64) config_version_id: string(uuid) rollout_id: string(uuid) target: TenantPublicationTarget node_count: integer created_at: string(date-time)

400Invalid UUID, RFC3339 value, enum, cursor, header, query, or JSON body.
401Authentication is missing or invalid.
403Wrong audience, missing permission, or tenant scope override.
404Resource is absent in the authorized tenant scope. Cross-tenant IDs use the same response.
503Storage, signing, cancellation, response validation, or another internal dependency is unavailable.

失败时怎么办

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

↑ 回到列表