Requests per hour
Access the average number of user messages within days of the week by executing:
query MessagesPerHourV2(
$deskIds: _uuid
$brainIds: _uuid
$integrationIds: _uuid
$brainVersions: _int4
$channels: _text
$startDate: timestamp
$endDate: timestamp
$isTest: Boolean
) {
rows: requests_hourly_counts_v2(
args: {
desk_ids: $deskIds
brain_parent_ids: $brainIds
integration_ids: $integrationIds
brain_versions: $brainVersions
channels: $channels
start_time: $startDate
end_time: $endDate
is_test: $isTest
}
) {
counts
weekday
hour
}
}
Below are some examples of how MessagesPerHourV2
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"
}
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c, 51ff88a7-dfab-44e5-9303-9b2bf13f1c94}",
"startDate": "2022-04-08",
"endDate": "2022-04-17"
}
{
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c, 99xx33p9-dfab-44e5-9303-9b2bf13f1c94}",
"startDate": "2022-04-08",
"endDate": "2022-04-17"
}
{
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c}",
"brainVersions": "{37,38,39}",
"startDate": "2022-04-08",
"endDate": "2022-04-17"
}
{
"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"
}
{
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c}",
"isTest": false,
"startDate": "2022-04-08",
"endDate": "2022-04-17"
}
Example Result:
{
"data": {
"rows": [
{
"counts": 18,
"weekday": 2,
"hour": 16
},
{
"counts": 10,
"weekday": 5,
"hour": 10
},
{
"counts": 10,
"weekday": 2,
"hour": 15
},
{
"counts": 7,
"weekday": 5,
"hour": 13
},
{
"counts": 6,
"weekday": 1,
"hour": 9
},
{
"counts": 6,
"weekday": 2,
"hour": 18
},
{
"counts": 5,
"weekday": 4,
"hour": 13
},
{
"counts": 4,
"weekday": 3,
"hour": 15
},
{
"counts": 4,
"weekday": 3,
"hour": 17
},
{
"counts": 4,
"weekday": 2,
"hour": 19
},
{
"counts": 3,
"weekday": 2,
"hour": 17
},
{
"counts": 3,
"weekday": 4,
"hour": 16
},
{
"counts": 3,
"weekday": 5,
"hour": 8
},
{
"counts": 3,
"weekday": 1,
"hour": 14
},
{
"counts": 3,
"weekday": 1,
"hour": 12
},
{
"counts": 3,
"weekday": 4,
"hour": 7
},
{
"counts": 3,
"weekday": 4,
"hour": 9
},
{
"counts": 2,
"weekday": 1,
"hour": 11
},
{
"counts": 2,
"weekday": 2,
"hour": 13
},
{
"counts": 2,
"weekday": 1,
"hour": 10
},
{
"counts": 2,
"weekday": 4,
"hour": 12
},
{
"counts": 1,
"weekday": 3,
"hour": 14
},
{
"counts": 1,
"weekday": 1,
"hour": 13
},
{
"counts": 1,
"weekday": 1,
"hour": 8
},
{
"counts": 1,
"weekday": 4,
"hour": 8
},
{
"counts": 1,
"weekday": 4,
"hour": 15
}
]