isNull & isNotNull: Search Example
The search operations isNull
& isNotNull
will search for entities where the search attribute value is null/not existent or is not null.
Example 1: Search for entities with a value that is null or non existent
Search:
- Use the search API: Device Search
- Match the attribute
sub_type
with the value ofnull
- Limit the number of results to 10 per page
- Return the first page
Filter object will look like this:
{
"filter": {
"sub_type": {
"isNull": true
}
},
"limit": 10,
"page": 0
}
Encoded API call:
Example 2: Search for entities with a value that is not null
Search:
- Use the search API: Device Search
- Match the attribute
sub_type
with a value that is notnull
- Limit the number of results to 10 per page
- Return the first page
Filter object will look like this:
{
"filter": {
"sub_type": {
"isNotNull": true
}
},
"limit": 10,
"page": 0
}
Encoded API call:
Updated about 1 year ago