Claude Platform Docs

组织

获取当前组织
client.Organization.Get(ctx) (*OrganizationInfo, error)
GET/v1/organizations/me

检索与经过身份验证的 API 密钥关联的组织的信息。

Models
type APIKeyRequesterUnconfirmedErrorDetails struct { ErrorCode }
ErrorCode APIKeyRequesterUnconfirmedErrorCode
type ChangeOutcomeUnknownErrorDetails struct { ErrorCode }
ErrorCode ChangeOutcomeUnknownErrorCode
type ConcurrentMembershipChangeErrorDetails struct { ErrorCode }
ErrorCode ConcurrentMembershipChangeErrorCode
type OrgMemberLimitExceededErrorDetails struct { ErrorCode }
ErrorCode OrgMemberLimitExceededErrorCode
type OrganizationInfo struct { Type: "organization"; ID; Name }
Type Organization

Object type.

For Organizations, this is always "organization".

defaultorganization
ID string

ID of the Organization.

formatuuid
Name string

Name of the Organization.

type OrganizationRole string
One of the following:
const OrganizationRoleAdmin OrganizationRole = "admin"
const OrganizationRoleBilling OrganizationRole = "billing"
const OrganizationRoleClaudeCodeUser OrganizationRole = "claude_code_user"
const OrganizationRoleDeveloper OrganizationRole = "developer"
const OrganizationRoleManaged OrganizationRole = "managed"
const OrganizationRoleMembershipAdmin OrganizationRole = "membership_admin"
const OrganizationRoleOwner OrganizationRole = "owner"
const OrganizationRolePrimaryOwner OrganizationRole = "primary_owner"
const OrganizationRoleUser OrganizationRole = "user"
type RBACRoleNotFoundErrorDetails struct { ErrorCode }
ErrorCode RBACRoleNotFoundErrorCode
Errors
const ErrorCodeOrgMemberLimitExceeded ErrorCode = "org_member_limit_exceeded"⁠HTTP status 400

The organization has reached the member limit that Anthropic set for it. Pending invites count toward the limit.

const ErrorCodeAPIKeyRequesterUnconfirmed ErrorCode = "api_key_requester_unconfirmed"⁠HTTP status 403

The API could not confirm that this request came from your organization, so it refused a change to an API key. If you were updating an API key, the key did not change. If you were archiving a service account, it is archived, but some of its API keys are not. If you were removing a user, they are still a member, but they may be signed out and some of their API keys may be turned off. It is safe to send the same request again. If the error continues, contact Anthropic support and give them the request_id from this response.

const ErrorCodeRBACRoleNotFound ErrorCode = "rbac_role_not_found"⁠HTTP status 404

No RBAC Role with this ID was found.

const ErrorCodeConcurrentMembershipChange ErrorCode = "concurrent_membership_change"⁠HTTP status 409

Another change to the organization's members is in progress. Retry the request once it completes.

const ErrorCodeChangeOutcomeUnknown ErrorCode = "change_outcome_unknown"⁠HTTP status 503

Some of the request's changes may have been saved and others not. Send the same request again to finish it; changes already saved aren't repeated.

组织API 密钥

列出 API 密钥
client.Organization.APIKeys.List(ctx, query) (*Page[APIKey], error)
GET/v1/organizations/api_keys
检索 API 密钥(Admin API)
client.Organization.APIKeys.Get(ctx, apiKeyID) (*APIKey, error)
GET/v1/organizations/api_keys/{api_key_id}

按 ID 检索您组织中单个 API 密钥的信息。此 Admin API 端点需要 Admin API 密钥,用于以编程方式管理密钥,并且绝不会返回密钥的机密值。要查看或创建您自己的 API 密钥,请前往 Claude Console 中的 API 密钥页面。

更新 API 密钥
client.Organization.APIKeys.Update(ctx, apiKeyID, body) (*APIKey, error)
POST/v1/organizations/api_keys/{api_key_id}

组织外部密钥

创建外部密钥
client.Organization.ExternalKeys.New(ctx, body) (*ExternalKey, error)
POST/v1/organizations/external_keys

创建一个归调用方组织所有的外部密钥配置。

列出外部密钥
client.Organization.ExternalKeys.List(ctx, query) (*PageCursor[ExternalKey], error)
GET/v1/organizations/external_keys

列出调用方组织中的外部密钥配置。

获取外部密钥
client.Organization.ExternalKeys.Get(ctx, externalKeyID) (*ExternalKey, error)
GET/v1/organizations/external_keys/{external_key_id}

按 ID 检索调用方组织中的单个外部密钥配置。

更新外部密钥
client.Organization.ExternalKeys.Update(ctx, externalKeyID, body) (*ExternalKey, error)
POST/v1/organizations/external_keys/{external_key_id}

部分更新外部密钥配置。省略的字段保持不变。

删除外部密钥
client.Organization.ExternalKeys.Delete(ctx, externalKeyID) (*OrganizationExternalKeyDeleteResponse, error)
DELETE/v1/organizations/external_keys/{external_key_id}

删除外部密钥配置。

验证外部密钥
client.Organization.ExternalKeys.Validate(ctx, externalKeyID) (*OrganizationExternalKeyValidateResponse, error)
POST/v1/organizations/external_keys/{external_key_id}/validate

针对客户的 KMS 验证外部密钥配置。

组织联合颁发者

创建联合颁发者
client.Organization.Federation.Issuers.New(ctx, body) (*FederationIssuer, error)
POST/v1/organizations/federation_issuers

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

列出联合颁发者
client.Organization.Federation.Issuers.List(ctx, query) (*PageCursor[FederationIssuer], error)
GET/v1/organizations/federation_issuers

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

获取联合颁发者
client.Organization.Federation.Issuers.Get(ctx, federationIssuerID) (*FederationIssuer, error)
GET/v1/organizations/federation_issuers/{federation_issuer_id}

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

更新联合颁发者
client.Organization.Federation.Issuers.Update(ctx, federationIssuerID, body) (*FederationIssuer, error)
POST/v1/organizations/federation_issuers/{federation_issuer_id}

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

归档联合颁发者
client.Organization.Federation.Issuers.Archive(ctx, federationIssuerID) (*FederationIssuer, error)
POST/v1/organizations/federation_issuers/{federation_issuer_id}/archive

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

组织联合规则

创建联合规则
client.Organization.Federation.Rules.New(ctx, body) (*FederationRule, error)
POST/v1/organizations/federation_rules

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

列出联合规则
client.Organization.Federation.Rules.List(ctx, query) (*PageCursor[FederationRule], error)
GET/v1/organizations/federation_rules

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

获取联合规则
client.Organization.Federation.Rules.Get(ctx, federationRuleID) (*FederationRule, error)
GET/v1/organizations/federation_rules/{federation_rule_id}

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

更新联合规则
client.Organization.Federation.Rules.Update(ctx, federationRuleID, body) (*FederationRule, error)
POST/v1/organizations/federation_rules/{federation_rule_id}

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

归档联合规则
client.Organization.Federation.Rules.Archive(ctx, federationRuleID) (*FederationRule, error)
POST/v1/organizations/federation_rules/{federation_rule_id}/archive

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

组织联合规则工作区

添加联合规则工作区
client.Organization.Federation.Rules.Workspaces.Add(ctx, federationRuleID, body) (*FederationRuleWorkspace, error)
POST/v1/organizations/federation_rules/{federation_rule_id}/workspaces

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

列出联合规则工作区
client.Organization.Federation.Rules.Workspaces.List(ctx, federationRuleID, query) (*PageCursor[FederationRuleWorkspace], error)
GET/v1/organizations/federation_rules/{federation_rule_id}/workspaces

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

移除联合规则工作区
client.Organization.Federation.Rules.Workspaces.Remove(ctx, workspaceID, body) (*OrganizationFederationRuleWorkspaceRemoveResponse, error)
DELETE/v1/organizations/federation_rules/{federation_rule_id}/workspaces/{workspace_id}

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

组织邀请

创建邀请
client.Organization.Invites.New(ctx, body) (*OrganizationInvite, error)
POST/v1/organizations/invites

通过电子邮件邀请用户加入组织。

列出邀请
client.Organization.Invites.List(ctx, query) (*Page[OrganizationInvite], error)
GET/v1/organizations/invites

列出组织的邀请。

获取邀请
client.Organization.Invites.Get(ctx, inviteID) (*OrganizationInvite, error)
GET/v1/organizations/invites/{invite_id}

按 ID 检索邀请。

删除邀请
client.Organization.Invites.Delete(ctx, inviteID) (*OrganizationInviteDeleteResponse, error)
DELETE/v1/organizations/invites/{invite_id}

删除待处理的邀请。

组织服务账号

创建服务账号
client.Organization.ServiceAccounts.New(ctx, body) (*ServiceAccount, error)
POST/v1/organizations/service_accounts

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

列出服务账号
client.Organization.ServiceAccounts.List(ctx, query) (*PageCursor[ServiceAccount], error)
GET/v1/organizations/service_accounts

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

获取服务账号
client.Organization.ServiceAccounts.Get(ctx, serviceAccountID) (*ServiceAccount, error)
GET/v1/organizations/service_accounts/{service_account_id}

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

更新服务账号
client.Organization.ServiceAccounts.Update(ctx, serviceAccountID, body) (*ServiceAccount, error)
POST/v1/organizations/service_accounts/{service_account_id}

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

归档服务账号
client.Organization.ServiceAccounts.Archive(ctx, serviceAccountID) (*ServiceAccount, error)
POST/v1/organizations/service_accounts/{service_account_id}/archive

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

组织服务账号工作区

将工作区添加到服务账号
client.Organization.ServiceAccounts.Workspaces.Add(ctx, serviceAccountID, body) (*ServiceAccountWorkspaceMember, error)
POST/v1/organizations/service_accounts/{service_account_id}/workspaces

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

列出服务账号所属的工作区
client.Organization.ServiceAccounts.Workspaces.List(ctx, serviceAccountID, query) (*PageCursor[ServiceAccountWorkspaceMember], error)
GET/v1/organizations/service_accounts/{service_account_id}/workspaces

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

从服务账号中移除工作区
client.Organization.ServiceAccounts.Workspaces.Remove(ctx, workspaceID, body) (*OrganizationServiceAccountWorkspaceRemoveResponse, error)
DELETE/v1/organizations/service_accounts/{service_account_id}/workspaces/{workspace_id}

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

组织用户

列出用户
client.Organization.Users.List(ctx, query) (*Page[OrganizationUser], error)
GET/v1/organizations/users

列出组织的成员。

获取用户
client.Organization.Users.Get(ctx, userID) (*OrganizationUser, error)
GET/v1/organizations/users/{user_id}

按用户 ID 检索组织成员。

更新用户
client.Organization.Users.Update(ctx, userID, body) (*OrganizationUser, error)
POST/v1/organizations/users/{user_id}

更新成员的组织角色。

移除用户
client.Organization.Users.Remove(ctx, userID) (*OrganizationUserRemoveResponse, error)
DELETE/v1/organizations/users/{user_id}

将成员从组织中移除。

组织工作区

列出工作区
client.Organization.Workspaces.List(ctx, query) (*Page[Workspace], error)
GET/v1/organizations/workspaces
创建工作区
client.Organization.Workspaces.New(ctx, body) (*Workspace, error)
POST/v1/organizations/workspaces
获取工作区
client.Organization.Workspaces.Get(ctx, workspaceID) (*Workspace, error)
GET/v1/organizations/workspaces/{workspace_id}
更新工作区
client.Organization.Workspaces.Update(ctx, workspaceID, body) (*Workspace, error)
POST/v1/organizations/workspaces/{workspace_id}
归档工作区
client.Organization.Workspaces.Archive(ctx, workspaceID) (*Workspace, error)
POST/v1/organizations/workspaces/{workspace_id}/archive

组织工作区速率限制

列出工作区速率限制
client.Organization.Workspaces.RateLimits.List(ctx, workspaceID, query) (*PageCursor[WorkspaceRateLimit], error)
GET/v1/organizations/workspaces/{workspace_id}/rate_limits

列出工作区的速率限制(rate limit)。

设置工作区速率限制
client.Organization.Workspaces.RateLimits.Update(ctx, rateLimitID, params) (*WorkspaceRateLimit, error)
POST/v1/organizations/workspaces/{workspace_id}/rate_limits/{rate_limit_id}

为工作区中的某个速率限制组设置或清除速率限制覆盖值。

组织工作区成员

列出工作区成员
client.Organization.Workspaces.Members.List(ctx, workspaceID, query) (*Page[WorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/members
创建工作区成员
client.Organization.Workspaces.Members.Add(ctx, workspaceID, body) (*WorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members
获取工作区成员
client.Organization.Workspaces.Members.Get(ctx, userID, query) (*WorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/members/{user_id}
更新工作区成员
client.Organization.Workspaces.Members.Update(ctx, userID, params) (*WorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members/{user_id}
删除工作区成员
client.Organization.Workspaces.Members.Remove(ctx, userID, body) (*OrganizationWorkspaceMemberRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/members/{user_id}

组织工作区服务账号

列出服务账号工作区成员
client.Organization.Workspaces.ServiceAccounts.List(ctx, workspaceID, query) (*PageCursor[ServiceAccountWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

创建服务账号工作区成员
client.Organization.Workspaces.ServiceAccounts.Add(ctx, workspaceID, body) (*ServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

获取服务账号工作区成员
client.Organization.Workspaces.ServiceAccounts.Get(ctx, serviceAccountID, query) (*ServiceAccountWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

更新服务账号工作区成员
client.Organization.Workspaces.ServiceAccounts.Update(ctx, serviceAccountID, params) (*ServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

删除服务账号工作区成员
client.Organization.Workspaces.ServiceAccounts.Remove(ctx, serviceAccountID, body) (*OrganizationWorkspaceServiceAccountRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

需要具有 org:admin 范围的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或 "workload identity federation"(工作负载身份联合)规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF。

组织速率限制

列出组织速率限制
client.Organization.RateLimits.List(ctx, query) (*PageCursor[OrganizationRateLimit], error)
GET/v1/organizations/rate_limits

列出您组织的 Messages API "rate limit"(速率限制)。

组织合规设置

获取合规设置
client.Organization.ComplianceSettings.Get(ctx) (*OrganizationComplianceSettings, error)
GET/v1/organizations/compliance_settings

检索您组织的合规设置。

更新合规设置
client.Organization.ComplianceSettings.Update(ctx, body) (*OrganizationComplianceSettings, error)
POST/v1/organizations/compliance_settings

更新您组织的合规设置。

组织分析摘要

获取活动摘要
client.Organization.Analytics.Summaries.List(ctx, query) (*PageCursor[AnalyticsSingleDayActivitySummary], error)
GET/v1/organizations/analytics/summaries

获取某个日期范围内的组织级活动摘要。

组织分析用户

列出用户活动
client.Organization.Analytics.Users.List(ctx, query) (*PageCursor[AnalyticsUserActivity], error)
GET/v1/organizations/analytics/users

获取给定日期的每用户活动,支持基于游标的分页。

组织分析应用聊天项目

获取聊天项目用量
client.Organization.Analytics.Apps.Chat.Projects.List(ctx, query) (*PageCursor[AnalyticsProjectActivity], error)
GET/v1/organizations/analytics/apps/chat/projects

获取指定日期的每项目活动,支持基于游标的分页。

组织分析连接器

获取连接器使用情况
client.Organization.Analytics.Connectors.List(ctx, query) (*PageCursor[AnalyticsConnectorActivity], error)
GET/v1/organizations/analytics/connectors

获取给定日期的每连接器使用情况,支持基于游标的分页。

组织分析插件

获取插件使用情况
client.Organization.Analytics.Plugins.List(ctx, query) (*PageCursor[AnalyticsPluginActivity], error)
GET/v1/organizations/analytics/plugins

获取给定日期的每插件安装 + 调用使用情况,支持分页。

组织分析技能

获取技能使用情况
client.Organization.Analytics.Skills.List(ctx, query) (*PageCursor[AnalyticsSkillActivity], error)
GET/v1/organizations/analytics/skills

获取给定日期的每技能使用情况,支持基于游标的分页。

组织分析Artifacts

获取 Artifact 活动
client.Organization.Analytics.Artifacts.List(ctx, query) (*PageCursor[AnalyticsArtifactActivity], error)
GET/v1/organizations/analytics/artifacts

获取给定日期的 Artifact 创建活动,按 MIME 类型细分。

组织支出限额生效

列出生效的支出限额
client.Organization.SpendLimits.Effective.List(ctx, query) (*PageCursor[SpendSummary], error)
GET/v1/organizations/spend_limits/effective

列出每位成员的生效支出限额及本周期至今的支出。

组织支出限额提额请求

列出支出限额提额请求
client.Organization.SpendLimits.IncreaseRequests.List(ctx, query) (*PageCursor[SpendLimitIncreaseRequest], error)
GET/v1/organizations/spend_limit_increase_requests

列出支出限额提额请求,最新的在前。

获取支出限额提额请求
client.Organization.SpendLimits.IncreaseRequests.Get(ctx, spendLimitIncreaseRequestID) (*SpendLimitIncreaseRequest, error)
GET/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}

检索支出限额提额请求。

批准支出限额提额请求
client.Organization.SpendLimits.IncreaseRequests.Approve(ctx, spendLimitIncreaseRequestID, body) (*OrganizationSpendLimitIncreaseRequestApproveResponse, error)
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/approve

批准待处理的支出限额提额请求。

拒绝支出限额提额请求
client.Organization.SpendLimits.IncreaseRequests.Deny(ctx, spendLimitIncreaseRequestID, body) (*SpendLimitIncreaseRequest, error)
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/deny

拒绝待处理的支出限额提额请求。

组织RBAC 组

创建 RBAC 组
client.Organization.RBACGroups.New(ctx, body) (*RBACGroup, error)
POST/v1/organizations/rbac_groups

在 Claude Enterprise 租户中创建 RBAC 组。通过 API 创建的组的来源类型为 "direct"。

列出 RBAC 组
client.Organization.RBACGroups.List(ctx, query) (*PageCursor[RBACGroup], error)
GET/v1/organizations/rbac_groups

列出 Claude Enterprise 租户中的 RBAC 组。

获取 RBAC 组
client.Organization.RBACGroups.Get(ctx, rbacGroupID) (*RBACGroup, error)
GET/v1/organizations/rbac_groups/{rbac_group_id}

按 ID 检索 RBAC 组。

更新 RBAC 组
client.Organization.RBACGroups.Update(ctx, rbacGroupID, body) (*RBACGroup, error)
POST/v1/organizations/rbac_groups/{rbac_group_id}

更新 RBAC 组的名称。当租户中的某个组织使用 SCIM 预配时,由身份提供商预配的组(来源类型为 "scim")无法通过 API 修改。

删除 RBAC 组
client.Organization.RBACGroups.Delete(ctx, rbacGroupID) (*DeletedRBACGroup, error)
DELETE/v1/organizations/rbac_groups/{rbac_group_id}

删除 RBAC 组。当租户中的某个组织使用 SCIM 预配时,由身份提供商预配的组(来源类型为 "scim")无法通过 API 删除。

组织RBAC 组成员

列出 RBAC 组成员
client.Organization.RBACGroups.Members.List(ctx, rbacGroupID, query) (*PageCursor[RBACGroupMember], error)
GET/v1/organizations/rbac_groups/{rbac_group_id}/members

列出 RBAC 组的成员。

添加 RBAC 组成员
client.Organization.RBACGroups.Members.Add(ctx, rbacGroupID, body) (*RBACGroupMember, error)
POST/v1/organizations/rbac_groups/{rbac_group_id}/members

将用户添加到 RBAC 组。当租户中的某个组织使用 SCIM 预配时,由身份提供商预配的组(来源类型为 "scim")的成员资格无法通过 API 修改。

移除 RBAC 组成员
client.Organization.RBACGroups.Members.Remove(ctx, userID, body) (*DeletedRBACGroupMember, error)
DELETE/v1/organizations/rbac_groups/{rbac_group_id}/members/{user_id}

从 RBAC 组中移除用户。当租户中的某个组织使用 SCIM 预配时,由身份提供商预配的组(来源类型为 "scim")的成员资格无法通过 API 修改。

组织RBAC 角色

列出 RBAC 角色
client.Organization.RBACRoles.List(ctx, query) (*PageCursor[RBACRole], error)
GET/v1/organizations/rbac_roles

列出组织中的 RBAC 角色。

获取 RBAC 角色
client.Organization.RBACRoles.Get(ctx, rbacRoleID) (*RBACRole, error)
GET/v1/organizations/rbac_roles/{rbac_role_id}

按 ID 检索 RBAC 角色。

组织RBAC 角色权限

列出 RBAC 角色权限
client.Organization.RBACRoles.Permissions.List(ctx, rbacRoleID, query) (*PageCursor[RBACRolePermission], error)
GET/v1/organizations/rbac_roles/{rbac_role_id}/permissions

列出 RBAC 角色授予的权限。