方法路径摘要认证
GET/v1/admin/cache-policies/{site_id}Get a current policy in an explicit tenant scope登录会话
POST/v1/admin/cache-policies/{site_id}Publish a policy in an explicit tenant scope登录会话
GET/v1/admin/cache-policies/{site_id}/revisionsList policy history in an explicit tenant scope登录会话
GET/v1/admin/cache-policies/{site_id}/revisions/{revision}Get one policy revision in an explicit tenant scope登录会话

契约文件:api/control-cache-operations.openapi.yaml

接口详情

GET /v1/admin/cache-policies/{site_id}

Get a current policy in an explicit tenant scope

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

全部需要:sites.read

参数

getAdminCurrentCachePolicy 参数
名称位置类型必填说明
site_idpathstring(uuid)是—
scope_idquerystring(uuid)是Explicit active tenant scope; platform scope is never implied.
X-Request-IDheaderstring是—

响应

getAdminCurrentCachePolicy 响应
状态码说明
200Cache policy revision.

字段:site_id: string(uuid) revision: integer(int64) binding_mode: string: inherit / override definition_id: string(uuid) definition_revision: integer(int64) document: PolicyDocumentV1 | PolicyDocumentV2 created_by_user_id: string(uuid) request_id: string created_at: string(date-time)

400Invalid or non-canonical request.
401Authentication required.
403Exact cache permission is absent or route audience is wrong.
404Resource is absent or outside the effective tenant scope.
408Request context was cancelled or exceeded its deadline.
503A required store is unavailable; raw dependency errors are never returned.

失败时怎么办

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

↑ 回到列表

POST /v1/admin/cache-policies/{site_id}

Publish a policy in an explicit tenant scope

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

全部需要:sites.manage

参数

publishAdminCachePolicy 参数
名称位置类型必填说明
site_idpathstring(uuid)是—
scope_idquerystring(uuid)是Explicit active tenant scope; platform scope is never implied.
X-Request-IDheaderstring是—
Idempotency-Keyheaderstring是—

请求体

application/json · 必填:是

publishAdminCachePolicy 请求体
名称类型必填说明
expected_revisioninteger(int64)是—
binding_modeobject否Omit for the simple per-site override workflow.
definition_idstring(uuid)否—
definition_revisioninteger(int64)否—
expected_definition_revisioninteger(int64)否—
documentPolicyDocumentV1 | PolicyDocumentV2否—

响应

publishAdminCachePolicy 响应
状态码说明
201Created revision or stored identical replay.

字段:site_id: string(uuid) revision: integer(int64) binding_mode: string: inherit / override definition_id: string(uuid) definition_revision: integer(int64) document: PolicyDocumentV1 | PolicyDocumentV2 created_by_user_id: string(uuid) request_id: string created_at: string(date-time)

400Invalid or non-canonical request.
401Authentication required.
403Exact cache permission is absent or route audience is wrong.
404Resource is absent or outside the effective tenant scope.
408Request context was cancelled or exceeded its deadline.
409Idempotency payload or operation state conflicts.
412expected_revision no longer matches the current head.
503A required store is unavailable; raw dependency errors are never returned.

失败时怎么办

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

↑ 回到列表

GET /v1/admin/cache-policies/{site_id}/revisions

List policy history in an explicit tenant scope

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

全部需要:sites.read

参数

listAdminCachePolicyRevisions 参数
名称位置类型必填说明
site_idpathstring(uuid)是—
scope_idquerystring(uuid)是Explicit active tenant scope; platform scope is never implied.
X-Request-IDheaderstring是—
limitqueryinteger否—
cursorquerystring否HMAC-authenticated cursor bound to scope, filters, and a committed creation-audit watermark. It freezes membership, not mutable operation state or progress.

响应

listAdminCachePolicyRevisions 响应
状态码说明
200Stable revision page.

字段:items: array<Policy> next_cursor?: string

400Invalid or non-canonical request.
401Authentication required.
403Exact cache permission is absent or route audience is wrong.
404Resource is absent or outside the effective tenant scope.
408Request context was cancelled or exceeded its deadline.
503A required store is unavailable; raw dependency errors are never returned.

失败时怎么办

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

↑ 回到列表

GET /v1/admin/cache-policies/{site_id}/revisions/{revision}

Get one policy revision in an explicit tenant scope

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

全部需要:sites.read

参数

getAdminCachePolicyRevision 参数
名称位置类型必填说明
site_idpathstring(uuid)是—
revisionpathinteger(int64)是—
scope_idquerystring(uuid)是Explicit active tenant scope; platform scope is never implied.
X-Request-IDheaderstring是—

响应

getAdminCachePolicyRevision 响应
状态码说明
200Cache policy revision.

字段:site_id: string(uuid) revision: integer(int64) binding_mode: string: inherit / override definition_id: string(uuid) definition_revision: integer(int64) document: PolicyDocumentV1 | PolicyDocumentV2 created_by_user_id: string(uuid) request_id: string created_at: string(date-time)

400Invalid or non-canonical request.
401Authentication required.
403Exact cache permission is absent or route audience is wrong.
404Resource is absent or outside the effective tenant scope.
408Request context was cancelled or exceeded its deadline.
503A required store is unavailable; raw dependency errors are never returned.

失败时怎么办

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

↑ 回到列表