Referencing Latest Build Artifacts



I had a look in the docs, but I don’t think this is currently available - apologies if I missed it somewhere.

URLs to build artifacts look a bit like this:$username/$myproject/$buildnumber/artifacts/0/tmp/circle-artifacts.$somerandomidentifier/$myartifactname

Obviously, this works perfectly if you access the artifact via the build UI. However, quite often, I’d like to be able to access the latest version of some artifact on a particular branch, which means I have to make quite a few repetitive clicks through the UI, especially annoying if the required artifact is buried somewhere in a long list.

It would be really useful to have a URL that would allow bookmarking of eg “the latest version of some artifact” or “the latest version of some artifact on a particular branch”. This is currently not possible due to the presence of $buildnumber and $somerandomidentifier in the URL.

Something along the lines of:$username/$myproject/latest/artifacts/$myartifactname
(Latest build of $myartifactname)$username/$myproject/master-latest/artifacts/$myartifactname
(Latest build of $myartifactname on branch master)

Obviously, these could just redirect to the real artifact URL.

Show Artifacts Automatically
Better Test Reporting

This might be a good use for the API.

Something like linked with to get the last build number.


Agree, I think the API is the best case for this type of thing. @jimfarrand would that work for you?


Thanks for the suggestion.

What I am requesting could certainly be implemented that way.

I have a bunch of artifacts which are, for example, code coverage reports and API documentation. I want to be able to hit a bookmark in my browser to take me to the report from the latest build.

If I understand your suggestion: I could build a web-app that figures out the latest build and redirects me to the report I want, and host that web-app somewhere. And then bookmark that web-app in my browser.

Which is not terribly difficult. But it seems like a lot of people would potentially make use of this, so I figured that it would make more sense for it to be implemented at CircleCI’s end, rather than everyone who wants to do something similar building it themselves.

Or am I missing a trick that would allow me to trivially do this using the in-browser using the CircleCI API?


I’m after a similar shortcut, but as build artifacts could change between builds, I’d like to see a ‘latest’ keyword which can be used in place of the build number in any api call.

e.g., to get the list of artifacts for the latest build:

GET: /project/:username/:project/latest/artifacts


This would be really nice :slight_smile:


Hehe, I was about to post the same feature request but then found this post luckily :grin:

I was also looking at the API and playing around with it, but in the end it didn’t help as it requires a programmatic approach to get that info, not just a link.

So +1 for:

  • ability to reference the :latest build on a specific branch via URL
  • ability to have predictable artifact URLs (i.e. without the random string inbetween)


I put this up as a “redirector service” to serve stable URLs for latest build and artifacts:


  • GET /api/v1/project/<user>/<project>/tree/<branch>/latest
  • GET /api/v1/project/<user>/<project>/tree/<branch>/latest/tests
  • GET /api/v1/project/<user>/<project>/tree/<branch>/latest/artifacts
  • GET /api/v1/project/<user>/<project>/tree/<branch>/latest/artifacts/<artifact>

Everything else GET /api/v1/* will be redirected as-is, i.e. you can use it as a drop-in replacement (unless you are using POST or DELETE)

Sure you can also host it yourself, source code is here:


+1 It seem to me completely obvious that this would be a nice feature to have (without having to use the API). Use case: Badge in a README file that links to an html coverage report that is an artifact of the latest build.


Be sure to click on the heart on the main feature request to show your “official support” for this feature.


We are excited to announce that we have shipped support to retrieve your latest build artifacts. You can read more about it in our docs.


Maybe I am missing something, but I still don’t see a way to link directly to the latest version of a build artifact. What I see in the docs is a way to list the artifacts of the latest build, which would then require grabbing the URL of the particular artifact I’m looking for from the url attribute of the json response. But those artifact URLs still have a build identifier in them, so e.g. there’s still not a stable link to the latest coverage report’s index.html file.


I don’t see it either. The feature request as described in the OP is still not present.

Because this is so clunky I have to re-educate my test people all the time.

  1. Click http://blah/tree/master
  2. Click on the topmost very tiny build #
  3. Click on the tiny “Artifacts” tab swimming around in the middle of the page somewhere
  4. Finally go find the actual thing you wanted at the beginning over on the left somewhere

Far cry from a “download” link which is really all they should need.


It’s certainly not convenient, and should probably be treated as a private implementation detail, but looking at the links in that post you can construct a link that will 302 redirect you to the actual artifact location as follows:



Hi All,

I found this project. Thought it is useful for this dicussion thread.

Get an artifact from the latest green build of your current project’s master

$ cart path/to/artifact


I am also very interested in this feature.

It would be great if this post could be marked unsolved so as to not cause confusion.


Yeah this is not fixed. I build docs artifacts and would like to point to the latest docs in my README but this is not currently possible. The solution posted is only for API clients, whereas the OP (and I) would like a public URL that redirects/masks to the latest build.


Same here, it’d be really nice to be able to link to latest docs and such generated during a build.


Right, what’s wonderful about this idea is that it potentially allows us to not have to add a dependency to the API client in order to fetch the latest package. This is similar to a convention that many open source packages use, which is creating a latest.tar.gz along with a version_number.tar.gz, so you can auto-fetch that one.


The reluctance to implement this is really baffling. It seems like it would be simple to implement, virtually no maintenance, and really useful for many people.