Claude Platform Docs

Espaços de trabalho

Listar workspaces
client.Beta.Organization.Workspaces.List(ctx, query) (*Page[BetaWorkspace], error)
GET/v1/organizations/workspaces
Criar workspace
client.Beta.Organization.Workspaces.New(ctx, params) (*BetaWorkspace, error)
POST/v1/organizations/workspaces
Obter workspace
client.Beta.Organization.Workspaces.Get(ctx, workspaceID) (*BetaWorkspace, error)
GET/v1/organizations/workspaces/{workspace_id}
Atualizar workspace
client.Beta.Organization.Workspaces.Update(ctx, workspaceID, body) (*BetaWorkspace, error)
POST/v1/organizations/workspaces/{workspace_id}
Arquivar workspace
client.Beta.Organization.Workspaces.Archive(ctx, workspaceID) (*BetaWorkspace, error)
POST/v1/organizations/workspaces/{workspace_id}/archive
Models
type BetaAllowedInferenceGeo string
One of the following:
const BetaAllowedInferenceGeoGlobal BetaAllowedInferenceGeo = "global"
const BetaAllowedInferenceGeoUs BetaAllowedInferenceGeo = "us"
type BetaDataResidency struct { AllowedInferenceGeos; DefaultInferenceGeo; WorkspaceGeo }
AllowedInferenceGeos BetaDataResidencyAllowedInferenceGeosUnion

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

One of the following:
One of the following:
const BetaAllowedInferenceGeoGlobal BetaAllowedInferenceGeo = "global"
const BetaAllowedInferenceGeoUs BetaAllowedInferenceGeo = "us"
Unrestricted
DefaultInferenceGeo BetaDataResidencyDefaultInferenceGeo

Default inference geo applied when requests omit the parameter.

One of the following:
const BetaDataResidencyDefaultInferenceGeoGlobal BetaDataResidencyDefaultInferenceGeo = "global"
const BetaDataResidencyDefaultInferenceGeoUs BetaDataResidencyDefaultInferenceGeo = "us"
WorkspaceGeo BetaDataResidencyWorkspaceGeo

Geographic region for workspace data storage. Immutable after creation.

type BetaDataResidencyCreateConfigParam struct { AllowedInferenceGeos; DefaultInferenceGeo; WorkspaceGeo }
AllowedInferenceGeos BetaDataResidencyCreateConfigAllowedInferenceGeosUnionParam Optional

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:
const BetaAllowedInferenceGeoGlobal BetaAllowedInferenceGeo = "global"
const BetaAllowedInferenceGeoUs BetaAllowedInferenceGeo = "us"
Unrestricted
DefaultInferenceGeo BetaDataResidencyCreateConfigDefaultInferenceGeo Optional

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:
const BetaDataResidencyCreateConfigDefaultInferenceGeoGlobal BetaDataResidencyCreateConfigDefaultInferenceGeo = "global"
const BetaDataResidencyCreateConfigDefaultInferenceGeoUs BetaDataResidencyCreateConfigDefaultInferenceGeo = "us"
WorkspaceGeo BetaDataResidencyCreateConfigWorkspaceGeo Optional

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

type BetaDataResidencyUpdateConfigParam struct { AllowedInferenceGeos; DefaultInferenceGeo }
AllowedInferenceGeos BetaDataResidencyUpdateConfigAllowedInferenceGeosUnionParam Optional

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

One of the following:
One of the following:
const BetaAllowedInferenceGeoGlobal BetaAllowedInferenceGeo = "global"
const BetaAllowedInferenceGeoUs BetaAllowedInferenceGeo = "us"
Unrestricted
DefaultInferenceGeo BetaDataResidencyUpdateConfigDefaultInferenceGeo Optional

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:
const BetaDataResidencyUpdateConfigDefaultInferenceGeoGlobal BetaDataResidencyUpdateConfigDefaultInferenceGeo = "global"
const BetaDataResidencyUpdateConfigDefaultInferenceGeoUs BetaDataResidencyUpdateConfigDefaultInferenceGeo = "us"
type BetaNoBillingWorkspaceRole string
One of the following:
const BetaNoBillingWorkspaceRoleWorkspaceAdmin BetaNoBillingWorkspaceRole = "workspace_admin"
const BetaNoBillingWorkspaceRoleWorkspaceDeveloper BetaNoBillingWorkspaceRole = "workspace_developer"
const BetaNoBillingWorkspaceRoleWorkspaceRestrictedDeveloper BetaNoBillingWorkspaceRole = "workspace_restricted_developer"
const BetaNoBillingWorkspaceRoleWorkspaceUser BetaNoBillingWorkspaceRole = "workspace_user"
type BetaWorkspace struct { Type: "workspace"; ID; ArchivedAt; /* 7 more */ }
type BetaWorkspaceMember struct { Type: "workspace_member"; UserID; WorkspaceID; WorkspaceRole }
Type WorkspaceMember

Object type.

For Workspace Members, this is always "workspace_member".

defaultworkspace_member
UserID string

ID of the User.

WorkspaceID string

ID of the Workspace.

WorkspaceRole BetaWorkspaceRole

Role of the Workspace Member.

One of the following:
const BetaWorkspaceRoleWorkspaceAdmin BetaWorkspaceRole = "workspace_admin"
const BetaWorkspaceRoleWorkspaceBilling BetaWorkspaceRole = "workspace_billing"
const BetaWorkspaceRoleWorkspaceDeveloper BetaWorkspaceRole = "workspace_developer"
const BetaWorkspaceRoleWorkspaceRestrictedDeveloper BetaWorkspaceRole = "workspace_restricted_developer"
const BetaWorkspaceRoleWorkspaceUser BetaWorkspaceRole = "workspace_user"
type BetaWorkspaceRole string
One of the following:
const BetaWorkspaceRoleWorkspaceAdmin BetaWorkspaceRole = "workspace_admin"
const BetaWorkspaceRoleWorkspaceBilling BetaWorkspaceRole = "workspace_billing"
const BetaWorkspaceRoleWorkspaceDeveloper BetaWorkspaceRole = "workspace_developer"
const BetaWorkspaceRoleWorkspaceRestrictedDeveloper BetaWorkspaceRole = "workspace_restricted_developer"
const BetaWorkspaceRoleWorkspaceUser BetaWorkspaceRole = "workspace_user"

Espaços de trabalhoLimites de taxa

Listar limites de taxa do workspace
client.Beta.Organization.Workspaces.RateLimits.List(ctx, workspaceID, query) (*PageCursor[BetaWorkspaceRateLimit], error)
GET/v1/organizations/workspaces/{workspace_id}/rate_limits

Liste os limites de taxa de um workspace.

Espaços de trabalhoMembros

Listar membros do workspace
client.Beta.Organization.Workspaces.Members.List(ctx, workspaceID, query) (*Page[BetaWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/members
Criar membro do workspace
client.Beta.Organization.Workspaces.Members.Add(ctx, workspaceID, body) (*BetaWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members
Obter membro do workspace
client.Beta.Organization.Workspaces.Members.Get(ctx, userID, query) (*BetaWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/members/{user_id}
Atualizar membro do workspace
client.Beta.Organization.Workspaces.Members.Update(ctx, userID, params) (*BetaWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members/{user_id}
Excluir membro do workspace
client.Beta.Organization.Workspaces.Members.Remove(ctx, userID, body) (*BetaOrganizationWorkspaceMemberRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/members/{user_id}

Espaços de trabalhoContas de serviço

Listar membros de workspace de conta de serviço
client.Beta.Organization.Workspaces.ServiceAccounts.List(ctx, workspaceID, params) (*PageCursor[BetaServiceAccountWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts

Requer um token de acesso OAuth com o escopo org:admin, obtido via ant auth login --scope org:admin ou uma regra de federação de identidade de workload; chaves de Admin API não são aceitas. Consulte Gerenciar WIF com a Admin API.

Criar membro de workspace de conta de serviço
client.Beta.Organization.Workspaces.ServiceAccounts.Add(ctx, workspaceID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts

Requer um token de acesso OAuth com o escopo org:admin, obtido via ant auth login --scope org:admin ou uma regra de federação de identidade de workload; chaves de Admin API não são aceitas. Consulte Gerenciar WIF com a Admin API.

Obter membro de workspace de conta de serviço
client.Beta.Organization.Workspaces.ServiceAccounts.Get(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Requer um token de acesso OAuth com o escopo org:admin, obtido via ant auth login --scope org:admin ou uma regra de federação de identidade de workload; chaves de Admin API não são aceitas. Consulte Gerenciar WIF com a Admin API.

Atualizar membro de workspace de conta de serviço
client.Beta.Organization.Workspaces.ServiceAccounts.Update(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Requer um token de acesso OAuth com o escopo org:admin, obtido via ant auth login --scope org:admin ou uma regra de federação de identidade de workload; chaves de Admin API não são aceitas. Consulte Gerenciar WIF com a Admin API.

Excluir membro de workspace de conta de serviço
client.Beta.Organization.Workspaces.ServiceAccounts.Remove(ctx, serviceAccountID, params) (*BetaOrganizationWorkspaceServiceAccountRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Requer um token de acesso OAuth com o escopo org:admin, obtido via ant auth login --scope org:admin ou por uma regra de federação de identidade de carga de trabalho; chaves de API de Admin não são aceitas. Consulte Gerenciar WIF com a Admin API.