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

<div class="openapi">

# Get the repository dependency graph

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

Returns nodes and parent-to-child PURL edges from the latest successful default-branch scan. Returns an empty graph if no matching scan exists. License risks use the current repository configuration.

## Request

<div class="openapi__requests">

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

<div class="openapi__request">

GET {.openapi__method}
```text translate=no
https://appsec.sourcecraft.tech/v1/dependencies/tree
```

</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__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "nodes": [
    {
      "purl": "example",
      "name": "example",
      "version": "example",
      "licenses": [
        {
          "name": "example",
          "riskScore": 0
        }
      ],
      "maxLicenseRiskScore": 0,
      "maxLicenseRiskSeverity": "example",
      "cves": [
        {
          "cveId": "example",
          "severity": "example",
          "defectGroupUuids": [
            null
          ],
          "defectGroupPublicIds": [
            null
          ]
        }
      ],
      "maxCveSeverity": "example",
      "packageManager": "example",
      "scope": "example"
    }
  ],
  "dependencies": {},
  "totalDependencies": 0
}
```

{% endcut %}

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

_dependencies_{.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**: string[]

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

```json translate=no
[
  "example"
]
```

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

{% endcut %}

Parent PURL to child PURLs. Leaf nodes may be absent from this map.

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

```json translate=no
{}
```

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

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

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

```json translate=no
[
  {
    "purl": "example",
    "name": "example",
    "version": "example",
    "licenses": [
      {
        "name": "example",
        "riskScore": 0
      }
    ],
    "maxLicenseRiskScore": 0,
    "maxLicenseRiskSeverity": "example",
    "cves": [
      {
        "cveId": "example",
        "severity": "example",
        "defectGroupUuids": [
          "example"
        ],
        "defectGroupPublicIds": [
          0
        ]
      }
    ],
    "maxCveSeverity": "example",
    "packageManager": "example",
    "scope": "example"
  }
]
```

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

_totalDependencies_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### DependencyLicenseDto {#entity-DependencyLicenseDto}

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

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

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

_riskScore_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

License risk score from the repository's current license configuration, from 0 to 10.
{.table-cell}
||
|#{.json-schema-properties}

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

```json translate=no
{
  "name": "example",
  "riskScore": 0
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### DependencyCveDto {#entity-DependencyCveDto}

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

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

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

_defectGroupPublicIds_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer[]

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

```json translate=no
[
  0
]
```

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

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

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

```json translate=no
[
  "example"
]
```

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

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

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

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

```json translate=no
{
  "cveId": "example",
  "severity": "example",
  "defectGroupUuids": [
    "example"
  ],
  "defectGroupPublicIds": [
    0
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### DependencyNodeDto {#entity-DependencyNodeDto}

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

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

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

```json translate=no
[
  {
    "cveId": "example",
    "severity": "example",
    "defectGroupUuids": [
      "example"
    ],
    "defectGroupPublicIds": [
      0
    ]
  }
]
```

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

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

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

```json translate=no
[
  {
    "name": "example",
    "riskScore": 0
  }
]
```

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

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

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

_maxLicenseRiskScore_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer
{.table-cell}
||
||

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

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

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

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

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

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

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

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

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

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

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

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

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

```json translate=no
{
  "purl": "example",
  "name": "example",
  "version": "example",
  "licenses": [
    {
      "name": "example",
      "riskScore": 0
    }
  ],
  "maxLicenseRiskScore": 0,
  "maxLicenseRiskSeverity": "example",
  "cves": [
    {
      "cveId": "example",
      "severity": "example",
      "defectGroupUuids": [
        "example"
      ],
      "defectGroupPublicIds": [
        0
      ]
    }
  ],
  "maxCveSeverity": "example",
  "packageManager": "example",
  "scope": "example"
}
```

{% endcut %}

</div>

</div>

</div>

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