How to use Bamboo's rest api to download an artifact

849 views Asked by At

I am trying to write a bash script to download an artifact from Bamboo so that it can be used for other operations. I tried following the solution suggested in this post - using bamboo/rest/api/latest/result however I still just get the xml showing the location and the name of the artifact. The artifact itself is not downloaded. Any suggestions on how to go about this?

Below is the api cmd that I am using:

http://myhost.com:8085/bamboo/rest/api/latest/result/{projectKey}-{buildKey} [GET]
1

There are 1 answers

0
Archie On BEST ANSWER

After much tweaking I managed to get it to work. I had messed up parsing of the artifact location link extracted from the xml. With the correct link, obtained from the xml, and the right authentication the artifact can be downloaded.