English ← MyDocs

组织

列出组织

get /v1/compliance/organizations

列出父组织下的组织。

返回按创建日期升序排列的组织列表。 此端点不支持分页,如果响应超过 1,000 个组织,将返回错误。

请求头参数

  • "x-api-key": optional string

返回值

  • data: array of object { created_at, name, uuid }

    按创建日期升序排列的组织列表

    • created_at: string

      组织创建时间(RFC 3339 格式)

    • name: string

      组织名称

    • uuid: string

      组织的唯一标识符(UUID 格式)

示例

curl https://api.anthropic.com/v1/compliance/organizations \
    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"

响应

{
  "data": [
    {
      "created_at": "created_at",
      "name": "name",
      "uuid": "uuid"
    }
  ]
}

领域类型

Organization List Response

  • OrganizationListResponse object { data }

    父组织下的组织列表。

    • data: array of object { created_at, name, uuid }

      按创建日期升序排列的组织列表

      • created_at: string

        组织创建时间(RFC 3339 格式)

      • name: string

        组织名称

      • uuid: string

        组织的唯一标识符(UUID 格式)

用户

列出组织用户

get /v1/compliance/organizations/{org_uuid}/users

列出组织的当前用户成员。

返回值: 带有分页信息的用户成员列表

路径参数

  • org_uuid: string

    组织 UUID

查询参数

  • limit: optional number

    最大结果数(默认值:500,最大值:1000)

  • page: optional string

    来自先前响应 next_page 字段的不透明分页令牌。传递此值以检索下一页结果。客户端应将此值视为不透明字符串,不要尝试解析或解释其内容,因为格式可能会在不另行通知的情况下更改。

请求头参数

  • "x-api-key": optional string

返回值

  • data: array of object { id, created_at, email, 2 more }

    按组织加入日期升序排列的当前组织成员列表

    • id: string

      用户标识符(标签 ID)

    • created_at: string

      用户账户创建时间戳

    • email: string

      用户当前的电子邮件地址

    • full_name: string

      用户当前的全名

    • organization_role: "admin" or "billing" or "claude_code_user" or 6 more

      用户在组织中的内置角色。这与可能同时分配的任何自定义 RBAC 角色不同。

      • "admin"

      • "billing"

      • "claude_code_user"

      • "developer"

      • "managed"

      • "membership_admin"

      • "owner"

      • "primary_owner"

      • "user"

  • has_more: boolean

    是否存在更多记录超出当前结果集

  • next_page: string

    用于检索下一页的令牌。在下一次请求中将此值用作 'page' 参数

示例

curl https://api.anthropic.com/v1/compliance/organizations/$ORG_UUID/users \
    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"

响应

{
  "data": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "email": "email",
      "full_name": "full_name",
      "organization_role": "admin"
    }
  ],
  "has_more": true,
  "next_page": "next_page"
}

领域类型

User List Response

  • UserListResponse object { id, created_at, email, 2 more }

    用于合规响应的用户成员信息。

    • id: string

      用户标识符(标签 ID)

    • created_at: string

      用户账户创建时间戳

    • email: string

      用户当前的电子邮件地址

    • full_name: string

      用户当前的全名

    • organization_role: "admin" or "billing" or "claude_code_user" or 6 more

      用户在组织中的内置角色。这与可能同时分配的任何自定义 RBAC 角色不同。

      • "admin"

      • "billing"

      • "claude_code_user"

      • "developer"

      • "managed"

      • "membership_admin"

      • "owner"

      • "primary_owner"

      • "user"

角色

列出合规角色

get /v1/compliance/organizations/{org_uuid}/roles

列出合规角色

路径参数

  • org_uuid: string

    组织 UUID

查询参数

  • limit: optional number

    最大结果数(默认值:500,最大值:1000)

  • page: optional string

    来自先前响应 next_page 字段的不透明分页令牌。传递此值以检索下一页结果。客户端应将此值视为不透明字符串,不要尝试解析或解释其内容,因为格式可能会在不另行通知的情况下更改。

请求头参数

  • "x-api-key": optional string

返回值

  • data: array of object { id, created_at, description, 2 more }

    角色列表

    • id: string

      角色标识符(标签 ID)

    • created_at: string

      角色创建时间戳(ISO 8601)

    • description: string

      角色描述

    • name: string

      角色名称

    • updated_at: string

      角色最后更新时间戳(ISO 8601)

  • has_more: boolean

    是否存在更多记录超出当前结果集

  • next_page: string

    用于检索下一页的令牌。在下一次请求中将此值用作 'page' 参数

示例

curl https://api.anthropic.com/v1/compliance/organizations/$ORG_UUID/roles \
    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"

响应

{
  "data": [
    {
      "id": "id",
      "created_at": "created_at",
      "description": "description",
      "name": "name",
      "updated_at": "updated_at"
    }
  ],
  "has_more": true,
  "next_page": "next_page"
}

获取合规角色

get /v1/compliance/organizations/{org_uuid}/roles/{role_id}

获取合规角色

路径参数

  • org_uuid: string

    组织 UUID

  • role_id: string

    角色 ID(标签 ID,例如 rbac_role_abc123)

请求头参数

  • "x-api-key": optional string

返回值

  • id: string

    角色标识符(标签 ID)

  • created_at: string

    角色创建时间戳(ISO 8601)

  • description: string

    角色描述

  • name: string

    角色名称

  • updated_at: string

    角色最后更新时间戳(ISO 8601)

示例

curl https://api.anthropic.com/v1/compliance/organizations/$ORG_UUID/roles/$ROLE_ID \
    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"

响应

{
  "id": "id",
  "created_at": "created_at",
  "description": "description",
  "name": "name",
  "updated_at": "updated_at"
}

领域类型

Role List Response

  • RoleListResponse object { id, created_at, description, 2 more }

    用于合规响应的角色信息。

    • id: string

      角色标识符(标签 ID)

    • created_at: string

      角色创建时间戳(ISO 8601)

    • description: string

      角色描述

    • name: string

      角色名称

    • updated_at: string

      角色最后更新时间戳(ISO 8601)

Role Retrieve Response

  • RoleRetrieveResponse object { id, created_at, description, 2 more }

    用于合规响应的角色信息。

    • id: string

      角色标识符(标签 ID)

    • created_at: string

      角色创建时间戳(ISO 8601)

    • description: string

      角色描述

    • name: string

      角色名称

    • updated_at: string

      角色最后更新时间戳(ISO 8601)

权限

列出合规角色权限

get /v1/compliance/organizations/{org_uuid}/roles/{role_id}/permissions

列出合规角色权限

路径参数

  • org_uuid: string

    组织 UUID

  • role_id: string

    角色 ID(标签 ID,例如 rbac_role_abc123)

查询参数

  • limit: optional number

    最大结果数(默认值:500,最大值:1000)

  • page: optional string

    来自先前响应 next_page 字段的不透明分页令牌。传递此值以检索下一页结果。客户端应将此值视为不透明字符串,不要尝试解析或解释其内容,因为格式可能会在不另行通知的情况下更改。

请求头参数

  • "x-api-key": optional string

返回值

  • data: array of object { action, resource_id, resource_type }

    权限列表

    • action: string

      对资源允许的操作

    • resource_id: string

      权限适用的资源标识符

    • resource_type: string

      权限适用的资源类型

  • has_more: boolean

    是否存在更多记录超出当前结果集

  • next_page: string

    用于检索下一页的令牌。在下一次请求中将此值用作 'page' 参数

示例

curl https://api.anthropic.com/v1/compliance/organizations/$ORG_UUID/roles/$ROLE_ID/permissions \
    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"

响应

{
  "data": [
    {
      "action": "action",
      "resource_id": "resource_id",
      "resource_type": "resource_type"
    }
  ],
  "has_more": true,
  "next_page": "next_page"
}

领域类型

Permission List Response

  • PermissionListResponse object { action, resource_id, resource_type }

    角色授予的权限。

    • action: string

      对资源允许的操作

    • resource_id: string

      权限适用的资源标识符

    • resource_type: string

      权限适用的资源类型