Event Multi Query - Flipkart/foxtrot GitHub Wiki
The multi_query_ analytics is used to filter and search for events. The request supports pagination. Multiple requests can be executed as part of one request
Parameters
- opcode - multi_query (Required) - Operation code for this analytics
- requests - Map of requests (Required). Key would be used as an identifier in response and value would be any other foxtrot request
Sample Request (With Filter)
The following will execute two queries within one request
{
"opcode": "multi_query",
"requests": {
"Key1": {
"opcode": "trend",
"table": "test-app",
"filters": [
{
"field": "_timestamp",
"operator": "last",
"duration": "15minutes",
"currentTime": 1556087411377
}
],
"field": "eventType",
"period": "minutes"
},
"Key2": {
"opcode": "group",
"table": "test",
"filters": [
{
"field": "event",
"operator": "equals",
"value": "APP_LOAD"
}
],
"nesting": [
"os",
"version"
]
}
}
}
Sample Response
{
"opcode": "multi_query",
"responses": {
"Key1": {
"opcode": "trend",
"trends": {
"E1": [
{
"period": 1556087220000,
"count": 1
}
]
}
},
"Key2": {
"opcode": "group",
"result": {
"android": {
"3.2": 2019,
"4.3": 299430,
"4.4": 100000032023
},
"ios": {
"6": 12281,
"7": 23383773637
}
}
}
}
}