Claude Platform Docs

Workspace

Daftar Workspace
client.Beta.Organization.Workspaces.List(ctx, query) (*Page[BetaWorkspace], error)
GET/v1/organizations/workspaces
Buat Workspace
client.Beta.Organization.Workspaces.New(ctx, params) (*BetaWorkspace, error)
POST/v1/organizations/workspaces
Dapatkan Workspace
client.Beta.Organization.Workspaces.Get(ctx, workspaceID) (*BetaWorkspace, error)
GET/v1/organizations/workspaces/{workspace_id}
Perbarui Workspace
client.Beta.Organization.Workspaces.Update(ctx, workspaceID, body) (*BetaWorkspace, error)
POST/v1/organizations/workspaces/{workspace_id}
Arsipkan 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"

WorkspaceBatas Laju

Daftar Batas Laju Workspace
client.Beta.Organization.Workspaces.RateLimits.List(ctx, workspaceID, query) (*PageCursor[BetaWorkspaceRateLimit], error)
GET/v1/organizations/workspaces/{workspace_id}/rate_limits

WorkspaceAnggota

Daftar Anggota Workspace
client.Beta.Organization.Workspaces.Members.List(ctx, workspaceID, query) (*Page[BetaWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/members
Buat Anggota Workspace
client.Beta.Organization.Workspaces.Members.Add(ctx, workspaceID, body) (*BetaWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members
Dapatkan Anggota Workspace
client.Beta.Organization.Workspaces.Members.Get(ctx, userID, query) (*BetaWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/members/{user_id}
Perbarui Anggota Workspace
client.Beta.Organization.Workspaces.Members.Update(ctx, userID, params) (*BetaWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members/{user_id}
Hapus Anggota Workspace
client.Beta.Organization.Workspaces.Members.Remove(ctx, userID, body) (*BetaOrganizationWorkspaceMemberRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/members/{user_id}

WorkspaceAkun Layanan

Daftar Anggota Workspace Akun Layanan
client.Beta.Organization.Workspaces.ServiceAccounts.List(ctx, workspaceID, params) (*PageCursor[BetaServiceAccountWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts

Memerlukan token akses OAuth dengan scope org:admin, dari ant auth login --scope org:admin atau aturan workload identity federation; kunci Admin API tidak diterima. Lihat Mengelola WIF dengan Admin API.

Buat Anggota Workspace Akun Layanan
client.Beta.Organization.Workspaces.ServiceAccounts.Add(ctx, workspaceID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts

Memerlukan token akses OAuth dengan scope org:admin, dari ant auth login --scope org:admin atau aturan workload identity federation; kunci Admin API tidak diterima. Lihat Mengelola WIF dengan Admin API.

Dapatkan Anggota Workspace Akun Layanan
client.Beta.Organization.Workspaces.ServiceAccounts.Get(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Memerlukan token akses OAuth dengan scope org:admin, dari ant auth login --scope org:admin atau aturan workload identity federation; kunci Admin API tidak diterima. Lihat Mengelola WIF dengan Admin API.

Perbarui Anggota Workspace Akun Layanan
client.Beta.Organization.Workspaces.ServiceAccounts.Update(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Memerlukan token akses OAuth dengan scope org:admin, dari ant auth login --scope org:admin atau aturan workload identity federation; kunci Admin API tidak diterima. Lihat Mengelola WIF dengan Admin API.

Hapus Anggota Workspace Akun Layanan
client.Beta.Organization.Workspaces.ServiceAccounts.Remove(ctx, serviceAccountID, params) (*BetaOrganizationWorkspaceServiceAccountRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Memerlukan token akses OAuth dengan cakupan org:admin, dari ant auth login --scope org:admin atau aturan workload identity federation; kunci API Admin tidak diterima. Lihat Kelola WIF dengan Admin API.