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: \S

Example: 0199140f-4343-7c06-a7e3-b835c305b629

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

[additional]

Type: string[]

Example
[
  "example"
]

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

Example
{}

nodes

Type: DependencyNodeDto[]

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"
  }
]

totalDependencies

Type: integer

DependencyLicenseDto

Name

Description

name

Type: string

Example: 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: example

defectGroupPublicIds

Type: integer[]

Example
[
  0
]

defectGroupUuids

Type: string[]

Example
[
  "example"
]

severity

Type: string

Example: example

Example
{
  "cveId": "example",
  "severity": "example",
  "defectGroupUuids": [
    "example"
  ],
  "defectGroupPublicIds": [
    0
  ]
}

DependencyNodeDto

Name

Description

cves

Type: DependencyCveDto[]

Example
[
  {
    "cveId": "example",
    "severity": "example",
    "defectGroupUuids": [
      "example"
    ],
    "defectGroupPublicIds": [
      0
    ]
  }
]

licenses

Type: DependencyLicenseDto[]

Example
[
  {
    "name": "example",
    "riskScore": 0
  }
]

maxCveSeverity

Type: string

Example: example

maxLicenseRiskScore

Type: integer

maxLicenseRiskSeverity

Type: string

Example: example

name

Type: string

Example: example

packageManager

Type: string

Example: example

purl

Type: string

Example: example

scope

Type: string

Example: example

version

Type: string

Example: 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"
}