# Collection exclude fields

**URL:** <https://discourse.getcockpit.com/t/collection-exclude-fields/2162>\
**Category:** Support\
**Created:** [November 30, 2021, 1:45pm UTC](https://discourse.getcockpit.com/t/collection-exclude-fields/2162 "2021-11-30T13:45:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [January 24, 2022, 7:58am UTC](https://discourse.getcockpit.com/t/collection-exclude-fields/2162/2 "2022-01-24T07:58:56Z")

</div>

I feel like this is a bit hacky, you can filter fields via URL like

> api/collections/entries/collectionname?fields[\_mby]=&fields[\_by]=&fields[\_modified]=&fields[\_created]=

OR

> api/collections/entries/collectionname?fields[name]=all&fields[\_id]=all

* * *

There are two more methods to achieve it.

## 1

If you only want to grab a few fields, you can use [graphql addon of Cockpit called CockpitQL](https://github.com/agentejo/CockpitQL)

## 2

You can modify the entry fields with this below method.

> [@API - Username instead of id on \_by/\_mby](https://discourse.getcockpit.com/t/api-username-instead-of-id-on-by-mby/2063/4):
>
> My bad, I should have mentioned that populate only work with collectionLink. And you can’t retrieve accountLink data with collection data at the same time. Maybe it could be the security reason. Option 1 Fire one more API request with account ID to get the user data Option 2 Ref answer by raffaelj: [How to refer to another Collections or "Accounts" - #7 by raffaelj](https://discourse.getcockpit.com/t/how-to-refer-to-another-collections-or-accounts/324/7) create config directory in the root folder, under that directory create bootstrap.php file. Add the below codes. Make sure you …

---

_[View the full topic](https://discourse.getcockpit.com/t/collection-exclude-fields/2162)._
