> ## 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 API）

> v3 組織 API を使用して、スキャン、リポジトリ、重要度、またはステータスでフィルタリングした組織の Devin コードスキャン検出結果を一覧表示します

<div id="permissions">
  ## 権限
</div>

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

<div id="related">
  ## 関連情報
</div>

* [Start Code Scan](/ja/api-reference/v3/code-scans/organizations-code-scans-start) で開始したスキャンが `completed` になったら、`scan_id` でフィルタリングします (ポーリングについては [List Code Scans](/ja/api-reference/v3/code-scans/organizations-code-scans-list) を参照) 。
* [Remediate Code Scan Finding](/ja/api-reference/v3/code-scans/organizations-code-scans-remediate) で検出結果を修復します。
* 指定期間内のスキャン、検出結果、修復用PRの集計数については、[Get Code Scan Metrics](/ja/api-reference/v3/code-scans/organizations-code-scans-metrics) を利用します。
* エンドツーエンドのワークフローについては、[Triggering Code Scans via the Devin API](/ja/api-reference/v3/code-scans/triggering-code-scans) を参照してください。


## OpenAPI

````yaml ja/v3-openapi.yaml GET /v3/organizations/{org_id}/code-scans/findings
openapi: 3.1.0
info:
  description: Service User 認証および RBAC に対応した Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/organizations/{org_id}/code-scans/findings:
    get:
      tags:
        - code-scans
      summary: コードスキャンの検出結果を一覧表示
      description: |-
        組織のコードスキャン検出結果を一覧表示します。

        検出結果は新しいものから順に返されます。必要に応じて ``scan_id``、
        ``repo_name``、``severity``、``status`` で絞り込めます
        （``severity`` と ``status`` には複数の値を指定できます）。結果は不透明なカーソル
        （``after`` / ``first``）によってページ分割されます。
      operationId: >-
        handle_list_code_scan_findings_v3_organizations__org_id__code_scans_findings_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: scan_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: このスキャンで生成された検出結果に絞り込みます。
            title: Scan Id
        - description: このリポジトリで報告された検出結果に絞り込みます。
          in: query
          name: repo_name
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: このリポジトリで報告された検出結果に絞り込みます。
            title: Repo Name
        - description: これらの重大度（critical、high、medium、low）のいずれかに一致する検出結果に絞り込みます。
          in: query
          name: severity
          required: false
          schema:
            anyOf:
              - items:
                  enum:
                    - critical
                    - high
                    - medium
                    - low
                  type: string
                type: array
              - type: 'null'
            description: これらの重大度（critical、high、medium、low）のいずれかに一致する検出結果に絞り込みます。
            title: Severity
        - description: これらのステータス（open、dismissed、resolved）のいずれかに一致する検出結果に絞り込みます。
          in: query
          name: status
          required: false
          schema:
            anyOf:
              - items:
                  enum:
                    - open
                    - dismissed
                    - resolved
                  type: string
                type: array
              - type: 'null'
            description: これらのステータス（open、dismissed、resolved）のいずれかに一致する検出結果に絞り込みます。
            title: Status
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponse_CodeScanFindingResponse_
          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: 競合
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 処理できないコンテンツ
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: リクエストが多すぎます
components:
  schemas:
    PaginatedResponse_CodeScanFindingResponse_:
      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/CodeScanFindingResponse'
          title: Items
          type: array
        total:
          anyOf:
            - type: integer
            - type: 'null'
          description: 任意の合計件数（パフォーマンスのため省略される場合があります）。
          title: Total
      required:
        - items
      title: PaginatedResponse[CodeScanFindingResponse]
      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
        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
    CodeScanFindingResponse:
      description: 単一のコードスキャン検出結果。
      properties:
        category:
          anyOf:
            - type: string
            - type: 'null'
          description: 該当する場合、検出結果が分類されたカテゴリ（ルール名）。
          title: Category
        code_owners:
          description: 影響を受けたコードに関連付けられたコードオーナー。
          items:
            type: string
          title: Code Owners
          type: array
        created_at:
          description: 検出結果が作成された日時（Unix秒）。
          title: Created At
          type: integer
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: 該当する場合、脆弱性の詳細な説明。
          title: Description
        finding_id:
          description: 検出結果の一意の識別子。
          title: Finding Id
          type: string
        note:
          anyOf:
            - type: string
            - type: 'null'
          description: 該当する場合、検出結果に添付された追加の注記。
          title: Note
        orchestrator_session_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 該当する場合、この検出結果を生成したスキャンを実行した Orchestrator セッション（そのスキャンの Devin セッション）。
          title: Orchestrator Session Id
        pr_url:
          anyOf:
            - type: string
            - type: 'null'
          description: 該当する場合、この検出結果に対して作成された修復用PRのURL。
          title: Pr Url
        recommendation:
          anyOf:
            - type: string
            - type: 'null'
          description: 該当する場合、検出結果に対する推奨される修復方法。
          title: Recommendation
        reference_snippets:
          description: 裏付けとなる証拠として検出結果から参照されるコードスニペット。
          items:
            $ref: '#/components/schemas/CodeScanReferenceSnippetResponse'
          title: Reference Snippets
          type: array
        related_finding_ids:
          description: 成立した攻撃チェーン内にある他のリンクの検出結果 ID。チェーンの終点となる検出結果にのみ設定されます。
          items:
            type: string
          title: Related Finding Ids
          type: array
        repo_name:
          description: 検出結果が報告されたリポジトリ。
          title: Repo Name
          type: string
        scan_id:
          description: この検出結果を生成したスキャンの識別子。
          title: Scan Id
          type: string
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 該当する場合、検出結果を修復したセッション（およびPRを作成したセッション）。
          title: Session Id
        severity:
          description: '検出結果の重大度: critical、high、medium、low のいずれか。'
          enum:
            - critical
            - high
            - medium
            - low
          title: Severity
          type: string
        status:
          description: '検出結果のステータス: open、dismissed、resolved のいずれか。'
          enum:
            - open
            - dismissed
            - resolved
          title: Status
          type: string
        title:
          anyOf:
            - type: string
            - type: 'null'
          description: 該当する場合、検出結果のタイトル。
          title: Title
      required:
        - finding_id
        - title
        - description
        - recommendation
        - note
        - code_owners
        - reference_snippets
        - severity
        - category
        - repo_name
        - pr_url
        - scan_id
        - session_id
        - orchestrator_session_id
        - status
        - created_at
      title: CodeScanFindingResponse
      type: object
    CodeScanReferenceSnippetResponse:
      description: 検出結果の裏付けとして参照されるコードスニペット。
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          description: 取得されている場合は、参照先のソースコード。
          title: Code
        commentary:
          description: このスニペットが検出結果に関連している理由の説明。
          title: Commentary
          type: string
        end_line:
          description: 参照範囲の最終行。
          title: End Line
          type: integer
        file_path:
          description: 参照先ファイルのパス。
          title: File Path
          type: string
        start_line:
          description: 参照範囲の先頭行。
          title: Start Line
          type: integer
      required:
        - file_path
        - start_line
        - end_line
        - commentary
      title: CodeScanReferenceSnippetResponse
      type: object
  securitySchemes:
    bearerAuth:
      description: 'サービスユーザーの認証情報（接頭辞: cog_）'
      scheme: bearer
      type: http

````