lt & gt & lte & gte: Search Examples
The search operations lt & gt & lte & gte will search for entities where the search attribute value is greater than or lesser than the specified numerical value.
lt & gt & lte & gte should only be used to search for numerical type fields of integer or decimal
Example 1: Search for entities with value greater than value
Search:
- Use the search API: Device Search
- Match the attribute
sub_typewith the value greater than25 - Limit the number of results to 10 per page
- Return the first page
Filter object will look like this:
{
"filter": {
"sub_type": {
"gt": 25
}
},
"limit": 10,
"page": 0
}Encoded API call:
Example 2: Search for entities with value lesser than value
Search:
- Use the search API: Device Search
- Match the attribute
sub_typewith the value greater than35 - Limit the number of results to 10 per page
- Return the first page
Filter object will look like this:
{
"filter": {
"sub_type": {
"lt": 35
}
},
"limit": 10,
"page": 0
}Encoded API call:
Example 3: Search for entities with value between values
Search:
- Use the search API: Device Search
- Match the attribute
sub_typewith the value greater than or equals30and lesser than35 - Limit the number of results to 10 per page
- Return the first page
Filter object will look like this:
{
"filter": {
"sub_type": {
"gte": 30,
"lt": 35
}
},
"limit": 10,
"page": 0
}Encoded API call:
Updated about 1 month ago
