in & notIn: Search Examples
The search operations in
& notIn
will search for entities where the search attribute value is in or not in an array of values.
Example 1: Search for entities with value in an array of values
Search:
- Use the search API: Device Search
- Match the attribute
_id
with the values ofR21468772
andR21407203
- Limit the number of results to 10 per page
- Return the first page
Filter object will look like this:
{
"filter": {
"_id": {
"in": ["R21468772", "R21407203"]
}
},
"limit": 10,
"page": 0
}
Encoded API call:
Example 2: Search for entities with value not in an array of values
Search:
- Use the search API: Device Search
- Match the attribute
_id
with the values that are notR21468772
orR21407203
- Limit the number of results to 10 per page
- Return the first page
Filter object will look like this:
{
"filter": {
"_id": {
"notIn": ["R21468772", "R21407203"]
}
},
"limit": 10,
"page": 0
}
Encoded API call:
Updated about 1 year ago