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

**URL:** <https://discuss.circleci.com/t/upcoming-changes-to-the-has-artifacts-field-from-the-single-job-endpoint-of-the-circleci-api/47190>\
**Category:** Build Environment\
**Created:** [February 22, 2023, 10:18pm UTC](https://discuss.circleci.com/t/upcoming-changes-to-the-has-artifacts-field-from-the-single-job-endpoint-of-the-circleci-api/47190 "2023-02-22T22:18:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastian-lerner](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/sebastian-lerner/32/27833_2.png) [@sebastian-lerner](https://discuss.circleci.com/u/sebastian-lerner)\
**Post date:** [February 22, 2023, 10:18pm UTC](https://discuss.circleci.com/t/upcoming-changes-to-the-has-artifacts-field-from-the-single-job-endpoint-of-the-circleci-api/47190/1 "2023-02-22T22:18:02Z")

</div>

The [single-job](https://circleci.com/docs/api/v1/index.html#single-job) endpoint in [CircleCI’s API](https://circleci.com/docs/api/v2/index.html) 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](https://circleci.com/docs/api/v1/index.html#artifacts-of-a-build) 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.

---

<div class="post-metadata">

**Author:** ![AndreaCensi](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/andreacensi/32/15302_2.png) [@AndreaCensi](https://discuss.circleci.com/u/AndreaCensi)\
**Post date:** [February 27, 2023, 9:41pm UTC](https://discuss.circleci.com/t/upcoming-changes-to-the-has-artifacts-field-from-the-single-job-endpoint-of-the-circleci-api/47190/2 "2023-02-27T21:41:03Z")

</div>

Obligatory XKCD:

> **[Workflow](https://xkcd.com/1172/)**
>
> There are probably children out there holding down spacebar to stay warm in the winter! YOUR UPDATE MURDERS CHILDREN.

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.

---

<div class="post-metadata">

**Author:** ![sebastian-lerner](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/sebastian-lerner/32/27833_2.png) [@sebastian-lerner](https://discuss.circleci.com/u/sebastian-lerner)\
**Post date:** [March 1, 2023, 2:21pm UTC](https://discuss.circleci.com/t/upcoming-changes-to-the-has-artifacts-field-from-the-single-job-endpoint-of-the-circleci-api/47190/3 "2023-03-01T14:21:17Z")

</div>

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.
