Skip to main content

Sessions Counts

Access the number of sessions

query SessionsCounts(
$accountId: uuid
$deskIds: _uuid
$brainIds: _uuid
$integrationIds: _uuid
$brainVersions: _int4
$channels: _text
$startDate: timestamp
$endDate: timestamp
$isContained: Boolean
$isCovered: Boolean
$isTest: Boolean
$minNumUserMessages: Int
$agentIds: _text
$tags: _text
$events: _text
) {
rows: sessions_counts(
args: {
account_id: $accountId
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
min_num_user_messages: $minNumUserMessages
agent_ids: $agentIds
tags: $tags
events: $events
) {

Below are some examples of how SessionsCounts can be called.

"accountId": "991c12a1-cc58-4377-8e37-f72259e9dac1",
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c, 99xx33p9-dfab-44e5-9303-9b2bf13f1c94}",
"startDate": "2023-04-08",
"endDate": "2023-04-17"

Example Result:

"data": {
"rows": [
"counts": 15000