---
metadata:
  - name: generator
    content: Diplodoc Platform v5.71.0
alternate:
  - https://vibe.sourcecraft.dev/portal/docs/en/sec-api-ref/SCA-Rescans/v1scanssca-post.md
  - https://vibe.sourcecraft.dev/portal/docs/en/sec-api-ref/SCA-Rescans/v1scanssca-post.md
  - https://vibe.sourcecraft.dev/portal/docs/ru/sec-api-ref/SCA-Rescans/v1scanssca-post.md
  - href: https://vibe.sourcecraft.dev/portal/docs/en/sec-api-ref/SCA-Rescans/v1scanssca-post.md
    type: text/markdown
    title: Markdown version
  - href: https://vibe.sourcecraft.dev/portal/docs/en/llms.txt?revision=r22261781
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://vibe.sourcecraft.dev/portal/docs/en/llms.txt?revision=r22261781

<div class="openapi">

# Start an SCA rescan from the latest saved SBOM

<!-- markdownlint-disable-file -->

Uses the newest default-branch scan with a saved SBOM, even if a newer scan has only other reports. Runs SCA in CI using that SBOM and its commit, and saves results in a new scan. AppSec must be enabled. Background scanning and SCA switches do not restrict this manual run. No request body is needed. Returns after CI accepts the run; results will arrive later.

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://appsec.sourcecraft.tech/v1/scans/sca
```

</div>

</div>

</div>

### Query parameters

#|
|| **Name** | **Description** ||
||

_gitRepo_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Repository identifier. Accepts either internal repository ID (e.g., 88769874964302633) or public UUID (e.g., 0199140f-4343-7c06-a7e3-b835c305b629). These values can be obtained from the getRepo API (fields: id and uuid).

_Pattern:_{.json-schema-reset .json-schema-assertion} `\S`

_Example:_{.json-schema-reset .json-schema-example} `0199140f-4343-7c06-a7e3-b835c305b629`
{.table-cell}
||
|#{.json-schema-properties}

## Responses

<div class="openapi__response__code__202">

## 202 Accepted

CI accepted the SCA rescan

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "scanUuid": "example",
  "fluxId": "example",
  "status": "INITIATED"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_fluxId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

ID of the CI run started for this scan

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_scanUuid_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

UUID of the new scan that will receive the SCA results

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

The scan is running; results will arrive later

_Const:_{.json-schema-reset .json-schema-value} `INITIATED`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

Missing or blank gitRepo, or saved SBOM is invalid or not supported as CycloneDX/SPDX JSON

</div>

<div class="openapi__response__code__401">

## 401 Unauthorized

Missing or invalid authorization header

</div>

<div class="openapi__response__code__403">

## 403 Forbidden

Permission denied or AppSec is disabled

</div>

<div class="openapi__response__code__404">

## 404 Not Found

Repository or saved default-branch SBOM not found

</div>

<div class="openapi__response__code__409">

## 409 Conflict

The source scan is still running

</div>

<div class="openapi__response__code__500">

## 500 Internal Server Error

Failed to prepare the SCA rescan

</div>

<div class="openapi__response__code__502">

## 502 Bad Gateway

CI could not start SBOM enrichment

</div>

<div class="openapi__response__code__503">

## 503 Service Unavailable

No SCA engines are configured

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.