---
title: "List scans"
method: POST
path: "/api/v1/scans/list"
tags: ["Scans"]
---

# List scans

`POST /api/v1/scans/list`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v1/scans/list`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

## Request body

- ListScansInput
  - `organizationId` string
  - `page` number
  - `pageSize` number
  - `searchQuery` string
  - `repositoryIds` string[]
  - `projectId` string
  - `scanId` string
  - `scanType` 'FullScan' | 'PrScan' | 'SCAScan'
  - `sortBy` 'createdAt' | 'updatedAt'
  - `sortOrder` 'asc' | 'desc'
  - `getCounts` boolean
  - `returnAll` boolean
  - `showEphemeral` boolean

## Response `200`

List of scans

- object
  - `codeScans` ScanItem[]
    - `name` string
    - `githubRepositoryId` string
    - `gitlabRepositoryId` string
    - `bitbucketRepositoryId` string
    - `azureRepositoryId` string
    - `gerritRepositoryId` string
    - `genericGitRepositoryId` string
    - `cvsRepositoryId` string
    - `status` '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': Current status of the scan
    - `projectId` string
    - `applicationId` string
    - `scanId` string
    - `prTargetBranch` string
    - `scanTargetBranch` string
    - `codeScanType` string
    - `prTriggeredURL` string
    - `isStaged` boolean
    - `codeScanFinished` boolean
    - `issueCounts` IssuesByType
      - `open` number
      - `patched` number
      - `falsePositive` number
      - `archived` number
    - `finished` boolean
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `scanFinishedAt` string, date-time, nullable
    - `repositoryId` string
    - `errorMessage` string
    - `trigger` string
    - `sastScan` object
      - `id` string
      - `error` string
  - `totalCount` number

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api-2.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api-2/revisions/ea6ae4b68cd3?raw)
