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

# List scans



## OpenAPI

````yaml https://zeropath.com/openapi/v1.yaml post /api/v1/scans/list
openapi: 3.1.0
info:
  title: ZeroPath API
  version: 1.0.0
  description: Public API for ZeroPath
servers:
  - url: https://zeropath.com
    description: Production server
    x-fern-server-name: Production
  - url: https://dev.branch.zeropath.com
    description: Development server
    x-fern-server-name: Development
security:
  - apiTokenId: []
    apiTokenSecret: []
tags:
  - name: Organizations
    description: Operations related to organizations
  - name: Stats
    description: Operations related to stats
  - name: Repositories
    description: Operations related to repositories
  - name: Installations
    description: Operations related to installations
  - name: Issues
    description: Operations related to issues
  - name: SCA
    description: Software Composition Analysis
  - name: Scans
    description: Operations related to scans
  - name: Rules
    description: Operations related to custom security rules
  - name: Referrals
    description: Operations related to referrals
paths:
  /api/v1/scans/list:
    post:
      tags:
        - Scans
      summary: List scans
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListScansInput'
      responses:
        '200':
          description: List of scans
          content:
            application/json:
              schema:
                type: object
                properties:
                  codeScans:
                    type: array
                    items:
                      $ref: '#/components/schemas/ScanItem'
                  totalCount:
                    type: number
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ListScansInput:
      type: object
      properties:
        organizationId:
          type: string
        page:
          type: number
          default: 1
        pageSize:
          type: number
          default: 10
        searchQuery:
          type: string
        repositoryIds:
          type: array
          items:
            type: string
        projectId:
          type: string
        scanId:
          type: string
        scanType:
          type: string
          enum:
            - FullScan
            - PrScan
            - SCAScan
        sortBy:
          type: string
          enum:
            - createdAt
            - updatedAt
        sortOrder:
          type: string
          enum:
            - asc
            - desc
        getCounts:
          type: boolean
          default: false
        returnAll:
          type: boolean
          default: false
        showEphemeral:
          type: boolean
          default: false
    ScanItem:
      type: object
      properties:
        name:
          type: string
        githubRepositoryId:
          type: string
        gitlabRepositoryId:
          type: string
        bitbucketRepositoryId:
          type: string
        status:
          type: string
          enum:
            - Scheduled
            - Queued
            - Running
            - Errored
            - Finished
            - Indexing
            - Cloning repository
            - Scanning for vulnerabilities
            - Generating patches
            - Setting up repository
            - Identifying application(s)
            - Generating AST
            - Identifying source(s)
            - Detecting vulnerabilities
            - Validating results
          description: Current status of the scan
        projectId:
          type: string
        applicationId:
          type: string
        scanId:
          type: string
        prTargetBranch:
          type: string
        scanTargetBranch:
          type: string
        codeScanType:
          type: string
        prTriggeredURL:
          type: string
        isStaged:
          type: boolean
        codeScanFinished:
          type: boolean
        issueCounts:
          $ref: '#/components/schemas/IssuesByType'
        finished:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        scanFinishedAt:
          type:
            - string
            - 'null'
          format: date-time
        repositoryId:
          type: string
        errorMessage:
          type: string
        trigger:
          type: string
        sastScan:
          type: object
          properties:
            id:
              type: string
            error:
              type: string
    IssuesByType:
      type: object
      properties:
        open:
          type: number
        patched:
          type: number
        falsePositive:
          type: number
        archived:
          type: number
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
  securitySchemes:
    apiTokenId:
      type: apiKey
      in: header
      name: X-ZeroPath-API-Token-Id
      x-fern-header:
        name: apiTokenId
        env: ZEROPATH_API_TOKEN_ID
    apiTokenSecret:
      type: apiKey
      in: header
      name: X-ZeroPath-API-Token-Secret
      x-fern-header:
        name: apiTokenSecret
        env: ZEROPATH_API_TOKEN_SECRET

````