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

# Devin Review トリガースコープの一覧

> APIキーで Devin Review の自動レビュートリガーをアタッチできるアカウント、ネームスペース、リポジトリの各スコープを一覧表示します。

呼び出し元が [Devin Review の自動レビュー](https://docs.devinenterprise.com/ja/work-with-devin/devin-review.md#auto-review)トリガーをアタッチできるアカウント、ネームスペース、リポジトリの各スコープを一覧表示します。[トリガーを作成する](https://docs.devinenterprise.com/ja/api-reference/v3/review-triggers/update-review-triggers.md)際は、リポジトリスコープの `target` を `repository` の値として指定してください。

## 権限

組織内で `ManageReview` 権限を持つ[サービスユーザー](https://docs.devinenterprise.com/ja/api-reference/v3/service-users/members-service-users.md)または[個人用アクセストークン](https://docs.devinenterprise.com/ja/api-reference/personal-access-tokens.md)が必要です。個人用アクセストークンは、そのトークンを所有するユーザーとして動作します。アカウント全体の `ManageReview` があれば、呼び出し元はすべてのスコープを管理できます。organization-level の `ManageReview` の場合は、その組織がアクセスできるリポジトリのみが対象です。

## 動作

* ネームスペーススコープ (`git_organization`) を指定すると、その配下のすべてのリポジトリが対象になります。
* `search` は、ターゲットに対する部分文字列一致 (大文字と小文字を区別しない) でスコープをフィルターします。
* 呼び出し元がそのスコープにトリガーをアタッチできる場合、`status` は `available` になります。それ以外の値の場合はアタッチできない理由を示し、`next_action` にその対処法が示されます。
* 組織で Review トリガーが有効になっていない場合は `404` を返します。


## OpenAPI

````yaml ja/v3-openapi.yaml GET /v3beta1/organizations/{org_id}/review-settings/trigger-scopes
openapi: 3.1.0
info:
  description: Service User 認証および RBAC に対応した Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3beta1/organizations/{org_id}/review-settings/trigger-scopes:
    get:
      tags:
        - review-settings
      summary: 呼び出し元がレビュートリガーをアタッチできるスコープの一覧を取得
      description: |-
        呼び出し元がトリガーを設定できるアカウント、名前空間、リポジトリの
        スコープ。名前空間スコープでは、その配下のすべてのリポジトリが対象になります。
        リポジトリのプレフィックススコープは API 経由では利用できません。
      operationId: >-
        handle_list_review_trigger_scopes_v3beta1_organizations__org_id__review_settings_trigger_scopes_get
      parameters:
        - description: 組織ID（プレフィックス：org-）
          in: path
          name: org_id
          required: true
          schema:
            example: org-abc123def456
            title: Org Id
            type: string
        - in: query
          name: after
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: After
        - in: query
          name: first
          required: false
          schema:
            default: 100
            maximum: 200
            minimum: 1
            title: First
            type: integer
        - description: 部分文字列によるフィルター。
          in: query
          name: search
          required: false
          schema:
            anyOf:
              - maxLength: 512
                type: string
              - type: 'null'
            description: 部分文字列によるフィルター。
            title: Search
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponse_ReviewScopeCapabilityResponse_
          description: 成功レスポンス
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 認証されていません
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: アクセスが禁止されています
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 見つかりません
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 競合
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 削除済み
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 処理できないコンテンツ
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: リクエスト過多
components:
  schemas:
    PaginatedResponse_ReviewScopeCapabilityResponse_:
      properties:
        end_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: 次のページを取得するためのカーソル。最後のページの場合はNone。
          title: End Cursor
        has_next_page:
          default: false
          description: このページの後にさらにアイテムがあるかどうか。
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/ReviewScopeCapabilityResponse'
          title: Items
          type: array
        total:
          anyOf:
            - type: integer
            - type: 'null'
          description: 合計件数（省略可能。パフォーマンス上の理由で省略する場合があります）。
          title: Total
      required:
        - items
      title: PaginatedResponse[ReviewScopeCapabilityResponse]
      type: object
    ProblemDetail:
      description: >-
        v3 API 用の RFC 9457 application/problem+json エラーボディ。


        detail は後方互換性のため、レガシーな {"detail": ...}
        ボディから引き継がれます。その他のメンバーは追加式です。errors にはフィールドレベルのバリデーションエラーが含まれます（422
        の場合のみ）。
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: この事象に固有の、人が読める説明。
          title: Detail
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          description: ブロックされた操作の拒否理由を示す機械可読コード（例："user_frozen"、"migrated_session"）。
          title: Error Code
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: フィールド単位のバリデーションエラー（422 レスポンスのみ）。
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: この発生箇所の URI 参照（リクエストパス）。
          title: Instance
        status:
          description: HTTP ステータスコード。
          title: Status
          type: integer
        title:
          description: 問題タイプを人が読める短い要約。
          title: Title
          type: string
        type:
          default: about:blank
          description: 問題タイプを識別する URI 参照。
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
    ReviewScopeCapabilityResponse:
      properties:
        next_action:
          enum:
            - none
            - relink
            - use_github_app
            - grant_app_access
            - request_scope_access
          title: Next Action
          type: string
        scope:
          $ref: '#/components/schemas/ReviewScopeResponse'
        status:
          description: 呼び出し元がスコープにトリガーをアタッチできる場合は'available'。できない場合はその理由。
          enum:
            - available
            - readonly
            - inaccessible
            - github_pat_unsupported
            - relink_required
            - unsupported
            - broader_grant_required
          title: Status
          type: string
      required:
        - scope
        - status
        - next_action
      title: ReviewScopeCapabilityResponse
      type: object
    ReviewScopeResponse:
      properties:
        kind:
          enum:
            - account
            - user
            - git_organization
            - git_repository
          title: Kind
          type: string
        target:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            git_repository:
            リポジトリ名。github.comでは'owner/repo'、その他のホストでは'host/path'（'gitlab.example.com/group/sub/repo'）の形式で、セグメントごとにパーセントエンコードします。git_organization:
            同じ形式の名前空間で、末尾は'/'です。アカウントおよびユーザーのスコープではNull。
          title: Target
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
      required:
        - kind
        - target
      title: ReviewScopeResponse
      type: object
  securitySchemes:
    bearerAuth:
      description: 'サービスユーザーの認証情報（接頭辞: cog_）'
      scheme: bearer
      type: http

````

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