Get Build Dependency Graph

Xray REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Description: Get Build Dependency Graph - Get the complete dependency graph for a build.

Security: Requires a valid user with the "Read" permission.

Usage: POST /dependencyGraph/build

Consumes: application/json

Produces: application/json

Request body:

Name

Type

Required/Optional

Description

build_name

string

required

The name of the build

build_number

string

required

The number of the build

build_repo

string

optional

The repository of the build (default if not specified)

project

string

optional

The project of the build (default if not specified)

Response body:

Name

Type

Description

build

object

Details of the build

components

array

Components of the build with their dependencies

build Object:

Name

Type

Description

name

string

The name of the build

path

string

The path of the build

pkg_type

string

Package type of the build

sha256

string

SHA256 checksum of the build

component_id

string

The ID of the build component

Component Objects (found in components array):

Name

Type

Description

component_name

string

Name of the component

component_id

string

ID of the component

package_type

string

Package type of the component

version

string

Version of the component

created

string

Creation date of the component (ISO8601 format)

modified

string

Modification date of the component (ISO8601 format)

components

array

Components that are dependencies of this component

Sample Usage: POST /dependencyGraph/build

Request Body

{
 "build_name":"xray-test",
 "build_number":"157",
 "build_repo":"test-build-info",
 "project":"test"
}

Sample Response

{
    "build": {
        "name": "xray-test",
        "path": "default/test-build-info/xray-test",
        "pkg_type": "Build",
        "sha256": "2e3ccd8c1e952a30f2c2865c9130553bdb11b4ed49b81e6ab08f22a29f5d303b",
        "component_id": "[test-build-info]/xray-test:157"
    },
    "components": [
        {
            "component_name": "multi1-3.7-20230730.132458-7-sources.jar",
            "component_id": "org.jfrog.test:multi1:3.7-20230730.132458-7",
            "package_type": "Maven",
            "created": "2023-07-30T13:25:07Z"
        },
        {
            "component_name": "multi1-3.7-20230730.132458-7-tests.jar",
            "component_id": "org.jfrog.test:multi1:3.7-20230730.132458-7",
            "package_type": "Maven",
            "created": "2023-07-30T13:25:07Z"
        },
        {
            "component_name": "javax.mail:mail:1.4.jar",
            "component_id": "javax.mail:mail:1.4",
            "package_type": "Maven",
            "created": "2022-11-10T13:29:10Z"
        },
        {
            "component_name": "hsqldb:hsqldb:1.8.0.10.jar",
            "component_id": "hsqldb:hsqldb:1.8.0.10",
            "package_type": "Maven",
            "created": "2022-11-10T13:29:24Z"
        }
    ]
}

Response Codes

Status Code

Description

200

Success

400

Build '<PATH>' doesn't exist or isn't indexed in Xray

400

Missing build name

400

Missing build number

400

Missing Artifactory ID

401

Bad credentials

415

Failed to parse request