4

Is it possible to do a IS NOT in a http query string, so send IS NOT as an operator in a GET request as query params?
So something similar to:

api/v1/users?firstName!=John&lastName!=Doe
Wilt
  • 41,477
  • 12
  • 152
  • 203

1 Answers1

3

Thou who searches will find:

Here an answer to a question on similar topic that suggests to add an operator param for the field.

api/v1/students?firstName=John&firstNameOperator=!%3D&lastName=Doe&lastNameOperator=!%3D

The operator field value !%3D is URL-encoded !=.
Like this you can send any other operator:

!=   -  !%3D
<    -  %3C 
>    -  %3E 
<=   -  %3C%3D 
>=   -  %3E%3D
Community
  • 1
  • 1
Wilt
  • 41,477
  • 12
  • 152
  • 203