Requests Counts
Access the number of user messages (requests)
query RequestsCounts(
$accountId: uuid
$deskIds: _uuid
$brainIds: _uuid
$integrationIds: _uuid
$brainVersions: _int4
$channels: _text
$startDate: timestamp
$endDate: timestamp
$isTest: Boolean
$minNumUserMessages: Int
) {
rows: requests_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_test: $isTest
min_num_user_messages: $minNumUserMessages
}
) {
counts
}
}
Below are some examples of how RequestsCounts
can be called.
- Account
- Multiple Brains
{
"accountId": "991c12a1-cc58-4377-8e37-f72259e9dac1",
"startDate": "2023-04-08",
"endDate": "2023-04-17"
}
{
"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
}
]
}
}