Claude Platform Docs

サービスアカウントのワークスペースメンバーの一覧を取得

$client->beta->organization->workspaces->serviceAccounts->list(string workspaceID, ?int limit, ?string page, ?list<AnthropicBeta> betas): PageCursor<ServiceAccountWorkspaceMember>
GET/v1/organizations/workspaces/{workspace_id}/service_accounts

org:admin スコープを持つ OAuth アクセストークンが必要です。これは ant auth login --scope org:admin またはワークロード ID フェデレーションルールから取得します。Admin APIキーは受け付けられません。Admin API で WIF を管理するを参照してください。

ワークスペースのメンバーであるサービスアカウントを一覧表示します。

各エントリにはサービスアカウントの workspace_role が含まれます。ページネーションには limitnext_page カーソルを使用してください。アーカイブ済みのワークスペースは 400 を返します。アーカイブ済みワークスペースのメンバーシップを監査するには GET /service_accounts/{id}/workspaces を使用してください。暗黙的なデフォルトワークスペースのメンバーシップはこの一覧に含まれません。アーカイブ済みサービスアカウントのメンバーシップは結果から省略されます。

Parameters
workspaceID: string

ID of the workspace.

limit?:optional int

Number of results per page.

default20
page?:optional string

Opaque cursor from a previous response's next_page.

betas?:optional list<AnthropicBeta>

Optional header to specify the beta version(s) you want to use.

Returns
class ServiceAccountWorkspaceMember { $type = 'service_account_workspace_member'; $createdByActorID; $implicit; /* 3 more */ }
"service_account_workspace_member" type
?string createdByActorID

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

?bool implicit

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.

string serviceAccountID

Tagged service account ID (svac_...).

string workspaceID

Tagged workspace ID (wrkspc_...).

WorkspaceRole workspaceRole

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

サービスアカウントのワークスペースメンバーの一覧を取得
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(apiKey: 'my-anthropic-api-key');

$page = $client->beta->organization->workspaces->serviceAccounts->list(
  'workspace_id',
  limit: 1,
  page: 'page',
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
);

var_dump($page);
Returns Examples
Response 200
{
  "data": [
    {
      "created_by_actor_id": "created_by_actor_id",
      "implicit": true,
      "service_account_id": "service_account_id",
      "type": "service_account_workspace_member",
      "workspace_id": "workspace_id",
      "workspace_role": "workspace_admin"
    }
  ],
  "next_page": "next_page"
}