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

# キューを取得

> Enterpriseのキューのステータスを取得します。

キューに入っているセッションの総数（ステータス: new、resuming、claimed）と、ステータス指標（normal/elevated/high）を返します。

このエンドポイントは、Enterprise管理者がキューの健全性を監視し、容量の問題に対するアラートを設定するのに役立ちます。

## 権限

Enterprise レベルで `ViewAccountMetrics` 権限を持つ[サービスユーザー](https://docs.devin.ai/ja/api-reference/v3/service-users/members-service-users.md)または[パーソナルアクセストークン](https://docs.devin.ai/ja/api-reference/personal-access-tokens.md)が必要です。

## キューサイズ

`queue_size` は、Enterprise 内のすべてのアクティブな組織を対象に、キュー待ち状態 (`new`、`resuming`、または `claimed`) で、かつ**過去 30 日以内に作成された**セッションの数を示します。

> [!NOTE]
>
> 30 日より前に作成されたキュー待ちのセッションは `queue_size` に含まれないため、`status` にも影響しません。30 日を超えてキューに滞留しているセッションを検出する場合は、このエンドポイントだけに頼らないでください。

## ステータスのしきい値

`status` フィールドは、`queue_size` に基づいて現在のキュー負荷を示します:

| Status | Condition | Description |
| - | - | - |
| `normal` | queue\_size ≤ 10 | キューは通常どおり動作しています |
| `elevated` | 11 ≤ queue\_size ≤ 50 | キュー負荷が高まっています |
| `high` | queue\_size > 50 | キュー負荷が非常に高い状態です |


## OpenAPI

````yaml ja/v3-openapi.json GET /v3/enterprise/queue
openapi: 3.1.0
info:
  title: Devin API v3
  description: サービスユーザー認証とRBACに対応したDevin v3 API
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/queue:
    get:
      tags:
        - queue
      summary: キューを取得
      description: >-
        Enterpriseのキューのステータスを取得します。


        キューに入っているセッションの総数（ステータス:
        new、resuming、claimed）と、ステータス指標（normal/elevated/high）を返します。


        このエンドポイントは、Enterprise管理者がキューの健全性を監視し、容量の問題に対するアラートを設定するのに役立ちます。
      operationId: get_queue_v3_enterprise_queue_get
      responses:
        '200':
          description: 成功レスポンス
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueResponse'
        '401':
          description: 認証されていません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '403':
          description: アクセスが禁止されています
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          description: 見つかりません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '409':
          description: 競合
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '410':
          description: リソースは削除されています
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '422':
          description: 処理できない内容です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '429':
          description: リクエストが多すぎます
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
components:
  schemas:
    QueueResponse:
      properties:
        queue_size:
          type: integer
          title: Queue Size
        status:
          type: string
          enum:
            - normal
            - elevated
            - high
          title: Status
      type: object
      required:
        - queue_size
        - status
      title: QueueResponse
      description: キューエンドポイントのレスポンスモデル。
    ProblemDetail:
      properties:
        type:
          type: string
          title: Type
          description: 問題タイプを識別する URI 参照。
          default: about:blank
        title:
          type: string
          title: Title
          description: 問題タイプの、人が読める短い要約。
        status:
          type: integer
          title: Status
          description: HTTP ステータスコード。
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: この発生事象に固有の、人が読める説明。
        instance:
          anyOf:
            - type: string
            - type: 'null'
          title: Instance
          description: この発生事象の URI 参照（リクエストパス）。
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Errors
          description: フィールド単位のバリデーションエラー（422レスポンスの場合のみ）。
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: ブロックされた操作の拒否理由を示す機械可読コード（例："user_frozen", "migrated_session"）。
      type: object
      required:
        - title
        - status
      title: ProblemDetail
      description: >-
        v3 API 向けの RFC 9457 application/problem+json エラーボディ。


        detail は後方互換性のため、レガシーな {"detail": ...}
        ボディから引き続き保持されています。その他のメンバーは追加式です。errors にはフィールド単位の検証エラーが格納されます（422
        の場合のみ）。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'サービスユーザーの credential（プレフィックス: cog_）'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.