Claude Platform Docs

Список сервисных аккаунтов

ServiceAccountListPage organization().serviceAccounts().list(params = ServiceAccountListParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/service_accounts

Требуется токен доступа OAuth с областью org:admin, полученный с помощью ant auth login --scope org:admin или правила федерации удостоверений рабочих нагрузок; ключи Admin API не принимаются. См. Управление WIF с помощью Admin API.

Возвращает список сервисных аккаунтов в организации вызывающей стороны.

Результаты упорядочены по времени создания, сначала самые новые. Для постраничной навигации используйте limit и курсор next_page; установите include_archived=true, чтобы включить архивированные сервисные аккаунты.

Parameters
ServiceAccountListParams params
Optional<Boolean> includeArchived⁠Query parameter

Include archived resources. Defaults to false.

Optional<Long> limit⁠Query parameter

Number of results per page.

minimum1
maximum100
Optional<String> page⁠Query parameter

Opaque cursor from a previous response's next_page.

Returns
class ServiceAccount { type = "service_account"; id; archivedAt; /* 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).

Список сервисных аккаунтов
package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.organization.serviceaccounts.ServiceAccountListPage;
import com.anthropic.models.organization.serviceaccounts.ServiceAccountListParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();

        ServiceAccountListPage page = client.organization().serviceAccounts().list();
    }
}
Returns Examples
Response 200
{
  "data": [
    {
      "id": "svac_01SDCCSbTxrXDpWc1phhtcfK",
      "archived_at": "2019-12-27T18:11:19.117Z",
      "archived_by_actor_id": "archived_by_actor_id",
      "created_at": "2024-10-30T23:58:27.427722Z",
      "created_by_actor_id": "created_by_actor_id",
      "description": "description",
      "name": "ci-deploy-bot",
      "organization_role": "admin",
      "type": "service_account",
      "updated_at": "2024-10-30T23:58:27.427722Z",
      "updated_by_actor_id": "updated_by_actor_id"
    }
  ],
  "next_page": "next_page"
}