Description: Compare Artifacts - Compares two artifacts and produces the difference between them.
Security: Requires a valid user with the "Read" permission.
Usage: POST /dependencyGraph/artifactDelta
Consumes: application/json
Produces: application/json
Request body:
Name | Type | Required/Optional | Description |
---|---|---|---|
| string | required | The path of the source artifact to be compared |
| string | required | The path of the target artifact to be compared |
Response body:
Name | Type | Description |
---|---|---|
| object | Details of the source artifact being compared |
| object | Details of the target artifact being compared |
| array | Components that are present in the source artifact but not in the target artifact |
| array | Components that are present in the target artifact but not in the source artifact |
| array | Components that are present in both the source and target artifacts, with no changes in versions |
source_artifact Object:
Name | Type | Description |
---|---|---|
| string | The name of the source artifact |
| string | The path of the source artifact |
| string | Package type of the source artifact |
| string | SHA256 checksum of the source artifact |
| string | SHA1 checksum of the source artifact |
target_artifact Object:
Name | Type | Description |
---|---|---|
| string | The name of the target artifact |
| string | The path of the target artifact |
| string | Package type of the target artifact |
| string | SHA256 checksum of the target artifact |
| string | SHA1 checksum of the target artifact |
Component Objects (found in removed, added, and unchanged arrays):
Name | Type | Description |
---|---|---|
| string | Name of the component |
| string | ID of the component |
| string | Package type of the component |
| string | Version of the component |
| string | Creation date of the component (ISO8601 format) |
| string | Modification date of the component (ISO8601 format) |
Sample Usage: POST /dependencyGraph/artifactDelta
Request Body
{ "source_artifact_path":"/pnnl/goss/goss-core-client/0.1.7/goss-core-client-0.1.7-sources.jar", "target_artifact_path":"/pnnl/goss/goss-core-client/0.1.8/goss-core-client-0.1.8-sources.jar" }
Sample Response
{ "source_artifact":{ "name": "artifactory-pro.zip", "path": "art2/ext-release-local/", "pkg_type": "Generic", "sha256": "d160c68ed8879ae42756e159daec1dd7ecfd53b6192321656b72715e20d46dd2", "sha1": "" }, "target_artifact":{ "name": "artifactory-pro.zip", "path": "art2/ext-release-local/", "pkg_type": "Generic", "sha256": "d160c68ed8879ae42756e159daec1dd7ecfd53b6192321656b72715e20d46dd2", "sha1": "" }, "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 | Artifact '<PATH>' doesn't exist or isn't indexed in Xray |
401 | Bad Credentials |
415 | Failed to parse request |