Compare Builds

Xray REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Description: Compare Builds - Compares two builds and produces the difference between them.

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

Usage: POST /dependencyGraph/buildDelta

Consumes: application/json

Produces: application/json

Request body:

Name

Type

Required/Optional

Description

source_artifactory_id

string

required

The name of the first instance

source_build_name

string

required

The name of the first build

source_build_number

string

required

The number of the first build

target_artifactory_id

string

required

The name of the second instance

target_build_name

string

required

The name of the second build

target_build_number

string

required

The number of the second build

Response body:

Name

Type

Description

source_build

object

Details of the first build we are comparing

target_build

object

Details of the second build we are comparing

removed

array

Components only found in the first build

added

array

Components only found in the second build

unchanged

array

Components found in both builds with no differences

source_build and target_build Objects:

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 removed, added, and unchanged arrays):

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)

Sample Usage: POST /dependencyGraph/buildDelta

Request Body

{
 "source_artifactory_id":"my-instance",
 "source_build_name":"someOriginBuild",
 "source_build_number":"111",
 "target_artifactory_id":"my-instance",
 "target_build_name":"someTargetBuild",
 "target_build_number":"222",
}

Sample Response

{
  "source_build":{
    "name": "my-build",
      "path": "art2/ext-release-local/",
      "pkg_type": "Generic",
      "sha256": "d160c68ed8879ae42756e159daec1dd7ecfd53b6192321656b72715e20d46dd2",
      "component_id": "gav://org.artifactory.pro:artifactory-pro-war:4.14.0"
  },
  "target_build":{
    "name": "my-build",
      "path": "art2/ext-release-local/",
      "pkg_type": "Generic",
      "sha256": "d160c68ed8879ae42756e159daec1dd7ecfd53b6192321656b72715e20d46dd2",
      "component_id": "gav://org.artifactory.pro:artifactory-pro-war:4.14.0"
  },
  " removed":[
    {
      "component_name":"some-component-1.1",
      "component_id":"pip://some-component:1.1",
      "package_type":"pip",
      "version":"1.1",
      "created":"2008-06-09T16:50:19Z",
      "modified":"2015-07-26T17:49:47Z"
    }
  ],
  "added":[
    {
      "component_name":"Jinja2.7.2",
      "component_id":"pip://Jinja2:2.7.2",
      "package_type":"pip",
      "version":"2.7.2",
      "created":"2008-06-09T16:50:19Z",
      "modified":"2015-07-26T17:49:47Z"
    }
  ],
 "unchanged":[
    {
      "component_name":"Apache1.4",
      "component_id":"gav://apache:1.4",
      "package_type":"maven",
      "version":"1.4",
      "created":"2008-06-09T16:50:19Z",
      "modified":"2015-07-26T17:49:47Z"
    }
  ]
}

Response Codes

Response Codes

Description

200

Success

400

The build with the provided identifier doesn't exist or isn't indexed in Xray

401

Bad credentials

415

Failed to parse request