方法路径摘要认证
GET/v1/admin/admin-access-policyRead the platform administration access allowlist登录会话
PUT/v1/admin/admin-access-policySave the platform administration access allowlist登录会话

契约文件:api/openapi/v1/control.yaml

接口详情

GET /v1/admin/admin-access-policy

Read the platform administration access allowlist

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

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

说明(契约原文)

Requires system_configuration.read on the platform scope. current_ip is the client address the control plane resolved for this request.

响应

getAdminAccessPolicy 响应
状态码说明
200Current policy (revision 0 and disabled when never saved).

字段:revision: integer(int64) enabled: boolean allowlist: array<string> updated_at: string(date-time) current_ip: string

401认证失败或会话已失效。
403当前身份没有执行该操作的权限。

失败时怎么办

  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。

↑ 回到列表

PUT /v1/admin/admin-access-policy

Save the platform administration access allowlist

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

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

说明(契约原文)

Requires system_configuration.manage on the platform scope. When enabled, platform-scope sign-in, refresh and every platform-scope session request must come from an allowed address or CIDR prefix; loopback is always allowed; tenant sessions and API keys are not affected. A policy that would not allow the saving request's own address is refused (422 admin_access_self_lockout). Recovery when locked out: run `control-api admin-access-allowlist disable` as root on the control host. Requests refused by the policy get 403 admin_access_denied.

请求体

application/json · 必填:是

updateAdminAccessPolicy 请求体
名称类型必填说明
expected_revisioninteger(int64)是—
enabledboolean是—
allowlistarray<string>是—

响应

updateAdminAccessPolicy 响应
状态码说明
200Saved.

字段:revision: integer(int64) enabled: boolean allowlist: array<string> updated_at: string(date-time) current_ip: string

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
409请求的状态与已有资源或幂等记录冲突。
422admin_access_self_lockout.

失败时怎么办

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

↑ 回到列表