---
title: "Get Scan"
method: POST
path: "/api/v2/scans/get"
tags: ["Scans"]
---

# Get Scan

`POST /api/v2/scans/get`

## Request

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

Retrieves a single scan by ID, supporting both CodeScan and standalone SCAScan types

## Request body

- GetScanInput: Input for getting a scan
  - `scanId` string, required: ID of the scan to retrieve
  - `organizationId` string: Organization ID (optional)

## Response `200`

Scan retrieved successfully

- GetScanResponse: Unified scan response supporting both CodeScan and SCAScan
  - `name` string
  - `githubRepositoryId` string
  - `gitlabRepositoryId` string
  - `bitbucketRepositoryId` string
  - `azureRepositoryId` string
  - `gerritRepositoryId` string
  - `genericGitRepositoryId` string
  - `cvsRepositoryId` string
  - `projectId` string
  - `applicationId` string
  - `scanId` string, required
  - `prTargetBranch` string, nullable
  - `scanTargetBranch` string
  - `codeScanType` 'FullScan' | 'PrScan' | 'SCAScan'
  - `prTriggeredURL` string, nullable
  - `isStaged` boolean
  - `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': Current status of the scan
  - `statusNum` number: Numeric status indicator (0-10, higher means more progress)
  - `issueCounts` object
    - `PENDING_REVIEW` number
    - `REVIEWING` number
    - `PATCHING` number
    - `NON_EXPLOITABLE` number
    - `FALSE_POSITIVE` number
    - `ACCEPTED_RISK` number
    - `RESOLVED` number
    - `BACKLOG` number
    - `newOpen` number: Open, non-duplicate vulnerabilities detected in this scan
    - `open` number: Current open + duplicate open issues
  - `finished` boolean, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `scanFinishedAt` string, date-time, nullable
  - `trigger` 'Scheduled' | 'Manual'
  - `repositoryId` string, required
  - `repositoryName` string
  - `errorMessage` string, nullable
  - `prBypassedAt` boolean
  - `sastScan` object, nullable
    - `id` string
  - `scaScan` object, nullable
    - `id` string
    - `inventoryRetiredAt` string, date-time, nullable: When this scan's dependency inventory was retired because a newer scan superseded it; null while present.
  - `scanType` 'code' | 'sca', required

## Other responses

- `401`: Error Response
- `404`: Error Response

---

[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)
