方法路径摘要认证
GET/v1/admin/usersList tenant users in the customer control plane登录会话
POST/v1/admin/usersCreate an isolated tenant user登录会话
PATCH/v1/admin/usersAtomically update tenant users登录会话
GET/v1/admin/users/{id}Get one tenant user登录会话
PATCH/v1/admin/users/{id}Update tenant user profile, status, and role登录会话
GET/v1/admin/users/{id}/login-securityRead the selected tenant user's login security policy登录会话
PUT/v1/admin/users/{id}/login-securityReplace a tenant user's login security policy登录会话
GET/v1/admin/users/{id}/secondary-verificationRead the selected tenant user's secondary identity verification request登录会话
PUT/v1/admin/users/{id}/secondary-verificationReplace a tenant user's secondary identity verification request登录会话
GET/v1/admin/users/{user_id}/api-keysList a tenant user's API key metadata登录会话
POST/v1/admin/users/{user_id}/api-keysCreate pending API key metadata for a tenant user登录会话
POST/v1/admin/users/{user_id}/api-keys/{key_id}/revokeRevoke a tenant user's API key登录会话

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

接口详情

GET /v1/admin/users

List tenant users in the customer control plane

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

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

说明(契约原文)

Requires identity.users.manage in a platform scope. Platform identities are never returned.

参数

listManagedUsers 参数
名称位置类型必填说明
includequeryarray<string: user_metadata / user_verification / platform_admins / reseller>否Optional comma-separated unique projections. user_metadata adds remark and QQ; user_verification adds only current personal/company verification flags; platform_admins also lists platform-scope administrators (tenant_id null); Omission preserves the original fifteen-field representation. Empty, unknown, duplicate items and repeated parameters are rejected. user_verification, platform_admins and reseller are accepted only on this list endpoint.
pagequeryinteger否—
limitqueryinteger否—
searchquerystring否—
display_idquerystring否Exact positive-decimal user display ID. Internal UUID identity and write paths are unchanged.
usernamequerystring否Case-insensitive literal substring of username only. Trim boundary whitespace, reject raw C0/C1 controls, and allow at most 128 Unicode code points after trimming. Empty means no filter; all supplied filters intersect using AND.
display_namequerystring否Case-insensitive literal substring of display name only, with the same trimming, control-character rejection, length and AND semantics as username. Percent and underscore are literal characters.
emailquerystring否Case-insensitive literal substring of email only, with the same trimming, control-character rejection, length and AND semantics as username. Partial addresses are allowed; NULL email does not match a nonempty filter.
phonequerystring否Case-insensitive literal substring of phone only, with the same trimming, control-character rejection, length and AND semantics as username. Leading zeroes and plus signs are significant; NULL phone does not match a nonempty filter.
remarkquerystring否Trimmed case-insensitive literal substring of the administrator remark. Empty means no filter; combined with every other filter using AND.
qqquerystring否Trimmed case-insensitive literal substring of the QQ contact text. Leading zeroes are significant; empty means no filter and all filters intersect.
statusquerystring: active / disabled否—
real_name_statusquerystring: verified / unverified否Optional current verification filter, intersected with all other filters before pagination in the same snapshot as the returned flags. verified means personal_verified OR company_verified; unverified means neither. Omit for all users. Empty or unknown values are invalid. Each flag requires the latest application of that kind to be approved, its authoritative identity binding to match, and its evidence settlement to be settled. Reads never create or approve identity records.
rolequerystring: tenant_owner / tenant_viewer否—
group_idquerystring(uuid)否—
typequerystring: reseller / customer / direct否reseller = the tenant has a reseller profile (active or suspended); customer = the tenant belongs to a reseller; direct = neither. Any value excludes platform administrators. Omit for all users.
parentquerystring否Owning reseller filter, applied before pagination and intersected with type. none = tenants without a reseller (platform customers, including resellers themselves); a lowercase reseller scope UUID = that reseller's customers. Excludes platform administrators. Omit for all users.

响应

listManagedUsers 响应
状态码说明
200Stable tenant user page ordered newest first.

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

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
500服务内部故障,请求未完成。

失败时怎么办

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

↑ 回到列表

POST /v1/admin/users

Create an isolated tenant user

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

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

说明(契约原文)

Creates the tenant, tenant scope, system roles, membership, and Argon2id credential atomically.

参数

createManagedUser 参数
名称位置类型必填说明
includequerystring: user_metadata否Set to user_metadata to include administrator-only remark and QQ fields. Omission preserves the original fifteen-field representation. Unknown or repeated values are rejected. This representation choice does not change mutation idempotency; a historical receipt may omit metadata, in which case read the current resource before editing these fields.
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring否Caller-stable write attempt identifier. Reuse it only with the same idempotency key and body.
traceparentheaderstring否W3C trace context preserved across an exact retry.

请求体

application/json · 必填:是

createManagedUser 请求体
名称类型必填说明
usernamestring是—
passwordstring(password)是8 to 1024 printable ASCII characters (no space) with at least two of upper case, lower case, digits and symbols; otherwise password_policy_unmet.
display_namestring是—
emailstring(email) | null(email)否—
phonestring | null否—
remarkstring | null否Administrator-only remark, trimmed at both ends. Internal tabs and line breaks are preserved; other control characters are rejected. Null or whitespace-only input clears the stored value. Length counts Unicode code points.
qqstring | null否Trimmed QQ contact text, preserving leading zeroes. Not a login identifier and not unique. Control characters are rejected; null or whitespace-only input clears the stored value. Length counts Unicode code points.
rolestring: tenant_owner / tenant_viewer是—
group_idstring(uuid) | null(uuid)否—

响应

createManagedUser 响应
状态码说明
201Tenant user created, or an identical idempotent request replayed.

字段:id: string(uuid) display_id: string scope_id: string(uuid) tenant_id: string(uuid) username: string display_name: string email: string(email) | null(email) phone: string | null status: string: active / disabled role: string: tenant_owner / tenant_viewer group_id: string(uuid) | null(uuid) group_name: string | null metadata?: ManagedUserMetadata verification?: ManagedUserVerification reseller?: ManagedUserReseller revision: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
409请求的状态与已有资源或幂等记录冲突。
500服务内部故障,请求未完成。

失败时怎么办

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

↑ 回到列表

PATCH /v1/admin/users

Atomically update tenant users

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

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

说明(契约原文)

Applies the complete array or no changes. Disabling a user revokes every refresh family and invalidates existing access sessions immediately.

参数

batchUpdateManagedUsers 参数
名称位置类型必填说明
includequerystring: user_metadata否Set to user_metadata to include administrator-only remark and QQ fields. Omission preserves the original fifteen-field representation. Unknown or repeated values are rejected. This representation choice does not change mutation idempotency; a historical receipt may omit metadata, in which case read the current resource before editing these fields.
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring否Caller-stable write attempt identifier. Reuse it only with the same idempotency key and body.
traceparentheaderstring否W3C trace context preserved across an exact retry.

请求体

application/json · 必填:是

响应

batchUpdateManagedUsers 响应
状态码说明
200Users updated in request order, or an identical idempotent request replayed.

字段:items: array<ManagedUser>

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
409请求的状态与已有资源或幂等记录冲突。
500服务内部故障,请求未完成。

失败时怎么办

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

↑ 回到列表

GET /v1/admin/users/{id}

Get one tenant user

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

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

说明(契约原文)

A platform identity or an unknown tenant user produces the same 404 response.

参数

getManagedUser 参数
名称位置类型必填说明
includequerystring: user_metadata否Set to user_metadata to include administrator-only remark and QQ fields. Omission preserves the original fifteen-field representation. Unknown or repeated values are rejected. This representation choice does not change mutation idempotency; a historical receipt may omit metadata, in which case read the current resource before editing these fields.
idpathstring(uuid)是—

响应

getManagedUser 响应
状态码说明
200Tenant user details.

字段:id: string(uuid) display_id: string scope_id: string(uuid) tenant_id: string(uuid) username: string display_name: string email: string(email) | null(email) phone: string | null status: string: active / disabled role: string: tenant_owner / tenant_viewer group_id: string(uuid) | null(uuid) group_name: string | null metadata?: ManagedUserMetadata verification?: ManagedUserVerification reseller?: ManagedUserReseller revision: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
500服务内部故障,请求未完成。

失败时怎么办

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

↑ 回到列表

PATCH /v1/admin/users/{id}

Update tenant user profile, status, and role

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

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

说明(契约原文)

Disabling a user revokes every refresh family and invalidates existing access sessions immediately.

参数

updateManagedUser 参数
名称位置类型必填说明
includequerystring: user_metadata否Set to user_metadata to include administrator-only remark and QQ fields. Omission preserves the original fifteen-field representation. Unknown or repeated values are rejected. This representation choice does not change mutation idempotency; a historical receipt may omit metadata, in which case read the current resource before editing these fields.
idpathstring(uuid)是—
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring否Caller-stable write attempt identifier. Reuse it only with the same idempotency key and body.
traceparentheaderstring否W3C trace context preserved across an exact retry.

请求体

application/json · 必填:是

updateManagedUser 请求体
名称类型必填说明
expected_revisioninteger(int64)是—
display_namestring是—
emailstring(email) | null(email)是—
phonestring | null是—
statusstring: active / disabled是—
remarkstring | null否Administrator-only remark, trimmed at both ends. Internal tabs and line breaks are preserved; other control characters are rejected. Null or whitespace-only input clears the stored value. Length counts Unicode code points.
qqstring | null否Trimmed QQ contact text, preserving leading zeroes. Not a login identifier and not unique. Control characters are rejected; null or whitespace-only input clears the stored value. Length counts Unicode code points.
rolestring: tenant_owner / tenant_viewer是—
group_idstring(uuid) | null(uuid)否—

响应

updateManagedUser 响应
状态码说明
200User updated, or an identical idempotent request replayed.

字段:id: string(uuid) display_id: string scope_id: string(uuid) tenant_id: string(uuid) username: string display_name: string email: string(email) | null(email) phone: string | null status: string: active / disabled role: string: tenant_owner / tenant_viewer group_id: string(uuid) | null(uuid) group_name: string | null metadata?: ManagedUserMetadata verification?: ManagedUserVerification reseller?: ManagedUserReseller revision: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
409请求的状态与已有资源或幂等记录冲突。
500服务内部故障,请求未完成。

失败时怎么办

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

↑ 回到列表

GET /v1/admin/users/{id}/login-security

Read the selected tenant user's login security policy

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

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

说明(契约原文)

Requires an active primary platform bearer session and identity.users.manage. API keys and impersonation sessions are rejected. A missing policy returns revision 0, none, and an empty allowlist.

参数

getManagedUserLoginSecurity 参数
名称位置类型必填说明
idpathstring(uuid)是—
tenant_scope_idquerystring(uuid)是Exact tenant membership scope. Duplicate or unknown query parameters are rejected.

响应

getManagedUserLoginSecurity 响应
状态码说明
200Independent policy, without user profile or contact information.

字段:user_id: string(uuid) tenant_scope_id: string(uuid) revision: integer(int64) login_verification: string: none / sms / email login_allowlist: array<string>

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
503A required dependency is unavailable.

失败时怎么办

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

↑ 回到列表

PUT /v1/admin/users/{id}/login-security

Replace a tenant user's login security policy

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

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

说明(契约原文)

Same primary-session authorization as GET. The policy uses its own revision, receipt and audit; it does not change users.revision or existing user-write receipts. All fields are required. Empty allowlist disables the source restriction; none disables the additional login code. Email/SMS require a bound contact and a configured enabled channel. Source restrictions apply to new password and code logins, not existing sessions, refresh or API keys. Once a policy is enabled, rolling back to a binary without the login gate is unsafe. The service never silently clears a policy to permit rollback.

参数

updateManagedUserLoginSecurity 参数
名称位置类型必填说明
idpathstring(uuid)是—
tenant_scope_idquerystring(uuid)是Exact tenant membership scope. Duplicate or unknown query parameters are rejected.
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring否Caller-stable write attempt identifier. Reuse it only with the same idempotency key and body.
traceparentheaderstring否W3C trace context preserved across an exact retry.

请求体

application/json · 必填:是

updateManagedUserLoginSecurity 请求体
名称类型必填说明
expected_revisioninteger(int64)是—
login_verificationstring: none / sms / email是—
login_allowlistarray<string>是IPv4/IPv6 addresses or CIDR prefixes (for example 203.0.113.0/24). Ports, zones and empty entries are rejected. The service unmaps IPv4-mapped IPv6, masks prefixes to their network, collapses full-length prefixes to the address, deduplicates and sorts. Empty clears the restriction.

响应

updateManagedUserLoginSecurity 响应
状态码说明
200Saved policy or exact original receipt on replay. Clearing retains and increments its revision.

字段:user_id: string(uuid) tenant_scope_id: string(uuid) revision: integer(int64) login_verification: string: none / sms / email login_allowlist: array<string>

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
409请求的状态与已有资源或幂等记录冲突。
422login_security_contact_required; the selected channel has no bound contact.
503A required dependency is unavailable.

失败时怎么办

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

↑ 回到列表

GET /v1/admin/users/{id}/secondary-verification

Read the selected tenant user's secondary identity verification request

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

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

说明(契约原文)

Same primary-session authorization as login-security. A missing request returns revision 0, disabled, expiry_action none.

参数

getManagedUserSecondaryVerification 参数
名称位置类型必填说明
idpathstring(uuid)是—
tenant_scope_idquerystring(uuid)是Exact tenant membership scope. Duplicate or unknown query parameters are rejected.

响应

getManagedUserSecondaryVerification 响应
状态码说明
200Request with derived completion state.

字段:user_id: string(uuid) tenant_scope_id: string(uuid) revision: integer(int64) enabled: boolean deadline: string(date-time) | null expiry_action: string: none / lock_sites requested_at: string(date-time) | null completed: boolean enforced_at: string(date-time) | null

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
503A required dependency is unavailable.

失败时怎么办

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

↑ 回到列表

PUT /v1/admin/users/{id}/secondary-verification

Replace a tenant user's secondary identity verification request

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

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

说明(契约原文)

Own revision, receipt and audit; users.revision is unchanged. Switching it on records requested_at and enqueues the identity.secondary_verification email/SMS notice in the same transaction; editing an active request does not notify again. The user completes it with an approved personal_reverification created after requested_at. expiry_action lock_sites requires a deadline; when the deadline passes without completion the control plane stops the user's sites (disables and locks them, then republishes so the nodes stop serving them). Once the reverification is approved, or the request is switched off or its deadline moved into the future, exactly the changes it made are undone and the scope is republished; sites stopped or locked for other reasons are left as they are. Disabling requires deadline null and expiry_action none.

参数

updateManagedUserSecondaryVerification 参数
名称位置类型必填说明
idpathstring(uuid)是—
tenant_scope_idquerystring(uuid)是Exact tenant membership scope. Duplicate or unknown query parameters are rejected.
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring否Caller-stable write attempt identifier. Reuse it only with the same idempotency key and body.
traceparentheaderstring否W3C trace context preserved across an exact retry.

请求体

application/json · 必填:是

updateManagedUserSecondaryVerification 请求体
名称类型必填说明
expected_revisioninteger(int64)是—
enabledboolean是—
deadlinestring(date-time) | null否—
expiry_actionstring: none / lock_sites是—

响应

updateManagedUserSecondaryVerification 响应
状态码说明
200Saved request or exact original receipt on replay.

字段:user_id: string(uuid) tenant_scope_id: string(uuid) revision: integer(int64) enabled: boolean deadline: string(date-time) | null expiry_action: string: none / lock_sites requested_at: string(date-time) | null completed: boolean enforced_at: string(date-time) | null

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

失败时怎么办

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

↑ 回到列表

GET /v1/admin/users/{user_id}/api-keys

List a tenant user's API key metadata

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

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

说明(契约原文)

Platform session-only endpoint requiring api_keys.admin.manage. Each item includes the exact persisted IP allowlist; secrets are never returned.

参数

listManagedUserAPIKeys 参数
名称位置类型必填说明
user_idpathstring(uuid)是—
tenant_scope_idquerystring(uuid)是Exact tenant scope selected by the platform administrator.
limitqueryinteger否—
statusquerystring: pending_activation / active / revoked否—
namequerystring否—
key_idquerystring否—
cursorquerystring否—
offsetqueryinteger否Page-number access (canonical non-negative integer, 0-10000). Cannot be combined with cursor; an offset past the end returns empty items with total.
usablequerystring: true否Only `true` is accepted. Keeps keys that can authenticate at the page snapshot: status active and expires_at absent or later than snapshot_at. An expired key keeps its active lifecycle status as history, so status=active alone does not mean usable. Combinable only with status=active or no status. Clients judge expiry against the response Date header (server clock), not their own clock.

响应

listManagedUserAPIKeys 响应
状态码说明
200Target user's API key metadata.

字段:items: array<APIKey> next_cursor: string has_more: boolean total?: integer

400Malformed JSON, UUID, revision, CIDR, duplicate or overlapping prefix, or more than 32 prefixes. Validation params expose only field indexes and counts, never any submitted CIDR, secret, digest, or matching prefix.
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
500服务内部故障,请求未完成。

失败时怎么办

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

↑ 回到列表

POST /v1/admin/users/{user_id}/api-keys

Create pending API key metadata for a tenant user

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

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

说明(契约原文)

Platform session-only endpoint requiring api_keys.admin.manage. No secret is created or returned. The target user must activate the key with their own bearer session before it can authenticate. An unknown result must be retried with the unchanged body, If-Match revision, and Idempotency-Key.

参数

createPendingManagedUserAPIKey 参数
名称位置类型必填说明
user_idpathstring(uuid)是—
tenant_scope_idquerystring(uuid)是Exact tenant scope selected by the platform administrator.
Idempotency-Keyheaderstring是—
If-Matchheaderstring是Collection creation precondition. Must be the quoted revision zero value.

请求体

application/json · 必填:是

createPendingManagedUserAPIKey 请求体
名称类型必填说明
namestring是—
scopesarray<string>是—
ip_allowlistarray<string>否Canonical network CIDRs only: no host bits, zones, IPv4-mapped IPv6, duplicate prefixes, or overlaps. Empty means unrestricted.
expires_atstring(date-time)否Must be in the future and no more than 366 days from the server clock.
pending_ttl_secondsinteger(int64)否—

响应

createPendingManagedUserAPIKey 响应
状态码说明
201Pending API key metadata without secret material.

字段:id: string(uuid) key_id: string key_prefix: string scope_id: string(uuid) tenant_id: string(uuid) user_id: string(uuid) name: string scopes: array<string> unavailable_scopes?: array<string> ip_allowlist: array<string> status: string: pending_activation / active / revoked pending_expires_at?: string(date-time) expires_at?: string(date-time) last_used_at?: string(date-time) activated_at?: string(date-time) revoked_at?: string(date-time) revision: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400Malformed JSON, UUID, revision, CIDR, duplicate or overlapping prefix, or more than 32 prefixes. Validation params expose only field indexes and counts, never any submitted CIDR, secret, digest, or matching prefix.
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
409请求的状态与已有资源或幂等记录冲突。
503A required dependency is unavailable.
500服务内部故障,请求未完成。

失败时怎么办

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

↑ 回到列表

POST /v1/admin/users/{user_id}/api-keys/{key_id}/revoke

Revoke a tenant user's API key

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

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

说明(契约原文)

Platform session-only endpoint. Administrators cannot activate, rotate, or read key secrets. The body carries the exact persisted IP allowlist. An unknown result must be retried with the unchanged body, If-Match revision, and Idempotency-Key.

参数

revokeManagedUserAPIKey 参数
名称位置类型必填说明
user_idpathstring(uuid)是—
key_idpathstring(uuid)是—
tenant_scope_idquerystring(uuid)是Exact tenant scope selected by the platform administrator.
Idempotency-Keyheaderstring是—
If-Matchheaderstring是—

请求体

application/json · 必填:是

revokeManagedUserAPIKey 请求体
名称类型必填说明
ip_allowlistarray<string>是Canonical network CIDRs only: no host bits, zones, IPv4-mapped IPv6, duplicate prefixes, or overlaps. Empty means unrestricted.
grant_all_scopesboolean否Rotate only. When true, the rotation also replaces the key scopes with every permission the current session may grant to an API key (the simple-mode "reset key"). It is part of the idempotency binding. Other operations reject true with 400 invalid_request.

响应

revokeManagedUserAPIKey 响应
状态码说明
200Revoked key metadata.

字段:id: string(uuid) key_id: string key_prefix: string scope_id: string(uuid) tenant_id: string(uuid) user_id: string(uuid) name: string scopes: array<string> unavailable_scopes?: array<string> ip_allowlist: array<string> status: string: pending_activation / active / revoked pending_expires_at?: string(date-time) expires_at?: string(date-time) last_used_at?: string(date-time) activated_at?: string(date-time) revoked_at?: string(date-time) revision: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400Malformed JSON, UUID, revision, CIDR, duplicate or overlapping prefix, or more than 32 prefixes. Validation params expose only field indexes and counts, never any submitted CIDR, secret, digest, or matching prefix.
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
409请求的状态与已有资源或幂等记录冲突。
503A required dependency is unavailable.
500服务内部故障,请求未完成。

失败时怎么办

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

↑ 回到列表