1

I am doing a artifact scan using Xray post API

https://artifacts.org/xray/api/v1/scanArtifact

In response I get below

{
    "info": "Scan of artifact is in progress"
}

How do I get the result of this scan ,is there a API for this ?

Umesh Kumar
  • 1,387
  • 2
  • 16
  • 34

2 Answers2

0

Since 3.42.3, there is a new method in the Xray's API called Artifact Summary

Nereis
  • 486
  • 1
  • 4
  • 21
  • However, I wasn't able to make it works. If anyone has a working request sample, it would be appreciated. – Nereis Oct 13 '22 at 13:02
-1

You can use below api to get the Xray Scan result of am artifact :

https://artifacts-company.org/artifactory/ui/artifactxray?path=hello-world/v1/manifest.json&repoKey=my-local-repository

This returns below response :

{
    "xrayIndexStatus": "High",
    "xrayIndexStatusLastUpdatedTimestamp": "15-01-21 08:24:23 +00:00",
    "xrayBlocked": false,
    "xrayBlockReason": "",
    "detailsUrl": "https://artifacts-company.org/web/#/component/details/docker:~2F~2Fhello-world"
}

You can then use field xrayIndexStatus to get scan status as result.

testCoder
  • 31
  • 6