Is it possible to filter kontent results (delivery api) by linked item type

Lucinda Harrison asked on May 19, 2020 10:03

Is it possible to filter and only bring back content items what have a linked-item of type x e.g.

I have 3 content type A, B, and C

A has a field called subItems which takes either content type A, B or C

How would I construct a query for content-items that have at least one subItem of Content-type B

Recent Answers


Jan Hermann answered on May 19, 2020 14:13

Hi Lucinda,

there is no filtering option to directly filter linked items by their type since only codename is stored along with that linked item element value. I would recommend to get all parent items (usually all items of some type - the type that contains that linked item element) and perform filtering on application layer -> iterating through all linked items of retrieved items and if their type is B, then keep the parent item.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.