# Changes to UID History

**URL:** <https://community.prismic.io/t/changes-to-uid-history/6295>\
**Category:** Developing with Prismic\
**Tags:** rest-api\
**Created:** [July 19, 2021, 9:43am UTC](https://community.prismic.io/t/changes-to-uid-history/6295 "2021-07-19T09:43:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim.richter](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/tim.richter/32/2118_2.png) [@tim.richter](https://community.prismic.io/u/tim.richter)\
**Post date:** [July 19, 2021, 9:43am UTC](https://community.prismic.io/t/changes-to-uid-history/6295/1 "2021-07-19T09:43:52Z")

</div>

Hey everyone,

we were previously able to query document's that had old uid's. Right now if I query any document with a past uid I get nothing back. It only works with the current uid of a document.

As far as I know the 'slugs' feature is deprecated but I can't find anything about it in the documentation. We changed nothing about our setup it just happened over night and now we have a bunch of 404's errors on our site because old uid's get nothing back from the prismic api.

Were there some changes to the api that removed that feature?

Thanks in advance 🙂  
Tim

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [July 19, 2021, 2:50pm UTC](https://community.prismic.io/t/changes-to-uid-history/6295/3 "2021-07-19T14:50:18Z")

</div>

Hi Tim,

You _should_ be able to search for a document by an old UID in the REST API, can you please give us a link example of a document with an old UID?

Looking forward to your reply,  
Fares

---

<div class="post-metadata">

**Author:** ![tim.richter](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/tim.richter/32/2118_2.png) [@tim.richter](https://community.prismic.io/u/tim.richter)\
**Post date:** [July 20, 2021, 8:51am UTC](https://community.prismic.io/t/changes-to-uid-history/6295/5 "2021-07-20T08:51:22Z")

</div>

Hi @Fares, thank you for the fast response!

This one works for example because the uid matches exactly the document: ["marketing" UID](https://meltwater-site.cdn.prismic.io/api/v2/documents/search?page=1&pageSize=1&lang=fr&ref=YPZ-ixIAACMAdgn4&q=%5B%5Bat(my.solution_overview.uid,%20%22marketing%22)%5D%5D)

In the response I can see the slugs array with all past uid's of the document. If I try ["solutions-for-marketing"](https://meltwater-site.cdn.prismic.io/api/v2/documents/search?page=1&pageSize=1&lang=fr&ref=YPZ-ixIAACMAdgn4&q=%5B%5Bat(my.solution_overview.uid,%20%22solutions-for-marketing%22)%5D%5D) I get nothing back. No other past uid's seem to work as well it really only works with "marketing" which is the current uid of the document.

Best, Tim

---

<div class="post-metadata">

**Author:** ![tim.richter](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/tim.richter/32/2118_2.png) [@tim.richter](https://community.prismic.io/u/tim.richter)\
**Post date:** [July 26, 2021, 12:29pm UTC](https://community.prismic.io/t/changes-to-uid-history/6295/6 "2021-07-26T12:29:51Z")

</div>

Any updates on this behaviour? 😉

The links are not working anymore because the ref changed.  
These ones work (for now):

- ["marketing" UID](https://meltwater-site.cdn.prismic.io/api/v2/documents/search?page=1&pageSize=1&lang=fr&ref=YPs95RIAAIkaiuGO&q=%5B%5Bat(my.solution_overview.uid,%20%22marketing%22)%5D%5D)
- ["solutions-for-marketing" UID](https://meltwater-site.cdn.prismic.io/api/v2/documents/search?page=1&pageSize=1&lang=fr&ref=YPs95RIAAIkaiuGO&q=%5B%5Bat(my.solution_overview.uid,%20%22solutions-for-marketing%22)%5D%5D)

---

<div class="post-metadata">

**Author:** ![tim.richter](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/tim.richter/32/2118_2.png) [@tim.richter](https://community.prismic.io/u/tim.richter)\
**Post date:** [August 3, 2021, 7:41am UTC](https://community.prismic.io/t/changes-to-uid-history/6295/7 "2021-08-03T07:41:03Z")

</div>

Hey everyone,

I already tried asking this question [here](https://community.prismic.io/t/changes-to-uid-history/6295) but didn't get much of a response so I'm writing here again.

We were previously able to query document's that had old uid's. Right now if I query any document with a past uid I get nothing back. It only works with the current uid of a document.

As far as I know the 'slugs' feature is deprecated but I can't find anything about it in the documentation. We changed nothing about our setup it just happened over night and now we have a bunch of 404's errors on our site because old uid's get nothing back from the prismic api.

Were there some changes to the api that removed that feature?

This one works for example because the uid matches exactly the document: ["marketing" UID](https://meltwater-site.cdn.prismic.io/api/v2/documents/search?page=1&pageSize=1&lang=fr&ref=YQiJERIAAILNxpvH&q=%5B%5Bat(my.solution_overview.uid,%20%22marketing%22)%5D%5D)

In the response I can see the slugs array with all past uid's of the document. If I try ["solutions-for-marketing"](https://meltwater-site.cdn.prismic.io/api/v2/documents/search?page=1&pageSize=1&lang=fr&ref=YQiJERIAAILNxpvH&q=%5B%5Bat(my.solution_overview.uid,%20%22solutions-for-marketing%22)%5D%5D) I get nothing back. No other past uid's seem to work as well it really only works with "marketing" which is the current uid of the document.

Thanks in advance 🙂  
Tim

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [August 3, 2021, 5:17pm UTC](https://community.prismic.io/t/changes-to-uid-history/6295/10 "2021-08-03T17:17:22Z")

</div>

Hello @tim.richter, I'll take over this conversation since Fares isn't here for the moment.

I ran a test in your endpoint by [querying by UID](https://prismic.io/docs/technologies/query-by-id-rest-api#query-by-uid), and I can confirm that there's an odd behavior in the response.

With a new change to the API, this should be solved. Can you try again and see if it's works ok?

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [August 10, 2021, 8:44pm UTC](https://community.prismic.io/t/changes-to-uid-history/6295/12 "2021-08-10T20:44:29Z")

</div>

closed on August 10, 2021, 8:44pm UTC, flag & select 'Something Else' to reopen.

This thread is being monitored as an open ticket in the issue tracker. We will update this post as we get more information. If you have a similar use-case, you can [‘Flag’ this topic to reopen.](https://community.prismic.io/t/re-open-a-thread/2175)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 3:32pm UTC](https://community.prismic.io/t/changes-to-uid-history/6295/13 "2021-12-09T15:32:54Z")

</div>

Opened on December 9, 2021, 3:32pm UTC


