How to find artifact path for Rest API(automate artifact downloads)


I've been trying this for a while. So far I am able to download specific build artifacts using: 


However I am trying to build an automation suite. I need to download last successful build and the build number increases(i.e. next build is dev.351)

I have seen/tried numerous ways to do this like:



My question is what is this artifact path? When I go to settings of the branch I want to download the artifact from it reads:

Artifact paths:


However when I append that path to the end of the url I get 


Artifact does not exist: 'Output/C.Installer_*.exe


Does anyone have any info on this? I've tried just about everything

1 comment
Comment actions Permalink

What do you get if you just request the following on your build?


This should return a list of artifacts and the content path to retrieve it. For example:

<files count="3">
<file name="index.html" size="480" modificationTime="20191126T115441-0600" href="/app/rest/builds/id:1229/artifacts/metadata/index.html">
<content href="/app/rest/builds/id:1229/artifacts/content/index.html"/>
<file name="" size="10008" modificationTime="20191126T115441-0600" href="/app/rest/builds/id:1229/artifacts/metadata/">
<content href="/app/rest/builds/id:1229/artifacts/content/"/>
<file name="styles.css" size="273" modificationTime="20191126T115441-0600" href="/app/rest/builds/id:1229/artifacts/metadata/styles.css">
<content href="/app/rest/builds/id:1229/artifacts/content/styles.css"/>

Then, you can use the full content path appended to your <teamcity server> to download the file. Using the example above, I can download my by using <teamcity server>/app/rest/builds/id:1229/artifacts/content/

Our current documentation on using REST API to work with artifacts can be found here:


Please sign in to leave a comment.