Waiting for engine...
Skip to main content

Query filters

QUERY filters let you use API object fields and a range of operators to customize the results of a request.

The flexible structure of QUERY filters allows you to perform complex queries. You can compose a query filter with simple expressions and by grouping expressions.

Simple expressions in query filters

A simple expression consists of:

  • A property, or field, whose value is to be tested

  • An operator, which describes the type of comparison to perform

  • Zero or more arguments

The following table lists all available operators and the acceptable number of arguments. See the specific API object topics for information about what fields you can use as query filters and the allowed operators for that object.

OperatorDescriptionNumber of Arguments
EQUALSEqual To1
LIKELike1
NOT_EQUALSNot Equal To1
IS_NULLIs Null0
IS_NOT_NULLIs Not Null0
STARTS_WITHStarts With1
BETWEENBetween2
GREATER_THANGreater Than1
GREATER_THAN_OR_EQUALGreater Than Or Equal1
LESS_THANLess Than1
LESS_THAN_OR_EQUALLess Than Or Equal1

Grouping expressions in query filters

A grouping expression contains a logical operator (AND or OR) and contains nested expressions. These can be either simple expressions or grouping expressions. The following examples illustrate a complex grouping expression.

Nested Examples

JSON

    {
"QueryFilter": {
"expression": {
"operator": "and",
"nestedExpression": [
{
"argument" : ["123"],
"operator":"EQUALS",
"property":"ABC"
},
{
"argument" : ["456", "789"],
"operator":"BETWEEN",
"property":"DEF"
},
{
"operator":"and",
"nestedExpression": [
{
"argument" : ["123"],
"operator":"GREATER_THAN",
"property":"GHI"
},
{
"argument" : ["0"],
"operator":"EQUALS",
"property":"JKL"
}
]
}
]
}
}
}

XML

<expression operator="and" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="GroupingExpression">
<nestedExpression operator="EQUALS" property="ABC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SimpleExpression">
<argument>123</argument>
</nestedExpression>
<nestedExpression operator="BETWEEN" property="DEF" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SimpleExpression">
<argument>456</argument>
<argument>789</argument>
</nestedExpression>
<nestedExpression operator="and" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="GroupingExpression">
<nestedExpression operator="GREATER_THAN" property="GHI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SimpleExpression">
<argument>123</argument>
</nestedExpression>
<nestedExpression operator="EQUALS" property="JKL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SimpleExpression">
<argument>0</argument>
</nestedExpression>
</nestedExpression>
</expression>
On this Page