---
title: "Push the latest scan to SD Elements"
method: POST
path: "/api/v2/securityCompass/pushLatestScan"
tags: ["Security Compass"]
---

# Push the latest scan to SD Elements

`POST /api/v2/securityCompass/pushLatestScan`

## Request

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

Enqueue a findings push of the mapped repository's most recent finished full scan to its SD Elements project, re-running it if that scan was pushed before — use it after changing the task status mapping, or when the mapping was created after the scan. Returns status 'enqueued' with the scan id (the push runs in the background; poll securityCompass.getIntegration for lastPushAt / lastPushStatus) or 'no_scan' when the repository has no finished full scan. Fails with 409 while a push of that scan is already running and with 412 when the integration is disabled.

## Request body

- SecurityCompassPushLatestScanRequest
  - `organizationId` string, required: Organization that owns the integration.
  - `mappingId` string, required: cuid of the project mapping whose repository to push.

## Response `200`

Enqueue result

- union: Discriminated on `status`: 'enqueued' with the scan that will be pushed, or 'no_scan' when the repository has no finished full scan to push.
  - object
    - `status` 'enqueued', required
    - `codeScanId` string, required: The full scan whose open issues will be pushed.
  - object
    - `status` 'no_scan', required

## Other responses

- `400`: Error Response
- `401`: Error Response
- `404`: Error Response
- `409`: 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)
