Claude Platform Docs

서비스 계정의 워크스페이스 목록 조회

GET/v1/organizations/service_accounts/{service_account_id}/workspaces

org:admin 범위의 OAuth 액세스 토큰이 필요합니다. 이 토큰은 ant auth login --scope org:admin 또는 워크로드 ID 페더레이션 규칙을 통해 얻을 수 있으며, Admin API 키는 허용되지 않습니다. Admin API로 WIF 관리를 참조하세요.

서비스 계정이 멤버로 속한 워크스페이스 목록을 조회합니다.

각 항목에는 해당 워크스페이스에서의 서비스 계정 workspace_role이 포함됩니다. limitnext_page 커서를 사용하여 페이지를 나누세요. 서비스 계정에 명시적인 기본 워크스페이스 멤버십이 없는 경우, 암묵적(implicit: true) 멤버십이 첫 페이지의 첫 번째 항목으로 반환됩니다. limit=1인 경우 페이지네이션 커서를 도출할 수 있도록 첫 페이지에서 최대 2개 항목(암묵적 항목과 명시적 멤버십 하나)이 반환될 수 있습니다. 멤버십은 서비스 계정이 활성 상태인 동안에만 반환됩니다. page 커서가 없으면 보관된 서비스 계정은 빈 목록을 반환합니다. 활성 멤버십과 일치하지 않는 page 커서는 400 invalid-request 오류를 반환합니다. 멤버십이 제거되거나, 워크스페이스가 삭제되거나, 서비스 계정이 보관되면 커서가 더 이상 일치하지 않습니다. 복구하려면 첫 페이지부터 페이지네이션을 다시 시작하세요.

Path parameters
service_account_id: string

ID of the service account.

Query parameters
limit: optional number

Number of results per page.

default20
maximum100
minimum1
page: optional string

Opaque cursor from a previous response's next_page.

Headers
"anthropic-beta": optional array of string

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

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

Returns
data: array of object{ created_by_actor_id, implicit, service_account_id, 3 more }
created_by_actor_id: string or null

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

implicit: boolean or 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_...).

type: "service_account_workspace_member"
defaultservice_account_workspace_member
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 or null

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

서비스 계정의 워크스페이스 목록 조회
cURL
curl https://api.anthropic.com/v1/organizations/service_accounts/$SERVICE_ACCOUNT_ID/workspaces \
    -H 'anthropic-version: 2023-06-01' \
    -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN"
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"
}