# Can somebody explain the 'fields' parameter

**URL:** <https://discourse.getcockpit.com/t/can-somebody-explain-the-fields-parameter/2169>\
**Category:** Uncategorized\
**Created:** [December 3, 2021, 11:47am UTC](https://discourse.getcockpit.com/t/can-somebody-explain-the-fields-parameter/2169 "2021-12-03T11:47:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thepurpleblob](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/thepurpleblob/32/960_2.png) [@thepurpleblob](https://discourse.getcockpit.com/u/thepurpleblob)\
**Post date:** [December 3, 2021, 11:47am UTC](https://discourse.getcockpit.com/t/can-somebody-explain-the-fields-parameter/2169/1 "2021-12-03T11:47:53Z")

</div>

In the API docs for getting all items in a Collection. The more advanced POST version has a bunch of example parameters.

What does this mean - fields: {fieldA: 1, fieldB: 1},

…to be more precise, what do the 1s mean? I just want to return a subset of the available fields in this case.

---

<div class="post-metadata">

**Author:** ![tubstrr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/tubstrr/32/965_2.png) [@tubstrr](https://discourse.getcockpit.com/u/tubstrr)\
**Post date:** [December 6, 2021, 1:20pm UTC](https://discourse.getcockpit.com/t/can-somebody-explain-the-fields-parameter/2169/2 "2021-12-06T13:20:25Z")

</div>

Was just doing some digging myself, and stumbled on this [thread](https://discourse.getcockpit.com/t/any-way-to-apply-a-filter-with-multiple-values-via-a-url-api-call/1051/4_).

> [raffaelj](https://discourse.getcockpit.com/u/raffaelj)  
> Your response will only have “fieldA” and “fieldB” (and “\_id”), “fieldC” etc. will be skipped. The `1` means `true` . In the post body, you can write it in boolen, the get request needs 1 or 0.
