Claude Platform Docs

Workspace

Daftar Workspace
client.Organization.Workspaces.List(ctx, query) (*Page[Workspace], error)
GET/v1/organizations/workspaces
Buat Workspace
client.Organization.Workspaces.New(ctx, body) (*Workspace, error)
POST/v1/organizations/workspaces
Dapatkan Workspace
client.Organization.Workspaces.Get(ctx, workspaceID) (*Workspace, error)
GET/v1/organizations/workspaces/{workspace_id}
Perbarui Workspace
client.Organization.Workspaces.Update(ctx, workspaceID, body) (*Workspace, error)
POST/v1/organizations/workspaces/{workspace_id}
Arsipkan Workspace
client.Organization.Workspaces.Archive(ctx, workspaceID) (*Workspace, error)
POST/v1/organizations/workspaces/{workspace_id}/archive
Models
type AllowedInferenceGeo string
One of the following:
const AllowedInferenceGeoGlobal AllowedInferenceGeo = "global"
const AllowedInferenceGeoUs AllowedInferenceGeo = "us"
type DataResidency struct { AllowedInferenceGeos; DefaultInferenceGeo; WorkspaceGeo }
AllowedInferenceGeos DataResidencyAllowedInferenceGeosUnion

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

One of the following:
One of the following:
const AllowedInferenceGeoGlobal AllowedInferenceGeo = "global"
const AllowedInferenceGeoUs AllowedInferenceGeo = "us"
Unrestricted
DefaultInferenceGeo DataResidencyDefaultInferenceGeo

Default inference geo applied when requests omit the parameter.

One of the following:
const DataResidencyDefaultInferenceGeoGlobal DataResidencyDefaultInferenceGeo = "global"
const DataResidencyDefaultInferenceGeoUs DataResidencyDefaultInferenceGeo = "us"
WorkspaceGeo DataResidencyWorkspaceGeo

Geographic region for workspace data storage. Immutable after creation.

type DataResidencyCreateConfigParam struct { AllowedInferenceGeos; DefaultInferenceGeo; WorkspaceGeo }
AllowedInferenceGeos DataResidencyCreateConfigAllowedInferenceGeosUnionParam 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 AllowedInferenceGeoGlobal AllowedInferenceGeo = "global"
const AllowedInferenceGeoUs AllowedInferenceGeo = "us"
Unrestricted
DefaultInferenceGeo DataResidencyCreateConfigDefaultInferenceGeo 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 DataResidencyCreateConfigDefaultInferenceGeoGlobal DataResidencyCreateConfigDefaultInferenceGeo = "global"
const DataResidencyCreateConfigDefaultInferenceGeoUs DataResidencyCreateConfigDefaultInferenceGeo = "us"
WorkspaceGeo DataResidencyCreateConfigWorkspaceGeo Optional

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

type DataResidencyUpdateConfigParam struct { AllowedInferenceGeos; DefaultInferenceGeo }
AllowedInferenceGeos DataResidencyUpdateConfigAllowedInferenceGeosUnionParam 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 AllowedInferenceGeoGlobal AllowedInferenceGeo = "global"
const AllowedInferenceGeoUs AllowedInferenceGeo = "us"
Unrestricted
DefaultInferenceGeo DataResidencyUpdateConfigDefaultInferenceGeo 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 DataResidencyUpdateConfigDefaultInferenceGeoGlobal DataResidencyUpdateConfigDefaultInferenceGeo = "global"
const DataResidencyUpdateConfigDefaultInferenceGeoUs DataResidencyUpdateConfigDefaultInferenceGeo = "us"
type NoBillingWorkspaceRole string
One of the following:
const NoBillingWorkspaceRoleWorkspaceAdmin NoBillingWorkspaceRole = "workspace_admin"
const NoBillingWorkspaceRoleWorkspaceDeveloper NoBillingWorkspaceRole = "workspace_developer"
const NoBillingWorkspaceRoleWorkspaceRestrictedDeveloper NoBillingWorkspaceRole = "workspace_restricted_developer"
const NoBillingWorkspaceRoleWorkspaceUser NoBillingWorkspaceRole = "workspace_user"
type Workspace struct { Type: "workspace"; ID; ArchivedAt; /* 7 more */ }
type WorkspaceMember 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 WorkspaceRole

Role of the Workspace Member.

One of the following:
const WorkspaceRoleWorkspaceAdmin WorkspaceRole = "workspace_admin"
const WorkspaceRoleWorkspaceBilling WorkspaceRole = "workspace_billing"
const WorkspaceRoleWorkspaceDeveloper WorkspaceRole = "workspace_developer"
const WorkspaceRoleWorkspaceRestrictedDeveloper WorkspaceRole = "workspace_restricted_developer"
const WorkspaceRoleWorkspaceUser WorkspaceRole = "workspace_user"
type WorkspaceRole string
One of the following:
const WorkspaceRoleWorkspaceAdmin WorkspaceRole = "workspace_admin"
const WorkspaceRoleWorkspaceBilling WorkspaceRole = "workspace_billing"
const WorkspaceRoleWorkspaceDeveloper WorkspaceRole = "workspace_developer"
const WorkspaceRoleWorkspaceRestrictedDeveloper WorkspaceRole = "workspace_restricted_developer"
const WorkspaceRoleWorkspaceUser WorkspaceRole = "workspace_user"

WorkspaceBatas Laju

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

WorkspaceAnggota

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

WorkspaceAkun Layanan

Daftar Anggota Workspace Akun Layanan
client.Organization.Workspaces.ServiceAccounts.List(ctx, workspaceID, query) (*PageCursor[ServiceAccountWorkspaceMember], 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.Organization.Workspaces.ServiceAccounts.Add(ctx, workspaceID, body) (*ServiceAccountWorkspaceMember, 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.Organization.Workspaces.ServiceAccounts.Get(ctx, serviceAccountID, query) (*ServiceAccountWorkspaceMember, 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.Organization.Workspaces.ServiceAccounts.Update(ctx, serviceAccountID, params) (*ServiceAccountWorkspaceMember, 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.Organization.Workspaces.ServiceAccounts.Remove(ctx, serviceAccountID, body) (*OrganizationWorkspaceServiceAccountRemoveResponse, 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.