Upcoming changes to the has-artifacts field from the single-job endpoint of the CircleCI API

The single-job endpoint in CircleCI’s API has contained an undocumented field “has-artifacts”. This field has been hard coded to true for 3+ years. A recent change has caused this field to return a hard coded null instead of true. Rather than re-introduce the misleading hard coded true, this field will be removed entirely on Feb 24, 2023.

The recommended way to check if a job stored any artifacts is to call the artifacts API endpoint - this will return 200 if the job exists and has correct authentication. It returns an array of artifacts if any are present or an empty array if no artifacts were stored for the job.

Comment below if you have any questions or concerns.

1 Like

Obligatory XKCD:

But seriously, what a bad way to make an API change! You are breaking other people’s code in production.

When you expose a field, that becomes a part of the public API, like it or not.

Please revert this to have the value hardcoded to True, like it has been for 3+ years.

Hi Andrea,

We understand the risk involved with removing the value. Since changing the value to null, we have not had any customers submit any reports of issues. We believe removing the field altogether avoids a misleading and confusing customer experience for our end users.

Let me know if the alternative that I suggested above is not sufficient for use case.