Claude Platform Docs

获取 RBAC 角色

GET/v1/organizations/rbac_roles/{rbac_role_id}

按 ID 检索 RBAC 角色。

RBAC 角色 API 仅适用于 Claude Enterprise 组织。

Path parameters
rbac_role_id: string

ID of the RBAC Role.

Headers
"anthropic-version": optional string

The version of the Claude API you want to use.

Read more about versioning and our version history here.

Returns
BetaRBACRole object{ type: "rbac_role", id, created_at, 3 more }
type: "rbac_role"

Object type.

For RBAC Roles, this is always "rbac_role".

defaultrbac_role
id: string

ID of the RBAC Role.

created_at: string

RFC 3339 datetime string indicating when the RBAC Role was created.

formatdate-time
display_name: string

Name of the RBAC Role. For a role created by Anthropic, this name can differ from the label claude.ai shows, and Anthropic may change the name. To keep a lasting reference to a role, store its id.

updated_at: string

RFC 3339 datetime string indicating when the RBAC Role was last updated.

formatdate-time
name: string⁠Deprecated

Deprecated: use display_name instead. Name of the RBAC Role; always the same value as display_name.

Use `display_name` instead; `name` always has the same value.
获取 RBAC 角色
curl https://api.anthropic.com/v1/organizations/rbac_roles/$RBAC_ROLE_ID \
    -H 'anthropic-version: 2023-06-01' \
    -H "X-Api-Key: $ANTHROPIC_API_KEY"
Returns Examples
Response 200
{
  "id": "rbac_role_016J8xVtKpDq3Wy9ZmN2hR4s",
  "created_at": "2024-10-30T23:58:27.427722Z",
  "display_name": "Project Editor",
  "name": "Project Editor",
  "type": "rbac_role",
  "updated_at": "2024-10-30T23:58:27.427722Z"
}