Empathy Stats API V2 - Reports - Top Queries

Empathy Stats API V2 - Reports - Top Queries

This report calculate the top queries in the system for the selected date range and within the mandatory set of pivots.

Report ID: TopQueries

Input parameters (see common parameters)

Parameter name

Type

Required

Description

Default Value

Parameter name

Type

Required

Description

Default Value

top_k

int

Number of results by group of pivots

10

top_pct

float

For each group of pivots percentile of values to return

0

offset

int

The number of results to omit (from the start of the result set)

0

rows

int

Number of results to return

50

evol

bool

Calculate the evolution for some of the fields in the response

False

pivots

list[str]

Group results by this values

None

group

int

Return results grouped by pivots (false, true)

false

type

int

Type of queries to return (0: all, 1: queries w/results, 2: queries wo/results)

0

Notes: top_k and top_pct params works together and the max. number of results to return is the minimum value between top_k and results over top_pct.

Responses

200 - successful information retrieve

Type: application/json
{ "data": [ { "terms": "camisetas", "query_count": 1, "filters": [ { "filter": "user_type", "values": [ "recurrent" ] }, { "filter": "scope", "values": [ "mobile" ] }, { "filter": "lang", "values": [ "0" ] }, { "filter": "store", "values": [ "example" ] } ] }, { "terms": "camiseta", "query_count": 1, "filters": [ { "filter": "user_type", "values": [ "recurrent" ] }, { "filter": "scope", "values": [ "desktop" ] }, { "filter": "lang", "values": [ "de" ] }, { "filter": "store", "values": [ "example" ] } ] } ], "params": { "site_id": "sample", "start_date": 1506816000000, "end_date": 1513551600000, "filters": [], "offset": 0, "rows": 10, "evol": false, "top_k": 10, "pivots": [ "lang" ], "group": false, "top_pct": 0, "type": 0 } }