2
votes

I am writing a pipeline and as a part of it i need to check if there any file in the artifactory with curtain property.

The only way that I found is actually try to download an artifact using spec:

    def downloadSpec = """{
     "files": [
      {
          "pattern": "bazinga-repo/*.zip",
          "target": "bazinga/",
          "props": "url="test123"
        }
     ]
    }"""

server.download(downloadSpec)

Is there any way to do that without jfrog cli ?

Thanks

1

1 Answers

2
votes

If you just want to search based on properties, there is a property search API.

It would look something like this:

GET /api/search/prop?url=test123&repos=bazinga-repo