# Unable to query singletons w/api

**URL:** <https://discourse.getcockpit.com/t/unable-to-query-singletons-w-api/810>\
**Category:** Support\
**Created:** [May 7, 2019, 1:20pm UTC](https://discourse.getcockpit.com/t/unable-to-query-singletons-w-api/810 "2019-05-07T13:20:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonday](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jasonday](https://discourse.getcockpit.com/u/jasonday)\
**Post date:** [May 7, 2019, 1:20pm UTC](https://discourse.getcockpit.com/t/unable-to-query-singletons-w-api/810/1 "2019-05-07T13:20:07Z")

</div>

I can query collections:  
…/cockpit/api/collections/get/components?token=xxx

but, querying a singleton returns a 404:  
…/cockpit/api/singletons/get/home?token=xxx

Any tips?

---

<div class="post-metadata">

**Author:** ![jasonday](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jasonday](https://discourse.getcockpit.com/u/jasonday)\
**Post date:** [May 7, 2019, 1:33pm UTC](https://discourse.getcockpit.com/t/unable-to-query-singletons-w-api/810/2 "2019-05-07T13:33:21Z")

</div>

singleton endpoint has changed:

> <https://github.com/agentejo/cockpit/issues/857#issuecomment-450951665>

`/api/singletons/singleton/{singletonname}`

---

<div class="post-metadata">

**Author:** ![Blistok](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/blistok/32/212_2.png) [@Blistok](https://discourse.getcockpit.com/u/Blistok)\
**Post date:** [May 8, 2019, 8:30am UTC](https://discourse.getcockpit.com/t/unable-to-query-singletons-w-api/810/3 "2019-05-08T08:30:44Z")

</div>

We really need to get more serious about updating the docs… 😅

---

<div class="post-metadata">

**Author:** ![jasonday](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jasonday](https://discourse.getcockpit.com/u/jasonday)\
**Post date:** [May 8, 2019, 1:54pm UTC](https://discourse.getcockpit.com/t/unable-to-query-singletons-w-api/810/4 "2019-05-08T13:54:56Z")

</div>

Actually, there must have been an issue with that specific singleton, as querying a different singleton with the first query worked…
