Get a link to specific artifact from the latest build

Hey there,

I found this post that explains how to get all the artifacts from the build. HERE

Then it was pretty easy to figure out how to get specific file out of it:
https://circleci.com/api/v1.1/project/github/<project name>/<repo name>/latest/artifacts/0/<path_to_artifact>/<name_of_the_artifact>?circle-token=<my_token>

That redirects to a link of the artifact. But if user is not logged in to the circle CI, the will just show “must be logged in”

The idea is to put a link to the latest successful build artifact, something like a coverage report or docs in the README file of the repo.

Is there any way to make it work?

Hello, and welcome!

We have a feature request for this here https://ideas.circleci.com/ideas/CCI-I-228

There’s also this third-party project that might give you some ideas, but I don’t think it’s been updated for API v1.1, so may need to change the API calls a bit https://github.com/jokester/cart