List New Users

Retrieve the metrics of newly registered users during a specific period.

It requires view-engagement-dashboard permission.

URLRequires AuthHTTP Method

/api/v1/engagement-dashboard/users/new-users

yes

GET

Query Parameter

ArgumentExampleRequiredDescription

start

2011-10-05T14:48:00.000Z

Required

The start date.

end

2023-10-05T14:48:00.000Z

Required

The end date.

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: HF0U3GBQHzC0pL_f_XXFHEfgXR8041XGldg2m_z8JQ0' \
--header 'x-user-id: rbAXPnMktTFbNpwtJ'

Example Result

Success

{
    "days": [
        {
            "day": "2023-05-23T00:00:00.000Z",
            "users": 2
        },
        {
            "day": "2023-05-16T00:00:00.000Z",
            "users": 1
        },
        {
            "day": "2023-05-12T00:00:00.000Z",
            "users": 1
        },
        {
            "day": "2023-05-11T00:00:00.000Z",
            "users": 1
        },
        {
            "day": "2023-03-31T00:00:00.000Z",
            "users": 1
        },
        {
            "day": "2023-03-28T00:00:00.000Z",
            "users": 2
        },
        {
            "day": "2023-03-13T00:00:00.000Z",
            "users": 1
        },
        {
            "day": "2023-03-07T00:00:00.000Z",
            "users": 2
        },
        {
            "day": "2023-03-02T00:00:00.000Z",
            "users": 2
        },
        {
            "day": "2023-02-20T00:00:00.000Z",
            "users": 4
        },
        {
            "day": "2023-02-09T00:00:00.000Z",
            "users": 1
        },
        {
            "day": "2023-02-06T00:00:00.000Z",
            "users": 6
        },
        {
            "day": "2023-02-01T00:00:00.000Z",
            "users": 1
        },
        {
            "day": "2023-01-24T00:00:00.000Z",
            "users": 1
        },
        {
            "day": "2023-01-17T00:00:00.000Z",
            "users": 1
        }
    ],
    "period": {
        "count": 27,
        "variation": 27
    },
    "yesterday": {
        "count": 0,
        "variation": 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: 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.