# Filter collection entries by collection link

**URL:** <https://discourse.getcockpit.com/t/filter-collection-entries-by-collection-link/262>\
**Category:** Support\
**Created:** [September 12, 2018, 4:25pm UTC](https://discourse.getcockpit.com/t/filter-collection-entries-by-collection-link/262 "2018-09-12T16:25:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [September 24, 2018, 7:16pm UTC](https://discourse.getcockpit.com/t/filter-collection-entries-by-collection-link/262/2 "2018-09-24T19:16:57Z")

</div>

get request:  
`https://url/to/cockpit/api/collections/get/test?token=xxtokenxx&filter[link.display]=test`

post request:  
`{"filter":{"link.display":"test"}}`

Avoid whitespaces and linebreaks in json bodies.

This should work. If not, have a look at

> [@Filtering on a collectionlink](https://discourse.getcockpit.com/t/filtering-on-a-collectionlink/197):
>
> Hi, How to filter on a collection link? I tried: { “filter”: { “categories”: { “$elemMatch”: { “name”: “images” } } }, “populate”: 1 } { “filter”: { “categories”: { “name”: “images” } }, “populate”: 1 } { “filter”: { “categories”: { “\_id”: “5a9506efec401doc1908157538” } }, “populate”: 1 } But without any results I get: { “error”: true, “message”: “Condition not valid … Use name for custom operations” } as a reply Thanks in advance

---

_[View the full topic](https://discourse.getcockpit.com/t/filter-collection-entries-by-collection-link/262)._
