Claude Platform Docs

Account di servizio

Crea account di servizio
client.organization.serviceAccounts.create(body, options?): ServiceAccount
POST/v1/organizations/service_accounts

Richiede un token di accesso OAuth con lo scope org:admin, ottenuto da ant auth login --scope org:admin o da una regola di workload identity federation; le chiavi Admin API non sono accettate. Consulta Gestire WIF con l'Admin API.

Elenca gli account di servizio
client.organization.serviceAccounts.list(query?, options?): PageCursor<ServiceAccount>
GET/v1/organizations/service_accounts

Richiede un token di accesso OAuth con lo scope org:admin, ottenuto da ant auth login --scope org:admin o da una regola di workload identity federation; le chiavi Admin API non sono accettate. Consulta Gestire WIF con l'Admin API.

Ottieni account di servizio
client.organization.serviceAccounts.retrieve(serviceAccountID, options?): ServiceAccount
GET/v1/organizations/service_accounts/{service_account_id}

Richiede un token di accesso OAuth con lo scope org:admin, ottenuto da ant auth login --scope org:admin o da una regola di workload identity federation; le chiavi Admin API non sono accettate. Consulta Gestire WIF con l'Admin API.

Aggiorna account di servizio
client.organization.serviceAccounts.update(serviceAccountID, body, options?): ServiceAccount
POST/v1/organizations/service_accounts/{service_account_id}

Richiede un token di accesso OAuth con lo scope org:admin, ottenuto da ant auth login --scope org:admin o da una regola di workload identity federation; le chiavi Admin API non sono accettate. Consulta Gestire WIF con l'Admin API.

Archivia account di servizio
client.organization.serviceAccounts.archive(serviceAccountID, options?): ServiceAccount
POST/v1/organizations/service_accounts/{service_account_id}/archive

Richiede un token di accesso OAuth con lo scope org:admin, ottenuto da ant auth login --scope org:admin o da una regola di workload identity federation; le chiavi Admin API non sono accettate. Consulta Gestire WIF con l'Admin API.

Models
interface ServiceAccount { type: "service_account"; id; archived_at; /* 8 more */ }

Named non-human identity within the caller's organization.

A service account is a pure identity: name + org. Authorization lives on whatever references it (federation rules).

interface ServiceAccountWorkspaceMember { type: "service_account_workspace_member"; created_by_actor_id; implicit; /* 3 more */ }
type: "service_account_workspace_member"
defaultservice_account_workspace_member
created_by_actor_id: string | null

Tagged ID (user_.../svac_...) of the actor who created this membership.

implicit: boolean | null

True when this is the implicit default-workspace membership every service account has when no explicit membership exists. Implicit memberships have role workspace_user and cannot be removed.

service_account_id: string

Tagged service account ID (svac_...).

workspace_id: string

Tagged workspace ID (wrkspc_...).

workspace_role: WorkspaceRole

Role of the service account in this workspace. Service accounts cannot hold the workspace_billing role.

One of the following:
"workspace_admin"
"workspace_billing"
"workspace_developer"
"workspace_restricted_developer"
"workspace_user"

Account di servizioWorkspace

Aggiungi workspace all'account di servizio
client.organization.serviceAccounts.workspaces.add(serviceAccountID, body, options?): ServiceAccountWorkspaceMember
POST/v1/organizations/service_accounts/{service_account_id}/workspaces

Richiede un token di accesso OAuth con lo scope org:admin, ottenuto da ant auth login --scope org:admin o da una regola di workload identity federation; le chiavi Admin API non sono accettate. Consulta Gestire WIF con l'Admin API.

Elenca i workspace dell'account di servizio
client.organization.serviceAccounts.workspaces.list(serviceAccountID, query?, options?): PageCursor<ServiceAccountWorkspaceMember>
GET/v1/organizations/service_accounts/{service_account_id}/workspaces

Richiede un token di accesso OAuth con lo scope org:admin, ottenuto da ant auth login --scope org:admin o da una regola di workload identity federation; le chiavi Admin API non sono accettate. Consulta Gestire WIF con l'Admin API.

Rimuovi workspace dall'account di servizio
client.organization.serviceAccounts.workspaces.remove(workspaceID, params, options?): WorkspaceRemoveResponse
DELETE/v1/organizations/service_accounts/{service_account_id}/workspaces/{workspace_id}

Richiede un token di accesso OAuth con lo scope org:admin, ottenuto da ant auth login --scope org:admin o da una regola di workload identity federation; le chiavi Admin API non sono accettate. Consulta Gestire WIF con l'Admin API.