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

Latest commit

 

History

History
52 lines (41 loc) · 2.03 KB

File metadata and controls

52 lines (41 loc) · 2.03 KB

Get Average Chat Duration

Returns the average chat duration of each department.

HTTP MethodURLRequires Auth
GET/api/v1/livechat/analytics/departments/average-chat-duration-timeyes

{% 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*2020-09-10T23:59:22.345ZThe end date.

Example Call

{% code overflow="wrap" %}

curl --location --request GET 'http://localhost:3000/api/v1/livechat/analytics/analytics/departments/average-chat-duration-time?start=2020-02-12T00:11:22.345Z&end=2020-02-18T23:59:22.345Z' \
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'

{% endcode %}

Example Response

{
    "departments": [
        {
            "_id": null,
            "averageChatDurationTimeInSeconds": 1102309
        },
        {
            "_id": "64cf6c6feb07a913d946f34d",
            "averageChatDurationTimeInSeconds": 3314449
        },
        {
            "_id": "64181a0728384134ed600dcc",
            "averageChatDurationTimeInSeconds": 174296
        }
    ],
    "count": 3,
    "offset": 0,
    "total": 3,
    "success": true
}