Claude Platform Docs

Service-Accounts

Service-Account-Mitglieder eines Workspace auflisten
client.Beta.Organization.Workspaces.ServiceAccounts.List(ctx, workspaceID, params) (*PageCursor[BetaServiceAccountWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts

Erfordert ein OAuth-Zugriffstoken mit dem Scope org:admin, über ant auth login --scope org:admin oder eine Workload-Identity-Federation-Regel; Admin-API-Keys werden nicht akzeptiert. Siehe WIF mit der Admin API verwalten.

Service-Account-Mitglied eines Workspace erstellen
client.Beta.Organization.Workspaces.ServiceAccounts.Add(ctx, workspaceID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts

Erfordert ein OAuth-Zugriffstoken mit dem Scope org:admin, über ant auth login --scope org:admin oder eine Workload-Identity-Federation-Regel; Admin-API-Keys werden nicht akzeptiert. Siehe WIF mit der Admin API verwalten.

Service-Account-Mitglied eines Workspace abrufen
client.Beta.Organization.Workspaces.ServiceAccounts.Get(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Erfordert ein OAuth-Zugriffstoken mit dem Scope org:admin, über ant auth login --scope org:admin oder eine Workload-Identity-Federation-Regel; Admin-API-Keys werden nicht akzeptiert. Siehe WIF mit der Admin API verwalten.

Service-Account-Mitglied eines Workspace aktualisieren
client.Beta.Organization.Workspaces.ServiceAccounts.Update(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Erfordert ein OAuth-Zugriffstoken mit dem Scope org:admin, über ant auth login --scope org:admin oder eine Workload-Identity-Federation-Regel; Admin-API-Keys werden nicht akzeptiert. Siehe WIF mit der Admin API verwalten.

Service-Account-Mitglied eines Workspace löschen
client.Beta.Organization.Workspaces.ServiceAccounts.Remove(ctx, serviceAccountID, params) (*BetaOrganizationWorkspaceServiceAccountRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Erfordert ein OAuth-Access-Token mit dem Scope org:admin, erhältlich über ant auth login --scope org:admin oder eine Workload-Identity-Federation-Regel; Admin-API-Keys werden nicht akzeptiert. Siehe WIF mit der Admin API verwalten.