API query filtering by NOT EQUALS TO

Good Afternon!
I need some help in filtering my API Query.

I am trying to get Queue items that don’t belong to an specific Queue.

If i try the query looking for the ones to DO belong, using
[ochestratorURL]?$filter=QueueDefinitionId eq 90 ,
it goes perfect.

When I try the opposite action, I use the ‘neq’ expression:
[ochestratorURL]?$filter=QueueDefinitionId neq 90

I get a generic error…“Internal server error”.

Which sintax am I supposed to use?

Thanks in advance, it will save me a lot of hours of processing items manually at work…

Charo

1 Like

Hi @rmadrigal,

You need to use ‘ne’ instead of ‘neq’ in your query. This might solve your problem.

Best,
Sid

4 Likes

Thanks, perfect!
One last question if is not too much…

How could i exclude a group of values? like in SQL, “NOT IN (value1, value2…)”

Thanks and best regards. ANd thanks again. It worked perfectly!

Hi @rmadrigal,

Select * from tablename where Name not in(‘aaa’,‘bbb’,‘ccc’)

Regards,
Arivu

You can pass the values in the query by using AND or OR operators in your filtering like, var1 ne ‘Value1’ and var1 ne ‘Value2’…

1 Like