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

# List

`POST /api/v1/scans`

## Request

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

Retrieves a list of scans with optional filtering and pagination

## Request body

- object
  - `organizationId` string, required: Organization ID to list scans for
  - `page` number: Page number for pagination
  - `pageSize` number: Number of items per page
  - `query` string: Optional search query to filter scans
  - `repositoryIds` string[]: Filter scans to specific repositories
  - `status` 'processing' | 'errored' | 'finished': Filter scans by status
  - `scanType` 'FullScan' | 'PrScan': Filter by scan type
  - `sortBy` 'createdAt' | 'updatedAt': Field to sort results by
  - `sortOrder` 'asc' | 'desc': Order to sort results in
  - `returnEphemeral` boolean: Whether to include ephemeral scans in results

## Response `200`

List of scans

- object
  - `scans` ScanItem[], required
    - `id` string, required: Unique identifier for this scan
    - `repositoryId` string, required: ID of the repository being scanned
    - `repositoryName` string, required: Name of the repository being scanned
    - `status` 'Scheduled' | 'Queued' | 'Running' | 'Errored' | 'Finished' | 'Cloning repository' | 'Scanning for vulnerabilities' | 'Generating patches' | 'Setting up repository' | 'Identifying application(s)' | 'Generating AST' | 'Identifying source(s)' | 'Detecting vulnerabilities' | 'Validating results', required: Current status of the scan
    - `type` 'PrScan' | 'FullScan', required: Type of scan being performed
    - `branch` string, required: Branch being scanned
    - `commitSha` string, required: Commit SHA being scanned
    - `prTargetBranch` string: Target branch for PR scans
    - `triggeredByPr` string: URL of the pull request that triggered this scan
    - `triggeredBySchedule` string: ID of the schedule that triggered this scan
    - `scanConfigId` string, required: ID of the scan configuration used for this scan
    - `issueCountByScore` IssueScoreCounts, required: Counts of issues by score
      - `critical` number
      - `high` number
      - `medium` number
      - `low` number
      - `info` number
      - `unknown` number
    - `issueCountByStatus` IssueStatusCounts, required: Counts of issues by status
      - `PENDING_REVIEW` number
      - `REVIEWING` number
      - `PATCHING` number
      - `NON_EXPLOITABLE` number
      - `FALSE_POSITIVE` number
      - `ACCEPTED_RISK` number
      - `RESOLVED` number
      - `BACKLOG` number
      - `INFORMATIONAL` number
    - `issueCountByType` IssueTypeCounts, required: Counts of issues by type
      - `sca` number
      - `iac` number
      - `pr` number
      - `customRule` number
      - `businessLogic` number
      - `traditional` number
      - `secrets` number
      - `other` number
      - `3rdParty` number
    - `error` string: Error message if the scan failed
    - `createdAt` string, date-time, required: When the scan was created
    - `updatedAt` string, date-time, required: When the scan was last updated
    - `scanFinishedAt` string, date-time, nullable
  - `totalCount` number: Total number of scans matching the query

---

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