Claude Platform Docs

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

$ ant beta:organization:service-accounts:workspaces list
GET/v1/organizations/service_accounts/{service_account_id}/workspaces

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

サービスアカウントがメンバーとなっているワークスペースを一覧表示します。

各エントリには、そのワークスペースにおけるサービスアカウントのworkspace_roleが含まれます。 ページネーションにはlimitとnext_pageカーソルを使用してください。サービスアカウントに 明示的なデフォルトワークスペースのメンバーシップがない場合、暗黙的な(implicit: true) メンバーシップが最初のページの最初のエントリとして返されます。limit=1の場合、 ページネーションカーソルを導出できるよう、最初のページは最大2つのエントリ(暗黙的なエントリと 1つの明示的なメンバーシップ)を返すことがあります。メンバーシップは、サービスアカウントが アクティブな間のみ返されます。pageカーソルがない場合、アーカイブされたサービスアカウントは 空のリストを返します。アクティブなメンバーシップと一致しないpageカーソルは、 400 invalid-requestエラーを返します。メンバーシップが削除された場合、ワークスペースが 削除された場合、またはサービスアカウントがアーカイブされた場合、カーソルは一致しなくなります。 回復するには、最初のページからページネーションをやり直してください。

Parameters
--service-account-id: string⁠Path parameter

ID of the service account.

--limit: optional number⁠Query parameter

Number of results per page.

minimum1
maximum100
--page: optional string⁠Query parameter

Opaque cursor from a previous response's next_page.

--beta: optional array of AnthropicBeta⁠Header parameter

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

Returns
BetaServiceAccountWorkspaceMemberListResponse: object{ data, next_page }
data: array of BetaServiceAccountWorkspaceMember { type: "service_account_workspace_member", created_by_actor_id, implicit, 3 more }
type: "service_account_workspace_member"
created_by_actor_id: string

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

implicit: boolean

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: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more

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"
next_page: string

Opaque cursor for the next page, or null if no more results.

サービスアカウントのワークスペース一覧を取得
ant beta:organization:service-accounts:workspaces list \
  --api-key my-anthropic-api-key \
  --service-account-id service_account_id
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"
}