> ## 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.

# Devin Review のトリガー一覧を取得

> APIキーで参照できる組織の Devin Review 自動レビュールールと除外ルールを、バージョン ID とともに一覧で取得します。

呼び出し元が参照できる [Devin Review の自動レビュー](https://docs.devin.ai/ja/work-with-devin/devin-review.md#auto-review)のルールと除外ルールを、ページ単位で一覧取得します。各トリガーには `version_id` が含まれており、[トリガーを変更または削除する](https://docs.devin.ai/ja/api-reference/v3/review-triggers/update-review-triggers.md)際にこの値を渡します。

## 権限

組織内で `ManageReview` 権限を持つ[サービスユーザー](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)が必要です。個人用アクセストークンは、その所有ユーザーとして動作します。アカウント全体の `ManageReview` 権限があれば、呼び出し元はすべてのスコープを管理できます。organization-level の `ManageReview` 権限の対象は、その組織がアクセスできるリポジトリのみです。

## 動作

* 結果はページ分割されます。`first` でページサイズを指定し(デフォルトは 100、最大 200)、`after` には前のページの `end_cursor` を指定します。ルールが先に返され、その後に除外ルールが続きます。
* 各項目の `kind` は `rule`(レビューを自動的に開始する)または `exclusion`(マッチングするプルリクエストをレビュー対象外にする)のいずれかです。どちらか一方のみを一覧表示するには `kind` を指定します。
* `readonly` が付いたトリガーは、呼び出し元から閲覧できますが、変更はできません。
* `capabilities` は、アカウントスコープと、ページ内のトリガーが利用するすべてのスコープについて、呼び出し元がそのスコープにトリガーをアタッチできるかどうかを示します。
* 組織で Review トリガーが有効になっていない場合は `404` を返します。


## OpenAPI

````yaml ja/v3-openapi.yaml GET /v3beta1/organizations/{org_id}/review-settings/default-reviewer/triggers
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/default-reviewer/triggers:
    get:
      tags:
        - review-settings
      summary: デフォルトのレビュアートリガーの一覧を取得
      description: |-
        呼び出し元が参照できるデフォルトレビュアーのトリガーの1ページ分。ルール、
        除外ルールの順に並び、呼び出し元が変更できないものにはそれぞれ readonly が付きます。
        このページで利用する各スコープの編集可否も含まれます。
      operationId: >-
        handle_list_review_triggers_v3beta1_organizations__org_id__review_settings_default_reviewer_triggers_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: kind
          required: false
          schema:
            anyOf:
              - enum:
                  - rule
                  - exclusion
                type: string
              - type: 'null'
            description: ルールのみ、または除外ルールのみ。
            title: Kind
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewTriggersResponse'
          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:
    ReviewTriggersResponse:
      description: |-
        トリガーの1ページ分。ルール、除外ルールの順に並びます（各アイテムの ``kind`` が
        どちらかを示します）。
      properties:
        actor_kind:
          description: >-
            呼び出し元の認可範囲：'account'（アカウント全体）、'organization'（1つの組織のリポジトリ）、または
            'user'。
          enum:
            - account
            - organization
            - user
          title: Actor Kind
          type: string
        actor_org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Org Id
        broken_count:
          description: このサーバーで解析できない保存済みの項目。webapp には表示されます。
          title: Broken Count
          type: integer
        can_edit:
          title: Can Edit
          type: boolean
        capabilities:
          description: このページのトリガーが利用する各スコープと、アカウントスコープの編集可否。
          items:
            $ref: '#/components/schemas/ReviewScopeCapabilityResponse'
          title: Capabilities
          type: array
        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/ReviewTriggerResponse'
          title: Items
          type: array
        total:
          anyOf:
            - type: integer
            - type: 'null'
          description: 省略可能な合計件数（パフォーマンス上の理由で省略される場合があります）。
          title: Total
      required:
        - items
        - actor_kind
        - actor_org_id
        - can_edit
        - broken_count
        - capabilities
      title: ReviewTriggersResponse
      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
    ReviewTriggerResponse:
      properties:
        cadence:
          anyOf:
            - enum:
                - once
                - every_push
              type: string
            - type: 'null'
          description: ルール：レビューを1回のみ行うか、プッシュのたびに再レビューするかを指定します。除外ルールの場合は null。
          title: Cadence
        conditions:
          anyOf:
            - $ref: '#/components/schemas/ReviewTriggerConditions-Output'
            - type: 'null'
          description: >-
            レビュー設定エディターで保存される形式の、AND ('all') または OR ('any') で結合された条件。null
            はすべてのプルリクエストに一致します。
        created_at:
          title: Created At
          type: integer
        effort:
          anyOf:
            - enum:
                - default
                - normal
                - ultra
              type: string
            - type: 'null'
          description: ルールのみ。
          title: Effort
        entity_id:
          title: Entity Id
          type: string
        kind:
          enum:
            - rule
            - exclusion
          title: Kind
          type: string
        modified_by_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Modified By User Id
        readonly:
          title: Readonly
          type: boolean
        removable:
          title: Removable
          type: boolean
        scope:
          $ref: '#/components/schemas/ReviewScopeResponse'
        start:
          anyOf:
            - enum:
                - pr_open
                - pr_ready
                - check_passed
                - pre_pr
                - with_review
              type: string
            - type: 'null'
          description: >-
            ルール：最初のレビューを行うタイミングを、PR 作成時または PR
            がレビュー準備完了になった時点から指定します。レビュー設定で保存したルールでは、チェックの成功時 ('check_passed')、PR
            の作成前 ('pre_pr')、または別のレビューと同時にのみ ('with_review')
            開始することもできます。除外ルールの場合は null。
          title: Start
        version_id:
          description: 保存のたびに変わります。次のリクエストで expected_version_id として渡してください。
          title: Version Id
          type: string
      required:
        - entity_id
        - version_id
        - kind
        - scope
        - conditions
        - start
        - cadence
        - effort
        - readonly
        - removable
        - modified_by_user_id
        - created_at
      title: ReviewTriggerResponse
      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
    ReviewTriggerConditions-Output:
      additionalProperties: false
      properties:
        clauses:
          items:
            discriminator:
              mapping:
                author: '#/components/schemas/ReviewTriggerUserClause'
                author_type: '#/components/schemas/ReviewTriggerAuthorTypeClause'
                changed_file: '#/components/schemas/ReviewTriggerPatternClause'
                label: '#/components/schemas/ReviewTriggerLabelClause'
                line_diff: '#/components/schemas/ReviewTriggerLineDiffClause'
                originated_by: '#/components/schemas/ReviewTriggerOriginatedByClause'
                repo_visibility: '#/components/schemas/ReviewTriggerRepoVisibilityClause'
                repository: '#/components/schemas/ReviewTriggerRepositoryClause'
                reviewer: '#/components/schemas/ReviewTriggerUserClause'
                source_branch: '#/components/schemas/ReviewTriggerPatternClause'
                target_branch: '#/components/schemas/ReviewTriggerPatternClause'
                title: '#/components/schemas/ReviewTriggerPatternClause'
              propertyName: kind
            oneOf:
              - $ref: '#/components/schemas/ReviewTriggerUserClause'
              - $ref: '#/components/schemas/ReviewTriggerLabelClause'
              - $ref: '#/components/schemas/ReviewTriggerPatternClause'
              - $ref: '#/components/schemas/ReviewTriggerRepositoryClause'
              - $ref: '#/components/schemas/ReviewTriggerAuthorTypeClause'
              - $ref: '#/components/schemas/ReviewTriggerOriginatedByClause'
              - $ref: '#/components/schemas/ReviewTriggerRepoVisibilityClause'
              - $ref: '#/components/schemas/ReviewTriggerLineDiffClause'
          maxItems: 50
          minItems: 1
          title: Clauses
          type: array
        match:
          description: '`all`: すべての条件を満たす必要があります。`any`: 少なくとも1つの条件を満たす必要があります。'
          enum:
            - all
            - any
          title: Match
          type: string
      required:
        - match
        - clauses
      title: ReviewTriggerConditions
      type: object
    ReviewTriggerUserClause:
      additionalProperties: false
      properties:
        kind:
          description: プルリクエストの作成者、またはレビューを依頼されたレビュアー。
          enum:
            - author
            - reviewer
          title: Kind
          type: string
        negate:
          default: false
          description: 条件に一致しないプルリクエストを対象とします。
          title: Negate
          type: boolean
        users:
          description: 該当者がこれらのユーザーのいずれかである場合に一致します。
          items:
            $ref: '#/components/schemas/ReviewTriggerUser'
          minItems: 1
          title: Users
          type: array
      required:
        - kind
        - users
      title: ReviewTriggerUserClause
      type: object
    ReviewTriggerAuthorTypeClause:
      additionalProperties: false
      properties:
        kind:
          const: author_type
          title: Kind
          type: string
        negate:
          default: false
          description: この条件に一致しないプルリクエストを対象とします。
          title: Negate
          type: boolean
        value:
          items:
            enum:
              - user
              - bot
              - devin
            type: string
          minItems: 1
          title: Value
          type: array
      required:
        - kind
        - value
      title: ReviewTriggerAuthorTypeClause
      type: object
    ReviewTriggerPatternClause:
      additionalProperties: false
      properties:
        kind:
          enum:
            - title
            - source_branch
            - target_branch
            - changed_file
          title: Kind
          type: string
        match:
          default: glob
          enum:
            - glob
            - exact
          title: Match
          type: string
        negate:
          default: false
          description: この条件に一致しないプルリクエストを対象とします。
          title: Negate
          type: boolean
        value:
          items:
            type: string
          minItems: 1
          title: Value
          type: array
      required:
        - kind
        - value
      title: ReviewTriggerPatternClause
      type: object
    ReviewTriggerLabelClause:
      additionalProperties: false
      properties:
        kind:
          const: label
          title: Kind
          type: string
        negate:
          default: false
          description: この条件に一致しないプルリクエストを対象とします。
          title: Negate
          type: boolean
        value:
          items:
            type: string
          minItems: 1
          title: Value
          type: array
      required:
        - kind
        - value
      title: ReviewTriggerLabelClause
      type: object
    ReviewTriggerLineDiffClause:
      additionalProperties: false
      properties:
        kind:
          const: line_diff
          description: 追加行数と削除行数の合計。
          title: Kind
          type: string
        negate:
          default: false
          description: この条件に一致しないプルリクエストを対象とします。
          title: Negate
          type: boolean
        operator:
          enum:
            - lt
            - lte
            - gt
            - gte
          title: Operator
          type: string
        value:
          minimum: 0
          title: Value
          type: integer
      required:
        - kind
        - operator
        - value
      title: ReviewTriggerLineDiffClause
      type: object
    ReviewTriggerOriginatedByClause:
      additionalProperties: false
      properties:
        kind:
          const: originated_by
          description: Devin セッションがプルリクエストを作成したか、引き継いだか。
          title: Kind
          type: string
        negate:
          default: false
          description: この条件に一致しないプルリクエストを対象とします。
          title: Negate
          type: boolean
        value:
          items:
            const: devin
            type: string
          minItems: 1
          title: Value
          type: array
      required:
        - kind
        - value
      title: ReviewTriggerOriginatedByClause
      type: object
    ReviewTriggerRepoVisibilityClause:
      additionalProperties: false
      properties:
        kind:
          const: repo_visibility
          description: リポジトリが公開か非公開かを指定します。Git組織またはプレフィックスのスコープでのみ利用できます。
          title: Kind
          type: string
        negate:
          default: false
          description: この条件に一致しないプルリクエストを特定します。
          title: Negate
          type: boolean
        value:
          items:
            enum:
              - public
              - private
            type: string
          minItems: 1
          title: Value
          type: array
      required:
        - kind
        - value
      title: ReviewTriggerRepoVisibilityClause
      type: object
    ReviewTriggerRepositoryClause:
      additionalProperties: false
      properties:
        kind:
          const: repository
          title: Kind
          type: string
        match:
          default: glob
          enum:
            - glob
            - exact
          title: Match
          type: string
        negate:
          default: false
          description: この条件に一致しないプルリクエストを対象とします。
          title: Negate
          type: boolean
        value:
          description: '''owner/repo''形式の名前またはglobパターン。'
          items:
            type: string
          minItems: 1
          title: Value
          type: array
      required:
        - kind
        - value
      title: ReviewTriggerRepositoryClause
      type: object
    ReviewTriggerUser:
      additionalProperties: false
      properties:
        kind:
          description: '`devin`：ユーザーID で指定するアカウントメンバー。リンクされた Git ログインで照合されます。`scm`：Git ログイン。'
          enum:
            - devin
            - scm
          title: Kind
          type: string
        value:
          minLength: 1
          title: Value
          type: string
      required:
        - kind
        - value
      title: ReviewTriggerUser
      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.