---
title: "Get Scan"
method: GET
path: "/api/v2/deployments/{deploymentId}/scans/{scanId}"
tags: ["ScansService"]
---

# Get Scan

`GET /api/v2/deployments/{deploymentId}/scans/{scanId}`

Get a scan by ID.

## Path parameters

- `deploymentId` string, int64, required — The unique numerical identifier of the deployment associated with the scan. Can be found via the [Deployments Service](#tag/DeploymentsService) or in your Settings in the web UI.
- `scanId` string, int64, required — The unique numerical identifier for the scan.

## Response `200`

OK

- ProtosScanV2GetScanResponse
  - `scan` ProtosScanV2Scan — A scan of a project.
    - `id` string, int64 — The unique numerical identifier for the scan
    - `deploymentId` string, int64 — The unique numerical identifier of the deployment associated with the scanned project
    - `projectId` string, int64 — The unique numerical identifier for the project that was scanned
    - `branchId` string, int64 — The unique numerical identifier of the branch the scan was run on Get more details about the branch from [Get Branch](#tag/ProjectsService/operation/ProjectsService_GetBranch).
    - `commit` string — The commit hash that the scan was run on
    - `startTime` string, date-time — Timestamp of when the scan started
    - `completeTime` string, date-time — Timestamp of when the scan completed
    - `exitCode` string — The exit code of the scan, can be negative
    - `isFullScan` boolean — Whether the scan is a full scan
    - `duration` string — The total time the scan took to run in seconds. Note that this does not include the time it took to upload the scan results.
    - `findingsCounts` ProtosScanV2ScanFindingsCounts — The number of findings in a scan by product
      - `total` integer — The total number of findings in the scan
      - `code` integer — The number of code findings in the scan
      - `supplyChain` integer — The number of supply chain findings in the scan
      - `secrets` integer — The number of secrets findings in the scan
    - `status` 'SCAN_STATUS_RUNNING' | 'SCAN_STATUS_COMPLETED' | 'SCAN_STATUS_PENDING' | 'SCAN_STATUS_CANCELLED' | 'SCAN_STATUS_ERROR' | 'SCAN_STATUS_NEVER_FINISHED', enum — Whether the scan is running, completed, or errored | value | description | |-------|---------------| | SCAN_STATUS_RUNNING | The scan is currently running | | SCAN_STATUS_COMPLETED | The scan has completed successfully (0 or 1 exit code) | | SCAN_STATUS_PENDING | The scan is queued and waiting to start | | SCAN_STATUS_CANCELLED | The scan was cancelled before completion | | SCAN_STATUS_ERROR | The scan has exited with a failure (exit code not 0 or 1) | | SCAN_STATUS_NEVER_FINISHED | The scan did not report an error or success after over an hour |
    - `enabledProducts` string[] — The products used when running the scan. | value | description | |-------|---------------| | PRODUCT_SAST | | | PRODUCT_SCA | | | PRODUCT_SECRETS | | | PRODUCT_AI_SAST | |

---

[API](https://skmtc.net/semgrep/apis/semgrep-web-app.md) · [All operations](https://skmtc.net/semgrep/apis/semgrep-web-app/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/semgrep/semgrep-web-app/versions/6483eeecd582/schema)
