Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Is there a way to download the artifacts using API?

I can access the artifacts for a build using:



Result something like:

<artifacts start-index="0" max-result="2" size="2">
<link href="http://<link>/artifact/shared/DACPAC/" rel="self"/>
<prettySizeDescription>923 KB</prettySizeDescription>


However, is it possible then to download the artifacts from the artifact link result without resorting to some sort of HTML scraping?


2 answers

OK I can see it will give the artifact but how can i use this to download all the artifacts associated with the plan?

In fact, how is this more useful than the original API url I was using in the question?


rsperafico Atlassian Team Mar 18, 2015

Hello Ruban, "-- However, is it possible then to download the artifacts from the artifact link result without resorting to some sort of HTML scraping?" No, as mentioned earlier, it will be required to write a script to loop trough the results and download the artifacts. — Kind regards, Rafael P. Sperafico Atlassian Support

so what url to use for downloading the artifacts in the loop ?

0 votes
rsperafico Atlassian Team Mar 17, 2015

Hello Ruban,

Thank you for your question.

This is the REST API call associated to Artifacts /plan/{projectKey}-{buildKey}/artifact which will provide you with the following output:

&lt;artifacts expand="artifacts"&gt;
	&lt;link href="[bamboo-base-url]/rest/api/latest/plan/[projectKey]-[buildKey]/artifact" rel="self"/&gt;
	&lt;artifacts start-index="0" max-result="1" size="1"&gt;

It will be required to iterate through the result(s) above and use it to build the URL to download the files.

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

Kind regards,
Rafael P. Sperafico
Atlassian Support

Hi Rafael, this doesn't seem to work for me. http://builder:8085/rest/api/latest/plan/UTILS-SVNPERM/artifact?expand=artifacts should return my lone artifact definition but I get <artifacts expand="artifacts"><link href="http://builder:8085/rest/api/latest/plan/UTILS-SVNPERM/artifact"; rel="self"/><artifacts start-index="0" max-result="0" size="0"/></artifacts> Any clue what I'm missing?

Oh, that ONLY works for share artifacts.Verified by looking at source and experimentation. Ok, I must share my artifacts to be able to use this call

"It will be required to iterate through the result(s) above and use it to build the URL to download the files."


Exactly how to use the results to build the URL? What should go where?

@Rafael Please provide more details on how the iteration is done as  there is no obvious info on what URL to use for subsequent download requests to get the artifacts, especially for plans that produce multiple artifacts

Like Kaushik Veluru likes this

Yong, were you able to figure out how to do the iteration or artifact results? 

@Kaushik Veluru Do you know how the URL should be put together to download the artifact? I have no problem getting the information and parsing it. I am just not sure how the URL is formatted

The REST api ended up not helping me, because most of the interesting artifacts I needed to grab weren't individually named but shared via expressions, e.g. *.deb. As far as I can tell in Feb 2021, the REST API will not detail out individual artifacts that were gathered via an expression, so I had to resort to a small amount of html web scraping. 

In Python 3.8, here's my grand html scraping class:

class ParseBambooHTML(HTMLParser):
artifacts_list = list()

def handle_starttag(self, tag, attrs):
if tag == 'a':
for name, value in attrs:
if name == 'href':

My entire flow is to use requests to do a GET on the url that you can browse to in a normal browser, e.g. 


(I'm using dummy values there, substitute your bamboo url, project key, and folder, but importantly it has to be a url that shows the files you want to parse/download)

In the example below I'll search for a hypothetical file with 'xxxyyy' in the name, but the version changes each build:  (this is massively cut down, but it gives you the gist) 

r = session.get(url, timeout=30)
parser = ParseBambooHTML()

for line in parser.artifacts_list:
if 'xxxyyy' in line: # '/artifact/PROJ-ECT/shared/build-latest/example-folder/xxxyyy_21.2.17.123.deb'
artifact_uri = line
artifact_filename = artifact_uri.split('/')[-1] # 'xxxyyy_21.2.17.123.deb'

With the uri + the file name, you can retrieve the file easily enough now.

Hopefully this added something to the discussion. 


Suggest an answer

Log in or Sign up to answer

Atlassian Community Events