Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
84 lines (73 loc) · 2.54 KB

File metadata and controls

84 lines (73 loc) · 2.54 KB

Get Number of Chats

Gives the number of chat rooms by department.

HTTP MethodURLRequires Auth
GET/api/v1/livechat/analytics/departments/amount-of-chatsyes

{% hint style="info" %} Permission required: view-livechat-manager {% endhint %}

Query Parameters

This endpoint supports the offset and count parameters from the #paginationquery parameters. The other parameters are as follows:

KeyExample ValueDescription
start*2020-09-09T00:11:22.345ZThe start date.
end*2021-09-10T23:59:22.345ZThe end date.

Example Call

{% code overflow="wrap" %}

curl --location --request GET 'http://localhost:3000/api/v1/livechat/analytics/departments/amount-of-chats?start=2020-01-10T23:59:22.345Z&end=2021-02-10T23:59:22.345Z \
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'

{% endcode %}

Example Response

{
    "departments": [
        {
            "rooms": 30,
            "_id": null
        },
        {
            "rooms": 486,
            "_id": "GgYvrkAF63aeQmsh4"
        },
        {
            "rooms": 13,
            "_id": "qajzu7WaBRoQBpq6Z"
        },
        {
            "rooms": 2,
            "_id": "Z2KWYBJQFR7AzfmQL"
        },
        {
            "rooms": 61,
            "_id": "BiqbQav59HD2LzXEY"
        },
        {
            "rooms": 1,
            "_id": "NJaMpSvZFZ4NAXm3j"
        },
        {
            "rooms": 181,
            "_id": "CAJioQNAvLnYWTy8i"
        },
        {
            "rooms": 6,
            "_id": "YiWdMkdbFhk3o9daf"
        },
        {
            "rooms": 10,
            "_id": "8MGLTfaKLCbE9CqR8"
        },
        {
            "rooms": 4,
            "_id": "MpAiP9PMyHwBcmALx"
        },
        {
            "rooms": 51,
            "_id": "Yi87Ju7eTHiZQ7CJt"
        }
    ],
    "count": 11,
    "offset": 0,
    "total": 11,
    "success": true
}