List Active Users

Retrieve the metrics of active users in the workspace during a specific period.

It requires view-engagement-dashboard permission.

Query Parameter

Example Call

curl --location 'http://localhost:3000/api/v1/engagement-dashboard/users/new-users?start=2011-10-05T14%3A48%3A00.000Z&end=2023-10-05T14%3A48%3A00.000Z' \
--header 'x-auth-token: GENgWDE3-KV1BvVbnIOvpTq5RhJOQQr4XKCAsVLtFYu' \
--header 'x-user-id: 2tTEqR7ZNMJ4HGGNa'

Example Result

Success

{
    "month": [
        {
            "usersList": [
                "rYhzFRd2QZjNwAAXX"
            ],
            "users": 1,
            "day": 5,
            "month": 5,
            "year": 2023
        },
        {
            "usersList": [
                "rYhzFRd2QZjNwAAXX"
            ],
            "users": 1,
            "day": 4,
            "month": 5,
            "year": 2023
        },
        {
            "usersList": [
                "rYhzFRd2QZjNwAAXX"
            ],
            "users": 1,
            "day": 3,
            "month": 5,
            "year": 2023
        },
        {
            "usersList": [
                "rYhzFRd2QZjNwAAXX"
            ],
            "users": 1,
            "day": 2,
            "month": 5,
            "year": 2023
        },
        {
            "usersList": [
                "rbAXPnMktTFbNpwtJ"
            ],
            "users": 1,
            "day": 1,
            "month": 5,
            "year": 2023
        },
        {
            "usersList": [
                "rYhzFRd2QZjNwAAXX"
            ],
            "users": 1,
            "day": 29,
            "month": 4,
            "year": 2023
        },
        {
            "usersList": [
                "rYhzFRd2QZjNwAAXX"
            ],
            "users": 1,
            "day": 28,
            "month": 4,
            "year": 2023
        },
        {
            "usersList": [
                "rYhzFRd2QZjNwAAXX",
                "hFDuCPam7sWziWFYa"
            ],
            "users": 2,
            "day": 27,
            "month": 4,
            "year": 2023
        },
        {
            "usersList": [
                "rbAXPnMktTFbNpwtJ"
            ],
            "users": 1,
            "day": 26,
            "month": 4,
            "year": 2023
        },
        {
            "usersList": [
                "rbAXPnMktTFbNpwtJ"
            ],
            "users": 1,
            "day": 24,
            "month": 4,
            "year": 2023
        },
        {
            "usersList": [
                "rbAXPnMktTFbNpwtJ",
                "rYhzFRd2QZjNwAAXX"
            ],
            "users": 2,
            "day": 21,
            "month": 4,
            "year": 2023
        },
        {
            "usersList": [
                "rYhzFRd2QZjNwAAXX"
            ],
            "users": 1,
            "day": 19,
            "month": 4,
            "year": 2023
        },
        {
            "usersList": [
                "rbAXPnMktTFbNpwtJ",
                "rYhzFRd2QZjNwAAXX"
            ],
            "users": 2,
            "day": 18,
            "month": 4,
            "year": 2023
        },
        {
            "usersList": [
                "rbAXPnMktTFbNpwtJ",
                "9iN96PXnDK7XAYESA"
            ],
            "users": 2,
            "day": 17,
            "month": 4,
            "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

Last updated

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