This topic provides the syntax for the <filters> element of a Query API SOAP request.
The <filters> element defines a filter to be placed on a property or dimension property of an event. When a <filters> element is defined for a property, only events that meet the criteria of the <filters> element will be returned. There may be multiple <filters> elements.
There are six elements contained by the <filters> element:
Element | Description |
---|---|
<dimension> | The name of a dimension to be filtered. Each <filters> element may have at most one <dimension> element. |
<property> | The name of a property associated with the dimension. Each <filters> element must have one and only one <property> element. |
<operator> | The method of comparison to use between the <property> and the <values>. There must be one and only one <operator> element. For details on the values used by the <operator> element, see the following table. |
<values> | The values to which each event will be compared to, as dictated
by the <operator> element. There may be one or
more <values> elements, and they may be of any
type. The type must be specified in the attributes of the element.
For example:<values xmlns:xs= "http://www.w3.org/2001/XMLSchema" xmlns:xsi= "http://www.w3.org/ 2001/XMLSchema-instance" xsi:type="xs:string"> Reports </values> |
<ranking> | The ranking method to use. This element is optional. The values
for this element are:
|
<rankingCount> | The number of top or bottom values to return. This element is only required when you use the <ranking> element. |
Value | Description |
---|---|
1 | Equals. The event is included in the results if the <property> is equal to the <values>. Only one <values> element may be used. |
2 | Not equals. The event is included in the results if the <property> is not equal to the <values>. Only one <values> element may be used. |
3 | Greater than. The event is included in the results if the <property> is greater than the <values>. Only one <values> element may be used. |
4 | Greater than or equal to. The event is included in the results if the <property> is greater than or equal to the <values>. Only one <values> element may be used. |
5 | Less than. The event is included in the results if the <property> is less than the <values>. Only one <values> element may be used. |
6 | Less than or equal to. The event is included in the results if the <property> is less than or equal to the <values>. Only one <values> element may be used. |
7 | Contains. The event is included in the results if the <property> contains the substring in <values>. Only one <values> element may be used. The <property> must be of type string. |
8 | Does not contain. The event is included in the results if the <property> does not contain the substring in <values>. Only one <values> element may be used. The <property> must be of type string. |
9 | In. The event is included in the results if the <property> is equal to one of the <values>. Multiple <values> may be used. |
10 | Not in. The event is included in the results if the <property> is not equal to any of the <values>. Multiple <values> may be used. |
11 | Starts with. The event is included in the results if the <property> starts with the substring in <values>. Only one <values> element may be used. The <property> must be of type string. |
12 | Ends with. The event is included in the results if the <property> ends with the substring in <values>. Only one <values> element may be used. The <property> must be of type string. |