> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AIセッションのリストを取得

> 認証済みユーザーが読み取り可能で、Box公開APIを使用して作成されたAIセッションのリストを、マーカーベースのページネーション形式で返します。エントリの並べ替えには`sort`と`direction`が使用されます。デフォルトでは、`updated_at`の降順で並べ替えられるため、直近でアクティブだったセッションが先頭に表示されます。

アクセストークンには、`ai.readwrite`と`root_readwrite`の両方のスコープが必要です。

後続のページが存在する場合でも、1ページに含まれるエントリ数が`limit`より少ない場合があります。`next_marker`がnullでない場合のみ、さらに結果が存在すると判断してください。

> [!NOTE]
>
> 「[Box SDKのバージョニング戦略](https://developer.box.com/ja/guides/tooling/sdks/sdk-versioning.md)について詳しく学ぶ。」


## OpenAPI

````yaml box-openapi-v2026.0-jp.json GET /ai_sessions
openapi: 3.0.2
info:
  title: Box Platform API
  description: >-
    [Box
    Platform](https://developer.box.com)では、[Box](https://box.com)内に保存されているコンテンツへのアクセス権限を付与する機能が提供されています。また、ファイルとフォルダの基本操作、会社内のユーザーの管理、リーガルホールドやリテンションポリシーなどの複雑なトピックのためのエンドポイントも提供されています。
  termsOfService: https://cloud.app.box.com/s/rmwxu64h1ipr41u49w3bbuvbsa29wku9
  contact:
    name: Box, Inc
    url: https://developer.box.com
    email: devrel@box.com
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: '2026.0'
  x-box-commit-hash: 61b23b2272
servers:
  - url: https://api.box.com/2.0
    description: Box Platform APIサーバー。
security:
  - OAuth2Security: []
tags:
  - name: AIセッション
    description: Box AIエージェントとのやり取りにおける会話の状態を保持するAIセッションのリスト取得と削除を行うためのエンドポイント。
    x-box-tag: ai_sessions
  - name: Automateワークフロー
    description: Automateワークフローのアクションをリストアップして手動で開始するためのエンドポイント。
    x-box-tag: automate_workflows
  - name: Box Noteに変換
    description: サポート対象のソースコンテンツ (マークダウンなど) からBox Notesを作成します。
    x-box-tag: notes
  - name: ドキュメント分割
    description: >-
      ページ割りされたソースドキュメントを、ユーザー定義のページ範囲またはAI生成のページ範囲に基づいて複数のファイルに分割するために使用される、一連のエンドポイント。
    x-box-tag: document_split
  - name: クエリ
    description: 項目に対するクエリ。
    x-box-tag: query
  - name: Shuttle
    description: >-
      外部ソースからBoxにコンテンツを移行するサービスであるBox
      Shuttleを管理するためのエンドポイント。これらのエンドポイントを使用して、Shuttleがコンテンツの移行元として使用するシステム、およびShuttleが実行する移行ジョブを管理します。
    x-box-tag: shuttle
externalDocs:
  description: Box Developerドキュメント。
  url: https://developer.box.com
paths:
  /ai_sessions:
    get:
      tags:
        - AIセッション
      summary: AIセッションのリストを取得
      description: >-
        認証済みユーザーが読み取り可能で、Box公開APIを使用して作成されたAIセッションのリストを、マーカーベースのページネーション形式で返します。エントリの並べ替えには`sort`と`direction`が使用されます。デフォルトでは、`updated_at`の降順で並べ替えられるため、直近でアクティブだったセッションが先頭に表示されます。


        アクセストークンには、`ai.readwrite`と`root_readwrite`の両方のスコープが必要です。


        後続のページが存在する場合でも、1ページに含まれるエントリ数が`limit`より少ない場合があります。`next_marker`がnullでない場合のみ、さらに結果が存在すると判断してください。
      operationId: get_ai_sessions_v2026.0
      parameters:
        - $ref: '#/components/parameters/BoxVersionHeader'
        - name: source
          in: query
          description: リストを、この作成元によるAIセッションのみに制限します。サポートされている値は`api`のみです。
          required: true
          schema:
            type: string
            enum:
              - api
          example: api
        - name: marker
          in: query
          description: >-
            前のページの`next_marker`で返された、結果が返される開始位置のマーカー。最初のページでは省略します。その他すべてのパラメータは、マーカーが返されたリクエストと一致している必要があります。
          required: false
          schema:
            type: string
          example: JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii
        - name: sort
          in: query
          description: >-
            結果の並べ替えに使用するフィールド。使用可能な値は`created_at`、`updated_at`、`name`です。デフォルトは`updated_at`で、セッションでやり取りが行われるたびに更新されます。
          required: false
          schema:
            type: string
            default: updated_at
            enum:
              - created_at
              - updated_at
              - name
          example: updated_at
        - name: direction
          in: query
          description: 結果を並べ替える方向。昇順 (`asc`) または降順 (`desc`) のいずれかになります。デフォルトは`desc`です。
          required: false
          schema:
            type: string
            default: desc
            enum:
              - asc
              - desc
          example: desc
        - name: limit
          in: query
          description: >-
            1ページあたりに返すAIセッションの最大数。最大値は`100`で、これを超える値は`100`として処理されます。サーバーから返されるエントリ数は、リクエストした数より少なくなる場合があります。
          required: false
          schema:
            type: integer
            format: int32
            default: 100
            minimum: 1
          example: 100
        - name: client_ids
          in: query
          description: >-
            OAuthクライアントIDのコンマ区切りリスト。リストは、これらのアプリケーションのいずれかで作成されたAIセッションのみに制限します。どのアプリケーションとも一致しないクライアントIDは無視されるため、いずれのクライアントIDも一致しない場合は、レスポンスは空のリストになります。空のエントリは無視されるため、値が空の場合は、パラメータが指定されていないものとして扱われます。
          required: false
          schema:
            type: array
            items:
              type: string
          example:
            - ly1nj6n11vionaie65emwzk575hnnmrk
          explode: false
      responses:
        '200':
          description: AIセッションのページ割りされたリストを返します。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiSessions'
        '400':
          description: >-
            `source`が指定されていない場合、または`source`、`marker`、`sort`、`direction`、`limit`にサポートされていない値が指定されている場合、`bad_request`コードが返されます。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        '401':
          description: '`Authorization`ヘッダーで指定されているアクセストークンが認識されないか、指定されていない場合に返されます。'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        '403':
          description: >-
            アクセストークンに`ai.readwrite`と`root_readwrite`の両方のスコープが設定されていない場合、`insufficient_scope`コードが返されます。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        '429':
          description: ユーザーが一定時間内に送信したリクエストが多すぎる場合、`too_many_requests`コードが返されます。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        default:
          description: 予期しないクライアントエラー。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
      x-codeSamples:
        - lang: dotnet
          label: AIセッションのリストを取得
          source: >-
            await client.AiSessions.GetAiSessionsV2026R0Async(queryParams: new
            GetAiSessionsV2026R0QueryParams(source:
            GetAiSessionsV2026R0QueryParamsSourceField.Api));
        - lang: swift
          label: AIセッションのリストを取得
          source: >-
            try await client.aiSessions.getAiSessionsV2026R0(queryParams:
            GetAiSessionsV2026R0QueryParams(source:
            GetAiSessionsV2026R0QueryParamsSourceField.api))
        - lang: java
          label: AIセッションのリストを取得
          source: >-
            client.getAiSessions().getAiSessionsV2026R0(new
            GetAiSessionsV2026R0QueryParams(GetAiSessionsV2026R0QueryParamsSourceField.API))
        - lang: node
          label: AIセッションのリストを取得
          source: |-
            await client.aiSessions.getAiSessionsV2026R0({
              source: 'api' as GetAiSessionsV2026R0QueryParamsSourceField,
            } satisfies GetAiSessionsV2026R0QueryParams);
        - lang: python
          label: AIセッションのリストを取得
          source: >-
            client.ai_sessions.get_ai_sessions_v2026_r0(GetAiSessionsV2026R0Source.API)
components:
  parameters:
    BoxVersionHeader:
      name: box-version
      in: header
      description: Version header.
      allowEmptyValue: false
      required: true
      schema:
        type: string
        enum:
          - '2026.0'
      example: '2026.0'
  schemas:
    AiSessions:
      description: AIセッションのページ割りされたリスト。
      type: object
      allOf:
        - required:
            - entries
            - limit
            - next_marker
          properties:
            entries:
              description: AIセッションのリスト。結果がない場合、このリストは空になります。
              type: array
              items:
                $ref: '#/components/schemas/AiSession'
        - type: object
          description: マーカーベースのページネーションについて説明しているAPIレスポンスの部分。
          properties:
            limit:
              description: >-
                これらのエントリで使用された制限値。許容される最大値を超えていない限り、クエリパラメータの`limit`と等しくなります。最大値はAPIによって異なります。
              type: integer
              format: int64
              example: 1000
            next_marker:
              description: 次の検索結果ページの開始場所のマーカー。
              type: string
              example: JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii
              nullable: true
      title: AIセッション
      x-box-resource-id: ai_sessions_v2026.0
      x-box-tag: ai_sessions
    ClientError:
      description: 一般的なエラー。
      type: object
      properties:
        type:
          description: 値は常に`error`になります。
          type: string
          example: error
          enum:
            - error
          nullable: false
        status:
          description: レスポンスのHTTPステータス。
          type: integer
          format: int32
          example: 400
          nullable: false
        code:
          description: Box固有のエラーコード。
          type: string
          example: item_name_invalid
          enum:
            - created
            - accepted
            - no_content
            - redirect
            - not_modified
            - bad_request
            - unauthorized
            - forbidden
            - not_found
            - method_not_allowed
            - conflict
            - precondition_failed
            - too_many_requests
            - internal_server_error
            - unavailable
            - item_name_invalid
            - insufficient_scope
        message:
          description: エラーについての短い説明メッセージ。
          type: string
          example: Method Not Allowed
          nullable: false
        context_info:
          description: >-
            このエラーに関する追加コンテキストを含む自由形式のオブジェクト。使用できるフィールドは、エンドポイントごとに定義されています。`message`は唯一の例です。
          type: object
          example:
            message: Something went wrong
          additionalProperties: {}
          nullable: true
        help_url:
          description: このエラーの原因に関する詳細情報にリンクされたURL。
          type: string
          example: >-
            https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/
          nullable: false
        request_id:
          description: Boxサポートに連絡するときに使用できる、このレスポンスの一意の識別子。
          type: string
          example: abcdef123456
          nullable: false
      title: クライアントエラー
      x-box-resource-id: client_error_v2026.0
    AiSession:
      description: >-
        AIセッションのStandard版の表示。AIセッションでは、Box
        AIエージェントとの一連のやり取りにおける会話の状態が保持されます。`id`は、その会話のA2Aコンテキスト識別子です。
      type: object
      properties:
        type:
          description: 値は常に`ai_session`になります。
          type: string
          example: ai_session
          enum:
            - ai_session
        id:
          description: AIセッションの一意の識別子。これは、会話のA2A `contextId`にもなります。この値は不明瞭な値として扱ってください。
          type: string
          example: '23489723'
        name:
          description: >-
            AIセッションの表示名。A2A
            APIを使用して作成されたセッションには自動的に名前が付けられます。名前が記録されていない場合のみ、値は`null`になります。
          type: string
          example: a2a-126bda90-ae78-4c81-b55f-c7ed9b678a8f
          nullable: true
        source:
          description: >-
            AIセッションの作成元。現在は常に`api`です。新しい値が追加される可能性があるため、クライアントは、認識できない値も許容する必要があります。
          type: string
          example: api
          enum:
            - api
        client_id:
          description: >-
            開発者コンソールに表示されている、AIセッションを作成したアプリケーションのOAuthクライアントID。アプリケーションが不明な場合、値は`null`になります。
          type: string
          example: ly1nj6n11vionaie65emwzk575hnnmrk
          nullable: true
        created_by:
          allOf:
            - $ref: '#/components/schemas/User--Base'
            - description: AIセッションを作成したユーザー。
        updated_by:
          allOf:
            - $ref: '#/components/schemas/User--Base'
            - description: 最後にAIセッションを更新する操作を行ったユーザー。
        created_at:
          description: AIセッションが作成された日時。
          type: string
          format: date-time
          example: '2026-09-01T10:30:00Z'
        updated_at:
          description: AIセッションが最後に更新された日時。セッションでやり取りが行われるたびに更新されるため、最近使用された順序としても使用されます。
          type: string
          format: date-time
          example: '2026-09-18T14:22:00Z'
      required:
        - type
        - id
        - name
        - source
        - client_id
        - created_by
        - updated_by
        - created_at
        - updated_at
      title: AIセッション
      x-box-resource-id: ai_session_v2026.0
      x-box-tag: ai_sessions
    User--Base:
      description: 他のリソース内にネストされたときに使用されるユーザーのMini版の表示。
      type: object
      properties:
        id:
          description: このユーザーの一意の識別子。
          type: string
          example: '11446498'
        type:
          description: 値は常に`user`になります。
          type: string
          example: user
          enum:
            - user
          nullable: false
      required:
        - type
        - id
      title: ユーザー (Base)
  securitySchemes:
    OAuth2Security:
      type: oauth2
      description: >-
        The access token received from the authorization server in the OAuth 2.0
        flow.
      flows:
        authorizationCode:
          authorizationUrl: https://account.box.com/api/oauth2/authorize
          tokenUrl: https://api.box.com/oauth2/token
          scopes:
            root_readonly: Boxに格納されているすべてのファイルとフォルダの読み取り
            root_readwrite: Boxに格納されているすべてのファイルとフォルダの読み取りと書き込み
            manage_app_users: App Userのプロビジョニングと管理
            manage_managed_users: 管理対象ユーザーのプロビジョニングと管理
            manage_groups: 企業のグループの管理
            manage_webhook: APIを使用したプログラムによるWebhookの作成
            manage_enterprise_properties: Enterpriseのプロパティを管理
            manage_data_retention: データリテンションポリシーの管理
            manage_legal_hold: リーガルホールドの管理

````