Latest Artifacts API returns empty list

I can see the artifact of the latest build from master branch in circleci UI but “latest artifacts” API always returns empty list.

This API call returns empty list.
https://circleci.com/api/v1.1/project/github/user/project/latest/artifacts?circle-token=123456789&branch=master

But if I use latest build number and call “/:build_num/artifacts” API, it returns the correct artifact.

https://circleci.com/api/v1.1/project/github/user/project/320/artifacts?circle-token=123456789

The above API works fine by pulling the latest artifact using build number.

What could be the issue?

I’m not able to reproduce this

https://circleci.com/api/v1.1/project/github/drazisil/junit-merge/389/artifacts

https://circleci.com/api/v1.1/project/github/drazisil/junit-merge/latest/artifacts?&branch=master

Can you open a ticket with the details of the project (and what type of token you are using) so we can take a look?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.

TLDR: Two jobs in the same workflow call the latest artifacts endpoint. The first gets the correct artifacts, the second gets an empty array.


I’m experiencing a similar issue, however in my case the trouble is that the api call to fetch the latest artifacts sometimes returns the expected data, and other times it is empty.

I have a repro workflow.
Essentially, the flow is:

  1. create job generates some dynamic text and stores it in a file, which is artifacted
  2. list job calls the /api/v1.1/project/github/user/project/latest/artifacts endpoint and outputs the result
  3. show job calls the same endpoint as list, but it stores the result in a file for later parsing

While the api call in list routinely outputs the expected response with a single artifact, the show job has always (thus far) received an empty array of artifacts.