Session counts per interval
Access the number of sessions per interval (i.e per day) by executing:
query LogsSessionsIntervalV2(
$deskIds: _uuid
$brainIds: _uuid
$integrationIds: _uuid
$brainVersions: _int4
$channels: _text
$startDate: timestamp
$endDate: timestamp
$intervalInDays: interval
$isContained: Boolean
$isCovered: Boolean
$isTest: Boolean
$agentIds: _text
) {
rows: log_sessions_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_contained: $isContained
is_covered: $isCovered
is_test: $isTest
agent_ids: $agentIds
}
) {
counts: interval_counts
date: per_interval
}
}
Below are some examples of how LogsSessionsIntervalV2
can be called.
- Single Desk
- Multiple Desks
- Multiple Brains
- Brain Versions
- Specific Channels
- Contained & Covered
- 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}",
"isCovered": false,
"isContained": true,
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"intervalInDays": "1 day"
}
{
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c}",
"isCovered": false,
"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"
}
]