方法路径摘要认证
GET/v1/admin/cache-operationsList operations in an explicit tenant scope登录会话
POST/v1/admin/cache-operationsPersist an operation in an explicit tenant scope登录会话
GET/v1/admin/cache-operations/daily-usageToday's cache operation quotas of a tenant account (UTC+8 day; system follow-ups not counted)登录会话
PUT/v1/admin/cache-operations/daily-usageSet a tenant account's own daily purge/prewarm limits (null follows the system setting default)登录会话
GET/v1/admin/cache-operations/{operation_id}Get operation progress in an explicit tenant scope登录会话
POST/v1/admin/cache-operations/{operation_id}/cancelCancel an operation in an explicit tenant scope登录会话
POST/v1/admin/cache-operations/{operation_id}/resubmitRe-submit an operation as a new one登录会话
POST/v1/admin/cache-operations/{operation_id}/retryRetry an operation in an explicit tenant scope登录会话

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

接口详情

GET /v1/admin/cache-operations

List operations in an explicit tenant scope

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

全部需要:sites.read

说明(契约原文)

The cursor freezes the set of operations whose committed creation audit position is at or below the first page watermark. Mutable state, progress, and update/completion timestamps remain live on later pages.

参数

listAdminCacheOperations 参数
名称位置类型必填说明
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.
site_idquerystring(uuid)否Non-disclosing filter within the effective tenant scope. A foreign or nonexistent UUID returns the same 200 response with an empty items array.
site_display_idquerystring否Tenant-scoped stable positive site identifier displayed by the UI.
searchquerystring否Exact operation/site short ID or a case-insensitive target URL fragment.
actionquerystring: purge / prewarm否—
target_typequerystring: exact_url / directory_prefix / whole_site否—
statequerystring否One state or several, comma separated (any of them).

响应

listAdminCacheOperations 响应
状态码说明
200Stable operation page.

字段:items: array<OperationSummary> next_cursor?: string state_counts?: object

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

失败时怎么办

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

↑ 回到列表

POST /v1/admin/cache-operations

Persist an operation in an explicit tenant scope

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

全部需要:sites.manage

说明(契约原文)

queued means persisted, not dispatched.

参数

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

请求体

application/json · 必填:是

createAdminCacheOperation 请求体
名称类型必填说明
site_idstring(uuid)是—
actionstring: purge / prewarm是—
target_typestring: exact_url / directory_prefix / whole_site是—
targetsarray<string(uri)>是Edge cachetask schema v2 wire envelope. At most 16 targets, each at most 16 KiB of UTF-8 bytes, with at most 64 KiB of raw target bytes across the array. The aggregate byte limit is enforced by the server in addition to this JSON Schema.
node_idsarray<string(uuid)>是—
max_retriesinteger是—

响应

createAdminCacheOperation 响应
状态码说明
202Durable operation accepted in queued state; no delivery is implied.

字段:id: string(uuid) display_id: string site_id: string(uuid) site_display_id: string action: string: purge / prewarm target_type: string: exact_url / directory_prefix / whole_site state: string: queued / running / succeeded / partial_failed / failed / cancelled max_attempts: integer progress: Progress auto_nodes: boolean parent_operation_id?: string(uuid) targets: array<Target> nodes: array<NodeProjection> cancel_requested_at?: string(date-time) created_at: string(date-time) started_at?: string(date-time) updated_at: string(date-time) completed_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.
503A required store is unavailable; raw dependency errors are never returned.

失败时怎么办

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

↑ 回到列表

GET /v1/admin/cache-operations/daily-usage

Today's cache operation quotas of a tenant account (UTC+8 day; system follow-ups not counted)

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

全部需要:sites.read

参数

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

响应

getAdminCacheDailyUsage 响应
状态码说明
200The same limits and counts a create is checked against.

字段:scope_id: string(uuid) revision: integer url_purge: CacheDailyQuota directory_purge: object prewarm: CacheDailyQuota resets_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 重试。

↑ 回到列表

PUT /v1/admin/cache-operations/daily-usage

Set a tenant account's own daily purge/prewarm limits (null follows the system setting default)

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

全部需要:identity.users.manage

说明(契约原文)

Audited as cache.account_quota.update. Every key is required; a stale expected_revision (the revision of the last read) is 412.

参数

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

请求体

application/json · 必填:是

setAdminCacheAccountLimits 请求体
名称类型必填说明
expected_revisioninteger是—
url_purge_limitinteger | null是—
directory_purge_limitinteger | null是—
prewarm_limitinteger | null是—

响应

setAdminCacheAccountLimits 响应
状态码说明
200The account's quotas after the change.

字段:scope_id: string(uuid) revision: integer url_purge: CacheDailyQuota directory_purge: object prewarm: CacheDailyQuota resets_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.
412expected_revision no longer matches the current head.
503A required store is unavailable; raw dependency errors are never returned.

失败时怎么办

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

↑ 回到列表

GET /v1/admin/cache-operations/{operation_id}

Get operation progress in an explicit tenant scope

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

全部需要:sites.read

参数

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

响应

getAdminCacheOperation 响应
状态码说明
200Sanitized cache operation.

字段:id: string(uuid) display_id: string site_id: string(uuid) site_display_id: string action: string: purge / prewarm target_type: string: exact_url / directory_prefix / whole_site state: string: queued / running / succeeded / partial_failed / failed / cancelled max_attempts: integer progress: Progress auto_nodes: boolean parent_operation_id?: string(uuid) targets: array<Target> nodes: array<NodeProjection> cancel_requested_at?: string(date-time) created_at: string(date-time) started_at?: string(date-time) updated_at: string(date-time) completed_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-operations/{operation_id}/cancel

Cancel an operation in an explicit tenant scope

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

全部需要:sites.manage

参数

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

请求体

application/json · 必填:是

响应

cancelAdminCacheOperation 响应
状态码说明
200Sanitized cache operation.

字段:id: string(uuid) display_id: string site_id: string(uuid) site_display_id: string action: string: purge / prewarm target_type: string: exact_url / directory_prefix / whole_site state: string: queued / running / succeeded / partial_failed / failed / cancelled max_attempts: integer progress: Progress auto_nodes: boolean parent_operation_id?: string(uuid) targets: array<Target> nodes: array<NodeProjection> cancel_requested_at?: string(date-time) created_at: string(date-time) started_at?: string(date-time) updated_at: string(date-time) completed_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.
503A required store is unavailable; raw dependency errors are never returned.

失败时怎么办

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

↑ 回到列表

POST /v1/admin/cache-operations/{operation_id}/resubmit

Re-submit an operation as a new one

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

全部需要:sites.manage

说明(契约原文)

Creates a new operation with the original's site, action, target type, targets and retry budget, on the nodes the original named, or on every node carrying the site now when it named none (auto_nodes). The Idempotency-Key is the batch key: with the original operation it forms the new operation's idempotency key, so a retry of one batch replays (Idempotency-Replayed) and another batch creates another operation. Audited as cache.operation.resubmit on the original operation.

参数

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

请求体

application/json · 必填:是

响应

resubmitAdminCacheOperation 响应
状态码说明
202Durable operation accepted in queued state; no delivery is implied.

字段:id: string(uuid) display_id: string site_id: string(uuid) site_display_id: string action: string: purge / prewarm target_type: string: exact_url / directory_prefix / whole_site state: string: queued / running / succeeded / partial_failed / failed / cancelled max_attempts: integer progress: Progress auto_nodes: boolean parent_operation_id?: string(uuid) targets: array<Target> nodes: array<NodeProjection> cancel_requested_at?: string(date-time) created_at: string(date-time) started_at?: string(date-time) updated_at: string(date-time) completed_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.
429The account's daily purge or prewarm limit would be exceeded (daily_limit_exceeded; error.details names the quota).
503A required store is unavailable; raw dependency errors are never returned.

失败时怎么办

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

↑ 回到列表

POST /v1/admin/cache-operations/{operation_id}/retry

Retry an operation in an explicit tenant scope

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

全部需要:sites.manage

参数

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

请求体

application/json · 必填:是

响应

retryAdminCacheOperation 响应
状态码说明
200Sanitized cache operation.

字段:id: string(uuid) display_id: string site_id: string(uuid) site_display_id: string action: string: purge / prewarm target_type: string: exact_url / directory_prefix / whole_site state: string: queued / running / succeeded / partial_failed / failed / cancelled max_attempts: integer progress: Progress auto_nodes: boolean parent_operation_id?: string(uuid) targets: array<Target> nodes: array<NodeProjection> cancel_requested_at?: string(date-time) created_at: string(date-time) started_at?: string(date-time) updated_at: string(date-time) completed_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.
503A required store is unavailable; raw dependency errors are never returned.

失败时怎么办

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

↑ 回到列表