Request counts per interval
Access the number of user requests (messages) per interval (i.e per day) by executing:
query LogRequestsIntervalV2(
$deskIds: _uuid
$brainIds: _uuid
$integrationIds: _uuid
$brainVersions: _int4
$channels: _text
$startDate: timestamp
$endDate: timestamp
$intervalInDays: interval
$isTest: Boolean
) {
rows: log_requests_interval_counts_v2(
args: {
interval_span: $intervalInDays
start_time: $startDate
end_time: $endDate
brain_parent_ids: $brainIds
desk_ids: $deskIds
integration_ids: $integrationIds
brain_versions: $brainVersions
channels: $channels
is_test: $isTest
}
) {
counts: interval_counts
date: per_interval
}
}
Below are some examples of how LogRequestsIntervalV2
can be called.
- Single Desk
- Multiple Desks
- Multiple Brains
- Brain Versions
- Specific Channels
- Remove Test Sessions
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"intervalInDays": "1 day"
}
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c, 51ff88a7-dfab-44e5-9303-9b2bf13f1c94}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"intervalInDays": "1 day"
}
{
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c, 99xx33p9-dfab-44e5-9303-9b2bf13f1c94}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"intervalInDays": "1 day"
}
{
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c}",
"brainVersions": "{37,38,39}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"intervalInDays": "1 day"
}
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c}",
"channels": "{web, facebook, viber}",
"brainVersions": "{37,38,39}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"intervalInDays": "1 day"
}
{
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c}",
"isTest": false,
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"intervalInDays": "1 day"
}
Example Result
{
"data": {
"rows": [
{
"counts": 1,
"date": "2022-03-14T00:00:00"
},
{
"counts": 6,
"date": "2022-04-18T00:00:00"
},
{
"counts": 21,
"date": "2022-03-22T00:00:00"
},
{
"counts": 8,
"date": "2022-04-04T00:00:00"
},
{
"counts": 3,
"date": "2022-03-21T00:00:00"
},
{
"counts": 13,
"date": "2022-03-31T00:00:00"
},
{
"counts": 10,
"date": "2022-04-01T00:00:00"
},
{
"counts": 22,
"date": "2022-03-15T00:00:00"
},
{
"counts": 7,
"date": "2022-03-18T00:00:00"
}
]