Filters
The filter parameter narrows down the results by combining the filter attribute name, filter operator, and filter value. They are applied as a list of dictionaries, each representing a separate filter. Each individual filter contains three keys: attribute, operator, and value in the dictionary.
Single filter sample:
filters=[{"attribute":"Attribute Name","operator":"Operator Name","value":"Filter value"}]
Multiple filter sample:
filters=[{"attribute":"Attribute Name","operator":"Operator Name","value":"Filter value"},
{"attribute":"Attribute Name","operator":"Operator Name","value":"Filter value"}]
Filter operators
Integer Filter/Float Operators
These operators can only be used with filter attributes that are of type integer or float.
Operator Name | Operator Meaning | Operator Data Value Type |
greater | > | Integer/Float |
less | < | Integer/Float |
greater_or_equal | >= | Integer/Float |
less_or_equal | <= | Integer/Float |
String Filter Operators
These operators can only be used with filter attributes that are of type string.
Operator Name | Operator Meaning | Operator Data Value Type |
equal | = | String |
not_equal | != | String |
in | ∈ | List/Array of string |
not_in | ∉ | List/Array of string |
contains | Contain substring | String |
not_contains | Does not Contain substring | String |
List Filter Operators
These operators can only be used with filter attributes that are of type list of strings. The only attribute utilized in list operators is session_screen_list.
Operator Name | Operator Symbol | Operator Data Value Type |
has_any | ∈ | List/Array of string |
not_has_any | ∉ | List/Array of string |
DateTime Filter Operators
These operators can only be used with filter attributes that are of type DateTime. By default, the response will display data from the last 30 days.
Note: Uxcam Data Access APIs support ISO-8601 format (zulu format)
Example: 2023-01-01, 2023-01-01T11:23:12Z
Operator Name | Operator Symbol | Operator Data Value Type |
on | = | DateTime String |
not_on | != | DateTime String |
after | > | DateTime String |
before | < | DateTime String |
between_dates | between_dates | Dictionary {“lower”: “lower date”, “upper”:”upper_date”} |
Filters are valid for all User Data categories, Session Data categories, and Event Data categories having attribute data type (string, integer, bool, Json, and DateTime)
In case of Attribute data type JSON filters need to be passed in the given format below. There are two data attributes having JSON type user_custom_property and event_custom_property
filters=[{"attribute":"user_custom_property","operator":
"<Operator Name>","property_name":"<custom property Name>","value":"<property value>"}]
filters=[{"attribute":"event_custom_property","operator":
"<Operator Name>","property_name":"<custom property Name>","value":"<property value>"}]
Example: [Link]