Claude Platform Docs

工作区

列出工作区
WorkspaceListPage beta().organization().workspaces().list(params = WorkspaceListParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/workspaces
创建工作区
BetaWorkspace beta().organization().workspaces().create(params, requestOptions = RequestOptions.none())
POST/v1/organizations/workspaces
获取工作区
BetaWorkspace beta().organization().workspaces().retrieve(params = WorkspaceRetrieveParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/workspaces/{workspace_id}
更新工作区
BetaWorkspace beta().organization().workspaces().update(params = WorkspaceUpdateParams.none(), requestOptions = RequestOptions.none())
POST/v1/organizations/workspaces/{workspace_id}
归档工作区
BetaWorkspace beta().organization().workspaces().archive(params = WorkspaceArchiveParams.none(), requestOptions = RequestOptions.none())
POST/v1/organizations/workspaces/{workspace_id}/archive
Models
enum BetaAllowedInferenceGeo
GLOBAL("global")
US("us")
class BetaDataResidency { allowedInferenceGeos; defaultInferenceGeo; workspaceGeo; }
AllowedInferenceGeos allowedInferenceGeos

Permitted inference geo values. 'unrestricted' means all geos are allowed.

One of the following:
One of the following:
GLOBAL("global")
US("us")
JsonValue
DefaultInferenceGeo defaultInferenceGeo

Default inference geo applied when requests omit the parameter.

One of the following:
GLOBAL("global")
US("us")
WorkspaceGeo workspaceGeo

Geographic region for workspace data storage. Immutable after creation.

class BetaDataResidencyCreateConfig { allowedInferenceGeos; defaultInferenceGeo; workspaceGeo; }
Optional<AllowedInferenceGeos> allowedInferenceGeos

Permitted inference geo values. Defaults to 'unrestricted' if omitted, which allows all geos. Use the string 'unrestricted' to allow all geos, or a list of specific geos.

One of the following:
One of the following:
GLOBAL("global")
US("us")
JsonValue
Optional<DefaultInferenceGeo> defaultInferenceGeo

Default inference geo applied when requests omit the parameter. Defaults to 'global' if omitted. Must be a member of allowed_inference_geos unless allowed_inference_geos is "unrestricted".

One of the following:
GLOBAL("global")
US("us")
Optional<WorkspaceGeo> workspaceGeo

Geographic region for workspace data storage. Immutable after creation. Defaults to 'us' if omitted.

class BetaDataResidencyUpdateConfig { allowedInferenceGeos; defaultInferenceGeo; }
Optional<AllowedInferenceGeos> allowedInferenceGeos

Permitted inference geo values. Use 'unrestricted' to allow all geos, or a list of specific geos.

One of the following:
One of the following:
GLOBAL("global")
US("us")
JsonValue
Optional<DefaultInferenceGeo> defaultInferenceGeo

Default inference geo applied when requests omit the parameter. Must be a member of allowed_inference_geos unless allowed_inference_geos is "unrestricted".

One of the following:
GLOBAL("global")
US("us")
enum BetaNoBillingWorkspaceRole
WORKSPACE_ADMIN("workspace_admin")
WORKSPACE_DEVELOPER("workspace_developer")
WORKSPACE_RESTRICTED_DEVELOPER("workspace_restricted_developer")
WORKSPACE_USER("workspace_user")
class BetaWorkspace { type = "workspace"; id; archivedAt; /* 7 more */ }
class BetaWorkspaceMember { type = "workspace_member"; userId; workspaceId; workspaceRole; }
JsonValue type = "workspace_member"

Object type.

For Workspace Members, this is always "workspace_member".

String userId

ID of the User.

String workspaceId

ID of the Workspace.

BetaWorkspaceRole workspaceRole

Role of the Workspace Member.

One of the following:
WORKSPACE_ADMIN("workspace_admin")
WORKSPACE_BILLING("workspace_billing")
WORKSPACE_DEVELOPER("workspace_developer")
WORKSPACE_RESTRICTED_DEVELOPER("workspace_restricted_developer")
WORKSPACE_USER("workspace_user")
enum BetaWorkspaceRole
WORKSPACE_ADMIN("workspace_admin")
WORKSPACE_BILLING("workspace_billing")
WORKSPACE_DEVELOPER("workspace_developer")
WORKSPACE_RESTRICTED_DEVELOPER("workspace_restricted_developer")
WORKSPACE_USER("workspace_user")

工作区速率限制

列出工作区速率限制
RateLimitListPage beta().organization().workspaces().rateLimits().list(params = RateLimitListParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/workspaces/{workspace_id}/rate_limits

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

工作区成员

列出工作区成员
MemberListPage beta().organization().workspaces().members().list(params = MemberListParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/workspaces/{workspace_id}/members
创建工作区成员
BetaWorkspaceMember beta().organization().workspaces().members().add(params, requestOptions = RequestOptions.none())
POST/v1/organizations/workspaces/{workspace_id}/members
获取工作区成员
BetaWorkspaceMember beta().organization().workspaces().members().retrieve(params, requestOptions = RequestOptions.none())
GET/v1/organizations/workspaces/{workspace_id}/members/{user_id}
更新工作区成员
BetaWorkspaceMember beta().organization().workspaces().members().update(params, requestOptions = RequestOptions.none())
POST/v1/organizations/workspaces/{workspace_id}/members/{user_id}
删除工作区成员
MemberRemoveResponse beta().organization().workspaces().members().remove(params, requestOptions = RequestOptions.none())
DELETE/v1/organizations/workspaces/{workspace_id}/members/{user_id}

工作区服务账号

列出服务账号工作区成员
ServiceAccountListPage beta().organization().workspaces().serviceAccounts().list(params = ServiceAccountListParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/workspaces/{workspace_id}/service_accounts

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

创建服务账号工作区成员
BetaServiceAccountWorkspaceMember beta().organization().workspaces().serviceAccounts().add(params, requestOptions = RequestOptions.none())
POST/v1/organizations/workspaces/{workspace_id}/service_accounts

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

获取服务账号工作区成员
BetaServiceAccountWorkspaceMember beta().organization().workspaces().serviceAccounts().retrieve(params, requestOptions = RequestOptions.none())
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。

更新服务账号工作区成员
BetaServiceAccountWorkspaceMember beta().organization().workspaces().serviceAccounts().update(params, requestOptions = RequestOptions.none())
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。

删除服务账号工作区成员
ServiceAccountRemoveResponse beta().organization().workspaces().serviceAccounts().remove(params, requestOptions = RequestOptions.none())
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。