Skip to content

Event Multi Time Query

Nitish Goyal edited this page Apr 24, 2019 · 1 revision

The multi_time_query_analytics is used to filter and search for events. The request supports pagination. The same request can be executed over different time intervals.

Parameters

  • opcode - multi_query (Required) - Operation code for this analytics
  • skipDuration - skipDuration (Required) - Time skip between each time interval of query execution
  • sampleSize - sampleSize (Required) - Number of times, query will be executed with a skip interval of skipDuration
  • filters - Array of filters (Optional) (default - no filters)
  • actionRequest - Foxtrot action request (Required) - Each action request should have a field _timestamp with operator as between. This request would be executed for n sampleSize with skipDuration provided above

Sample Request (With Filter)

The following query will be executed 4 times and for 4 consecutive days in past. It would be executed for 12th, 14th, 16th, 18th Feb for time duration of 12 pm to 1pm

{
  "opcode": "multi_time_query",
  "skipDuration": "2d",
  "sampleSize": 4,
  "filters": [],
  "actionRequest": {
    "opcode": "trend",
    "table": "test",
    "filters": [
      {
        "field": "eventType",
        "operator": "equals",
        "value": "APP_LOAD"
      },
  
      {
        "field": "_timestamp",
        "operator": "between",
        "temporal": true,
        "from": 1550471403000,
        "to": 1550475000000
      }
    ],
    "field": "status",
    "period": "hours"
  }
}