# Limit API response to specific field across entire collection

**URL:** <https://discourse.getcockpit.com/t/limit-api-response-to-specific-field-across-entire-collection/773>\
**Category:** Support\
**Created:** [April 25, 2019, 1:01am UTC](https://discourse.getcockpit.com/t/limit-api-response-to-specific-field-across-entire-collection/773 "2019-04-25T01:01:09Z")\
**Posts on this page:** 2\
**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:** [April 25, 2019, 1:01am UTC](https://discourse.getcockpit.com/t/limit-api-response-to-specific-field-across-entire-collection/773/1 "2019-04-25T01:01:09Z")

</div>

If I have a collection, and I only want to return the field “name” across the entire collection - is that possible?

For example, let’s say I have the following collection and fields:

employees

- name
- job title
- phone
- email

Instead of the entire object for the collection “employees” can I return only the field “name” for each entry?

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [April 25, 2019, 6:16pm UTC](https://discourse.getcockpit.com/t/limit-api-response-to-specific-field-across-entire-collection/773/2 "2019-04-25T18:16:05Z")

</div>

Of course. Send `{"fields":{"name":true,"_id":false}}` with your request. If you don’t set \_id to false, it always sends the id field, too.

[https://getcockpit.com/documentation/api/collections](https://getcockpit.com/documentation/api/collections)
