Get Hourly Data When Chat is Busier

Retrieve Hourly Data When Chat is Busier.

It requires view-engagement-dashboard permission.

Query Parameter

Example Call

curl --location 'http://localhost:3000/api/v1/engagement-dashboard/users/chat-busier/hourly-data?start=2023-05-T00%3A00%3A00.000Z' \
--header 'x-auth-token: HF0U3GBQHzC0pL_f_XXFHEfgXR8041XGldg2m_z8JQ0' \
--header 'x-user-id: rbAXPnMktTFbNpwtJ'

Example Result

Success

{
    "hours": [
        {
            "users": 3,
            "hour": 22
        },
        {
            "users": 3,
            "hour": 20
        },
        {
            "users": 4,
            "hour": 18
        },
        {
            "users": 2,
            "hour": 16
        },
        {
            "users": 4,
            "hour": 14
        },
        {
            "users": 4,
            "hour": 12
        },
        {
            "users": 2,
            "hour": 10
        },
        {
            "users": 1,
            "hour": 8
        },
        {
            "users": 1,
            "hour": 6
        },
        {
            "users": 1,
            "hour": 4
        },
        {
            "users": 0,
            "hour": 2
        },
        {
            "users": 0,
            "hour": 0
        }
    ],
    "success": true
}

Error

Any of the following errors can occur on the endpoint.

  • Authorization: Requires an authentication token for the request to be made.

  • No Permission: This occurs when the authenticated user doesn't have the view-engagement-dashboard permission.

  • Invalid Date: This occurs when the start or end date does not follow the accepted format ( 2023-10-05T14:48:00.000Z).

{
    "status": "error",
    "message": "You must be logged in to do this."
}

Change Log

Last updated

Rocket.Chat versions receive support for six months after release.