Rest API filter collection "not null" or "not empty" collection link


#1

Hello,

I have a collection where I have 2 collection link attribute :

  • objLink1
  • objLink2

I want to get all collection item where objLink1 is set and objLink2 is not set.

Is i possible with filter ?

Thanks you.
Regards.


#2
filter: {
  objLink1:{$exists:true},
  objLink2:{$exists:false}
}

#3

Hello !

Thanks you, but, do you has the correct syntax with GET request like :
/api/collections/get/my-collection?filter[objLink1][$exists]=true

?

It’s seems not the good syntax.

Thanks you.
Regards.