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

<div class="openapi">

# Start generating a PDF or SARIF report

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

Starts asynchronous report generation for a repository scan (the latest scan when `scanUuid` is omitted). `format` selects PDF (default) or SARIF; for SARIF, `engineType` selects the combined report (UNSPECIFIED, default) or a single engine (SECRETS/SCA/SAST/DAST). Returns a long-running operation to poll via `GET /v1/reports/operations/{operationUuid}`. If a report already exists for the slice, a completed operation referencing it is returned without regeneration; if generation is already running, the in-flight operation is returned.

## 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/reports/generate
```

</div>

</div>

</div>

### Query parameters

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

_engineType_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string &#124; null

For SARIF: engine slice to generate — UNSPECIFIED (default) for the combined report, or SECRETS/SCA/SAST/DAST for a per-engine report. Ignored for PDF.

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

_format_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string &#124; null

Report format: PDF (default) or SARIF.

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

_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}
||
||

_scanUuid_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string &#124; null

UUID of the scan to generate the report for; if omitted, the latest scan is used.

_Example:_{.json-schema-reset .json-schema-example} `01890f3e-7b5c-7cc2-bc6f-3f5d8c9a1e4a`
{.table-cell}
||
|#{.json-schema-properties}

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "operationUuid": "example",
  "status": "IN_PROGRESS",
  "done": true,
  "reportUuid": "example",
  "scanUuid": "example",
  "format": "example",
  "engineType": "example"
}
```

{% endcut %}

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

_done_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

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

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

_reportUuid_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string &#124; null

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

_status_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [OperationStatus](#entity-OperationStatus)

_Enum:_{.json-schema-reset .json-schema-value} `IN_PROGRESS`, `COMPLETED`, `FAILED`
{.table-cell}
||
||

_engineType_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string &#124; null

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

_format_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string &#124; null

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

_scanUuid_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string &#124; null

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

</div>

<div class="openapi-entity">

### OperationStatus {#entity-OperationStatus}

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `IN_PROGRESS`, `COMPLETED`, `FAILED`

</div>

</div>

</div>

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