Get Weekly Data When Chat is Busier

Retrieves weekly data when chat is busier.

It requires view-engagement-dashboard permission.

URLRequires AuthHTTP Method

/api/v1/engagement-dashboard/users/chat-busier/weekly-data

yes

GET

Query Parameter

ArgumentExampleRequiredDescription

start

2023-05-19T00:00:00.000Z

Required

The start date. It retrieves data for one week prior to the specified start date.

Example Call

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

Example Result

Success

{
    "month": [
        {
            "users": 1,
            "day": 19,
            "month": 5,
            "year": 2023
        },
        {
            "users": 3,
            "day": 16,
            "month": 5,
            "year": 2023
        },
        {
            "users": 3,
            "day": 15,
            "month": 5,
            "year": 2023
        },
        {
            "users": 2,
            "day": 14,
            "month": 5,
            "year": 2023
        },
        {
            "users": 2,
            "day": 13,
            "month": 5,
            "year": 2023
        },
        {
            "users": 4,
            "day": 12,
            "month": 5,
            "year": 2023
        }
    ],
    "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

VersionDescription

3.1.0

Added

Last updated

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