---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.0
alternate:
  - https://sourcecraft.dev/portal/docs/en/sec-api-ref/Admin-Common-Rest-Api/v1adminrepository-statuses-post.md
  - https://sourcecraft.dev/portal/docs/ru/sec-api-ref/Admin-Common-Rest-Api/v1adminrepository-statuses-post.md
  - href: https://sourcecraft.dev/portal/docs/ru/sec-api-ref/Admin-Common-Rest-Api/v1adminrepository-statuses-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">

# Change Repository Statuses

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

## 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/admin/repository-statuses
```

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

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "statusChanges": {
    "APPSEC": "ENABLED",
    "PR_SCAN": "DISABLED"
  },
  "engineTypeStatusChanges": {
    "SA": "ENABLED",
    "SAST": "DISABLED"
  },
  "appsecRepositorySettings": {
    "mergeScaDefectGroupsByPackage": true,
    "dastUrl": "https://example.com"
  }
}
```

{% endcut %}

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

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

{% cut "**Any of 2 types**" %}{.json-schema-combinators data-marker=or}

- **Type**: [RestAppsecSettings](#entity-RestAppsecSettings)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "mergeScaDefectGroupsByPackage": true,
    "dastUrl": "https://example.com"
  }
  ```

  {% endcut %}

- **Type**: null

  _Example:_{.json-schema-reset .json-schema-example} `null`

{% endcut %}

Opt-in repository-level feature settings to apply. An absent bag or an absent inner field means "leave the current value unchanged" (partial update)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "mergeScaDefectGroupsByPackage": true,
  "dastUrl": "https://example.com"
}
```

{% endcut %}
{.table-cell}
||
||

_engineTypeStatusChanges_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
||

_[additional]_{.json-schema-reset .json-schema-additional-property}
{.table-cell}|
**Type**: [AppsecStatus](#entity-AppsecStatus)

_Enum:_{.json-schema-reset .json-schema-value} `APPSEC_STATUS_UNSPECIFIED`, `ENABLED`, `DISABLED`, `UNRECOGNIZED`
{.table-cell}
||
|#{.json-schema-properties}

{% endcut %}

Map of engine type (SA, SCA, SAST, SECRETS, SBOM_SPDX_GEN, SBOM_CYCLONEDX_GEN) to status value (ENABLED, DISABLED). Supports both full and partial (delta) updates.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "SA": "ENABLED",
  "SAST": "DISABLED"
}
```

{% endcut %}
{.table-cell}
||
||

_statusChanges_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
||

_[additional]_{.json-schema-reset .json-schema-additional-property}
{.table-cell}|
**Type**: [AppsecStatus](#entity-AppsecStatus)

_Enum:_{.json-schema-reset .json-schema-value} `APPSEC_STATUS_UNSPECIFIED`, `ENABLED`, `DISABLED`, `UNRECOGNIZED`
{.table-cell}
||
|#{.json-schema-properties}

{% endcut %}

Map of status type (APPSEC, PR_SCAN, UPLOAD, BACKGROUND_SCAN) to status value (ENABLED, DISABLED). Supports both full and partial (delta) updates.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "APPSEC": "ENABLED",
  "PR_SCAN": "DISABLED"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### AppsecStatus {#entity-AppsecStatus}

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `APPSEC_STATUS_UNSPECIFIED`, `ENABLED`, `DISABLED`, `UNRECOGNIZED`

</div>

<div class="openapi-entity">

### RestAppsecSettings {#entity-RestAppsecSettings}

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

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

Public https URL the Cloud DAST scan targets; must resolve to Yandex Cloud addresses only. Null in a request means "leave the current value unchanged", an empty string clears it. Null in a response means not configured.

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

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

When true, new SCA defect groups are merged by package/library name without version. Null in a request means "leave the current value unchanged".
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "mergeScaDefectGroupsByPackage": true,
  "dastUrl": "https://example.com"
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "appsecStatuses": {
    "APPSEC": "ENABLED",
    "PR_SCAN": "DISABLED",
    "UPLOAD": "ENABLED",
    "BACKGROUND_SCAN": "DISABLED"
  },
  "engineTypeStatuses": {
    "SCA": "DISABLED",
    "SAST": "ENABLED",
    "SECRETS": "DISABLED",
    "SBOM_SPDX_GEN": "ENABLED",
    "SBOM_CYCLONEDX_GEN": "DISABLED"
  },
  "appsecRepositorySettings": {
    "mergeScaDefectGroupsByPackage": true,
    "dastUrl": "https://example.com"
  }
}
```

{% endcut %}

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

_appsecStatuses_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**Type**: object" %}

#|
||

_[additional]_{.json-schema-reset .json-schema-additional-property}
{.table-cell}|
**Type**: [AppsecStatus](#entity-AppsecStatus)

_Enum:_{.json-schema-reset .json-schema-value} `APPSEC_STATUS_UNSPECIFIED`, `ENABLED`, `DISABLED`, `UNRECOGNIZED`
{.table-cell}
||
|#{.json-schema-properties}

{% endcut %}

Map of status type name (APPSEC, PR_SCAN, UPLOAD, BACKGROUND_SCAN) to status value (ENABLED, DISABLED).

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "APPSEC": "ENABLED",
  "PR_SCAN": "DISABLED",
  "UPLOAD": "ENABLED",
  "BACKGROUND_SCAN": "DISABLED"
}
```

{% endcut %}
{.table-cell}
||
||

_engineTypeStatuses_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**Type**: object" %}

#|
||

_[additional]_{.json-schema-reset .json-schema-additional-property}
{.table-cell}|
**Type**: [AppsecStatus](#entity-AppsecStatus)

_Enum:_{.json-schema-reset .json-schema-value} `APPSEC_STATUS_UNSPECIFIED`, `ENABLED`, `DISABLED`, `UNRECOGNIZED`
{.table-cell}
||
|#{.json-schema-properties}

{% endcut %}

Map of engine type (SCA, SAST, SECRETS, SBOM_SPDX_GEN, SBOM_CYCLONEDX_GEN) to status value (ENABLED, DISABLED).

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "SCA": "DISABLED",
  "SAST": "ENABLED",
  "SECRETS": "DISABLED",
  "SBOM_SPDX_GEN": "ENABLED",
  "SBOM_CYCLONEDX_GEN": "DISABLED"
}
```

{% endcut %}
{.table-cell}
||
||

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

{% cut "**Any of 2 types**" %}{.json-schema-combinators data-marker=or}

- **Type**: [RestAppsecSettings](#entity-RestAppsecSettings)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "mergeScaDefectGroupsByPackage": true,
    "dastUrl": "https://example.com"
  }
  ```

  {% endcut %}

- **Type**: null

  _Example:_{.json-schema-reset .json-schema-example} `null`

{% endcut %}

Effective repository-level feature settings; dastUrl is null when not configured.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "mergeScaDefectGroupsByPackage": true,
  "dastUrl": "https://example.com"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

Bad Request

</div>

</div>

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