方法路径摘要认证
GET/v1/custom-rbac/grantsPage through active or revoked custom-role grants登录会话
POST/v1/custom-rbac/grantsAssign the current role revision to another active tenant member登录会话
POST/v1/custom-rbac/grants/{grant_id}/revokeAppend a custom-role grant revocation fact登录会话
GET/v1/custom-rbac/permissionsList the tenant-delegable permission catalog登录会话
GET/v1/custom-rbac/rolesPage through custom roles in the authenticated tenant scope登录会话
POST/v1/custom-rbac/rolesCreate a custom role and its first immutable revision登录会话
GET/v1/custom-rbac/roles/{role_id}Get a custom role in the authenticated tenant scope登录会话
POST/v1/custom-rbac/roles/{role_id}/deactivateDeactivate a custom role with compare-and-swap登录会话
POST/v1/custom-rbac/roles/{role_id}/publishPublish a new permission revision with compare-and-swap登录会话
POST/v1/custom-rbac/roles/{role_id}/renameRename a custom role with revision compare-and-swap登录会话

契约文件:api/control-custom-rbac.openapi.yaml

接口详情

GET /v1/custom-rbac/grants

Page through active or revoked custom-role grants

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

全部需要:identity.roles.manage

说明(契约原文)

The signed cursor freezes grant creation and revocation state at the durable commit-ordered database watermark captured by the first page.

参数

listTenantCustomRoleGrants 参数
名称位置类型必填说明
limitqueryinteger否—
cursorquerystring否—
role_idquerystring(uuid)否—
subject_user_idquerystring(uuid)否—
statequerystring: active / revoked / all否—

响应

listTenantCustomRoleGrants 响应
状态码说明
200Stable page of custom-role grants.

字段:data: array<Grant> page: Page

400Strict header, query, path, or JSON validation failed
401Authentication is required
403Tenant session or delegation permission was denied
408Caller cancelled the request
502Storage returned invalid facts or the response exceeded its bound
503Storage or a required dependency is unavailable
504Server-side operation deadline elapsed

失败时怎么办

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

↑ 回到列表

POST /v1/custom-rbac/grants

Assign the current role revision to another active tenant member

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

全部需要:identity.roles.manage

参数

assignTenantCustomRole 参数
名称位置类型必填说明
If-Matchheaderstring是Quoted positive decimal current role revision, for example "3".
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring是—
Traceparentheaderstring是—
X-Step-Up-Proofheaderstring否Opaque 32-byte base64url MFA proof. Required when the affected permission set contains a catalog entry with step_up_required=true. The server consumes it in the RBAC transaction and binds the use to the operation, authenticated tenant actor and session, target role, subject or grant, expected revision, normalized business payload, and idempotency key. Reusing the proof for a different logical mutation is rejected even when request IDs match.

请求体

application/json · 必填:是

assignTenantCustomRole 请求体
名称类型必填说明
role_idstring(uuid)是—
subject_user_idstring(uuid)是—

响应

assignTenantCustomRole 响应
状态码说明
201Grant created, or the original response replayed.

字段:data: Grant

400Strict header, query, path, or JSON validation failed
401Authentication is required
403Tenant session or delegation permission was denied
404Resource is absent or outside the authenticated tenant
409Idempotency, revision, name, lifecycle, or immutability conflict
413Request body exceeded the configured limit
428A valid bound and unconsumed step-up proof is required
408Caller cancelled the request
502Storage returned invalid facts or the response exceeded its bound
503Storage or a required dependency is unavailable
504Server-side operation deadline elapsed

失败时怎么办

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

↑ 回到列表

POST /v1/custom-rbac/grants/{grant_id}/revoke

Append a custom-role grant revocation fact

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

全部需要:identity.roles.manage

参数

revokeTenantCustomRoleGrant 参数
名称位置类型必填说明
grant_idpathstring(uuid)是—
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring是—
Traceparentheaderstring是—
X-Step-Up-Proofheaderstring否Opaque 32-byte base64url MFA proof. Required when the affected permission set contains a catalog entry with step_up_required=true. The server consumes it in the RBAC transaction and binds the use to the operation, authenticated tenant actor and session, target role, subject or grant, expected revision, normalized business payload, and idempotency key. Reusing the proof for a different logical mutation is rejected even when request IDs match.

响应

revokeTenantCustomRoleGrant 响应
状态码说明
200Revocation appended, or the original response replayed.

字段:data: Revocation

400Strict header, query, path, or JSON validation failed
401Authentication is required
403Tenant session or delegation permission was denied
404Resource is absent or outside the authenticated tenant
409Idempotency, revision, name, lifecycle, or immutability conflict
428A valid bound and unconsumed step-up proof is required
408Caller cancelled the request
502Storage returned invalid facts or the response exceeded its bound
503Storage or a required dependency is unavailable
504Server-side operation deadline elapsed

失败时怎么办

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

↑ 回到列表

GET /v1/custom-rbac/permissions

List the tenant-delegable permission catalog

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

全部需要:identity.roles.manage

响应

listTenantDelegablePermissions 响应
状态码说明
200Delegable permission catalog.

字段:data: array<Permission>

400Strict header, query, path, or JSON validation failed
401Authentication is required
403Tenant session or delegation permission was denied
408Caller cancelled the request
502Storage returned invalid facts or the response exceeded its bound
503Storage or a required dependency is unavailable
504Server-side operation deadline elapsed

失败时怎么办

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

↑ 回到列表

GET /v1/custom-rbac/roles

Page through custom roles in the authenticated tenant scope

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

全部需要:identity.roles.manage

说明(契约原文)

The signed cursor is bound to the authenticated scope and include_deactivated filter, and freezes role creation, revision, and deactivation state at a durable commit-ordered database watermark from the first page.

参数

listTenantCustomRoles 参数
名称位置类型必填说明
limitqueryinteger否—
cursorquerystring否—
include_deactivatedqueryboolean否—

响应

listTenantCustomRoles 响应
状态码说明
200Stable page of custom roles.

字段:data: array<Role> page: Page

400Strict header, query, path, or JSON validation failed
401Authentication is required
403Tenant session or delegation permission was denied
408Caller cancelled the request
502Storage returned invalid facts or the response exceeded its bound
503Storage or a required dependency is unavailable
504Server-side operation deadline elapsed

失败时怎么办

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

↑ 回到列表

POST /v1/custom-rbac/roles

Create a custom role and its first immutable revision

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

全部需要:identity.roles.manage

参数

createTenantCustomRole 参数
名称位置类型必填说明
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring是—
Traceparentheaderstring是—
X-Step-Up-Proofheaderstring否Opaque 32-byte base64url MFA proof. Required when the affected permission set contains a catalog entry with step_up_required=true. The server consumes it in the RBAC transaction and binds the use to the operation, authenticated tenant actor and session, target role, subject or grant, expected revision, normalized business payload, and idempotency key. Reusing the proof for a different logical mutation is rejected even when request IDs match.

请求体

application/json · 必填:是

createTenantCustomRole 请求体
名称类型必填说明
namestring是—
permissionsarray<string>是—

响应

createTenantCustomRole 响应
状态码说明
201Custom role created, or the original response replayed.

字段:data: Role

400Strict header, query, path, or JSON validation failed
401Authentication is required
403Tenant session or delegation permission was denied
409Idempotency, revision, name, lifecycle, or immutability conflict
413Request body exceeded the configured limit
422A requested permission is not tenant delegable
428A valid bound and unconsumed step-up proof is required
408Caller cancelled the request
502Storage returned invalid facts or the response exceeded its bound
503Storage or a required dependency is unavailable
504Server-side operation deadline elapsed

失败时怎么办

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

↑ 回到列表

GET /v1/custom-rbac/roles/{role_id}

Get a custom role in the authenticated tenant scope

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

全部需要:identity.roles.manage

说明(契约原文)

Unknown and cross-tenant role IDs return the same 404 response.

参数

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

响应

getTenantCustomRole 响应
状态码说明
200Custom role detail.

字段:data: Role

400Strict header, query, path, or JSON validation failed
401Authentication is required
403Tenant session or delegation permission was denied
404Resource is absent or outside the authenticated tenant
408Caller cancelled the request
502Storage returned invalid facts or the response exceeded its bound
503Storage or a required dependency is unavailable
504Server-side operation deadline elapsed

失败时怎么办

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

↑ 回到列表

POST /v1/custom-rbac/roles/{role_id}/deactivate

Deactivate a custom role with compare-and-swap

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

全部需要:identity.roles.manage

参数

deactivateTenantCustomRole 参数
名称位置类型必填说明
role_idpathstring(uuid)是—
If-Matchheaderstring是Quoted positive decimal current role revision, for example "3".
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring是—
Traceparentheaderstring是—
X-Step-Up-Proofheaderstring否Opaque 32-byte base64url MFA proof. Required when the affected permission set contains a catalog entry with step_up_required=true. The server consumes it in the RBAC transaction and binds the use to the operation, authenticated tenant actor and session, target role, subject or grant, expected revision, normalized business payload, and idempotency key. Reusing the proof for a different logical mutation is rejected even when request IDs match.

响应

deactivateTenantCustomRole 响应
状态码说明
200Custom role detail.

字段:data: Role

400Strict header, query, path, or JSON validation failed
401Authentication is required
403Tenant session or delegation permission was denied
404Resource is absent or outside the authenticated tenant
409Idempotency, revision, name, lifecycle, or immutability conflict
413Request body exceeded the configured limit
422A requested permission is not tenant delegable
428A valid bound and unconsumed step-up proof is required
408Caller cancelled the request
502Storage returned invalid facts or the response exceeded its bound
503Storage or a required dependency is unavailable
504Server-side operation deadline elapsed

失败时怎么办

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

↑ 回到列表

POST /v1/custom-rbac/roles/{role_id}/publish

Publish a new permission revision with compare-and-swap

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

全部需要:identity.roles.manage

参数

publishTenantCustomRoleRevision 参数
名称位置类型必填说明
role_idpathstring(uuid)是—
If-Matchheaderstring是Quoted positive decimal current role revision, for example "3".
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring是—
Traceparentheaderstring是—
X-Step-Up-Proofheaderstring否Opaque 32-byte base64url MFA proof. Required when the affected permission set contains a catalog entry with step_up_required=true. The server consumes it in the RBAC transaction and binds the use to the operation, authenticated tenant actor and session, target role, subject or grant, expected revision, normalized business payload, and idempotency key. Reusing the proof for a different logical mutation is rejected even when request IDs match.

请求体

application/json · 必填:是

publishTenantCustomRoleRevision 请求体
名称类型必填说明
permissionsarray<string>是—

响应

publishTenantCustomRoleRevision 响应
状态码说明
200Custom role detail.

字段:data: Role

400Strict header, query, path, or JSON validation failed
401Authentication is required
403Tenant session or delegation permission was denied
404Resource is absent or outside the authenticated tenant
409Idempotency, revision, name, lifecycle, or immutability conflict
413Request body exceeded the configured limit
422A requested permission is not tenant delegable
428A valid bound and unconsumed step-up proof is required
408Caller cancelled the request
502Storage returned invalid facts or the response exceeded its bound
503Storage or a required dependency is unavailable
504Server-side operation deadline elapsed

失败时怎么办

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

↑ 回到列表

POST /v1/custom-rbac/roles/{role_id}/rename

Rename a custom role with revision compare-and-swap

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

全部需要:identity.roles.manage

参数

renameTenantCustomRole 参数
名称位置类型必填说明
role_idpathstring(uuid)是—
If-Matchheaderstring是Quoted positive decimal current role revision, for example "3".
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring是—
Traceparentheaderstring是—
X-Step-Up-Proofheaderstring否Opaque 32-byte base64url MFA proof. Required when the affected permission set contains a catalog entry with step_up_required=true. The server consumes it in the RBAC transaction and binds the use to the operation, authenticated tenant actor and session, target role, subject or grant, expected revision, normalized business payload, and idempotency key. Reusing the proof for a different logical mutation is rejected even when request IDs match.

请求体

application/json · 必填:是

renameTenantCustomRole 请求体
名称类型必填说明
namestring是—

响应

renameTenantCustomRole 响应
状态码说明
200Custom role detail.

字段:data: Role

400Strict header, query, path, or JSON validation failed
401Authentication is required
403Tenant session or delegation permission was denied
404Resource is absent or outside the authenticated tenant
409Idempotency, revision, name, lifecycle, or immutability conflict
413Request body exceeded the configured limit
422A requested permission is not tenant delegable
428A valid bound and unconsumed step-up proof is required
408Caller cancelled the request
502Storage returned invalid facts or the response exceeded its bound
503Storage or a required dependency is unavailable
504Server-side operation deadline elapsed

失败时怎么办

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

↑ 回到列表