Rajnish_Roy | 2021-04-09 21:44:01 UTC | #1
Hello All,
As of now, I am sending post request using below Header Parameter for one QueueID and MediaType=voice. Please help me, How we can build/modify the same filter to Send request with multiple QueueID and MediType=voice.
{
"filter": {
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "20f15926-ea1d-47b0-a6e5-4be482976dad"
},
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "voice"
}
]
},
"metrics": [
"oWaiting"
]
}
anon11147534 | 2021-04-12 14:39:24 UTC | #2
Hi,
You have to create separate filter predicates for each queueId.
For example:
{
"filter":{
"type":"or",
"predicates":[
{
"type":"dimension",
"dimension":"queueId",
"operator":"matches",
"value":"20f15926-ea1d-47b0-a6e5-4be482976dad"
},
{
"type":"dimension",
"dimension":"queueId",
"operator":"matches",
"value":"49e0668f-e150-4656-842b-c06696b87d39"
},
{
"type":"dimension",
"dimension":"queueId",
"operator":"matches",
"value":"6e224dcf-9c33-462e-b8ba-a8e9d6d245a0"
},
{
"type":"dimension",
"dimension":"mediaType",
"operator":"matches",
"value":"voice"
}
]
},
"metrics":[
"oWaiting"
]
}
The analytics query builder is helpful for building these queries.
Jerome.Saint-Marc | 2021-04-12 14:38:46 UTC | #3
Hello,
Assuming you want [(queue1 or queue2 or queue3) and (mediaType = Voice)], you can use the following approach. Two clauses - (Clause1 AND Clause2) Clause1 contains a list of predicates with OR statement - for the queues Second clause contains the mediaType = voice.
{
"filter": {
"type": "and",
"clauses": [
{
"type": "or",
"predicates": [
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "xxxxxxxxx"
},
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "yyyyyyyy"
},
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "zzzzzzzzzzzzz"
}
]
},
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "voice"
}
]
}
]
},
"metrics": [
"oWaiting"
]
}
Regards,
system | 2021-05-13 14:47:42 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 10578