# Reducing API calls and linking collections

**URL:** <https://discourse.getcockpit.com/t/reducing-api-calls-and-linking-collections/2237>\
**Category:** Support\
**Created:** [January 25, 2022, 10:40am UTC](https://discourse.getcockpit.com/t/reducing-api-calls-and-linking-collections/2237 "2022-01-25T10:40:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![insomniac22](https://avatars.discourse-cdn.com/v4/letter/i/7993a0/32.png) [@insomniac22](https://discourse.getcockpit.com/u/insomniac22)\
**Post date:** [January 25, 2022, 10:40am UTC](https://discourse.getcockpit.com/t/reducing-api-calls-and-linking-collections/2237/1 "2022-01-25T10:40:16Z")

</div>

I have a system setup and I want to reduce the number of API calls I am making by linking the data. For example, I want to get a user ID when they log in and then their blog posts in one single API call rather than get the user information in one call and then retrieve all their blogs in another call. I know I can link fields using collectionlink to link collections but I don’t understand how I can achieve what I need.

---

<div class="post-metadata">

**Author:** ![ronaldaug](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/ronaldaug/32/260_2.png) [@ronaldaug](https://discourse.getcockpit.com/u/ronaldaug)\
**Post date:** [February 15, 2022, 5:01am UTC](https://discourse.getcockpit.com/t/reducing-api-calls-and-linking-collections/2237/2 "2022-02-15T05:01:57Z")

</div>

I think it’s better to use [CockpitQL](https://github.com/agentejo/CockpitQL) to reduce API calls. Or you must implement a custom API like creating `bootstrap.php` under config folder.
