Event Management Service – Filtering¶
When reading events (using GET All /events api), all events are filtered for a tenant whose token is used for making a request. In addition, you can supply one or more of the following field names in the filter queries and any of your custom field which has filterable property set to true :
entityId
typeId
correlationId
timestamp
When reading events of Standard Type or any of its custom child type, you can use below additional fields in the filter query :
acknowledged
source
severity
code
Wildcards are not supported. Timestamps must be in the following format: 2018-01-01T00:00:00.00Z
When a filter has no matches, the response will be empty.
Filter functions¶
Function eq
(equals)¶
{
"name": "MyMotor"
}
or
{
"name": {
"eq": "MyMotor"
}
}
Function in
¶
The function in
is very similar to equals
, but instead matching to one value, it checks an array of values, and matches for any of them.
{
"name": {
"in": {
"value": ["MyMotor", "MyEngine"]
}
}
}
Function endsWith
¶
{
"name": {
"endsWith": "Motor"
}
}
Function startsWith
¶
{
"name": {
"startsWith": "My"
}
}
Function before
¶
{
"timestamp": {
"before": "2018-01-01T00:00:00.00Z"
}
}
Function after
¶
{
"timestamp": {
"after": "2018-01-01T00:00:00.00Z"
}
}
Function between
¶
{
"timestamp": {
"between": "[2018-01-01T00:00:00.00Z, 2018-01-31T00:00:00.00Z)"
}
}
Filter operations¶
Operation or
¶
{
"name": {
"or": [{ "eq": "MyMotor" }, { "endsWith": "Motor" }]
}
}
or
{
"or": {
"deleted": {
"eq": null
},
"name": {
"startsWith": "My"
}
}
}
Operation and
¶
{
"name": "MyMotor",
"deleted": null
}
or
{
"and": {
"deleted": {
"eq": null
},
"name": {
"startsWith": "My"
}
}
}