Get the repository dependency graph
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
GET
https://appsec.sourcecraft.tech/v1/dependencies/tree
Query parameters
|
Name |
Description |
|
gitRepo |
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: Example: |
Responses
200 OK
OK
Body
application/json
{
"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
}
|
Name |
Description |
||
|
dependencies |
Type: object
Parent PURL to child PURLs. Leaf nodes may be absent from this map. Example
|
||
|
nodes |
Type: DependencyNodeDto[] Example
|
||
|
totalDependencies |
Type: integer |
DependencyLicenseDto
|
Name |
Description |
|
name |
Type: string Example: |
|
riskScore |
Type: integer License risk score from the repository's current license configuration, from 0 to 10. |
Example
{
"name": "example",
"riskScore": 0
}
DependencyCveDto
|
Name |
Description |
|
cveId |
Type: string Example: |
|
defectGroupPublicIds |
Type: integer[] Example
|
|
defectGroupUuids |
Type: string[] Example
|
|
severity |
Type: string Example: |
Example
{
"cveId": "example",
"severity": "example",
"defectGroupUuids": [
"example"
],
"defectGroupPublicIds": [
0
]
}
DependencyNodeDto
|
Name |
Description |
|
cves |
Type: DependencyCveDto[] Example
|
|
licenses |
Type: DependencyLicenseDto[] Example
|
|
maxCveSeverity |
Type: string Example: |
|
maxLicenseRiskScore |
Type: integer |
|
maxLicenseRiskSeverity |
Type: string Example: |
|
name |
Type: string Example: |
|
packageManager |
Type: string Example: |
|
purl |
Type: string Example: |
|
scope |
Type: string Example: |
|
version |
Type: string Example: |
Example
{
"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"
}