Retrieve Monthly Active Users Report

This report includes the number of monthly active users for a given application or across all applications. You must specify a date range for the report. The report is always calculated using months as the interval.

Request#

Global API Key Authentication
Retrieve the monthly active users report
GET/api/report/monthly-active-user?start={start}&end={end}&applicationId={applicationId}
OpenAPI Spec

Request Parameters#

applicationIdUUIDoptional

A specific application to query for. If not provided a "Global" (across all applications) monthly active users report will be returned.

endLongrequired

The end of the query range. This is an instant but it is truncated to months in the report timezone (which is set in the system settings).

startLongrequired

The start of the query range. This is an instant but it is truncated to months in the report timezone (which is set in the system settings).

loginIdTypesArray<String>optionalDefaults to [email, username]Available since 1.59.0

The identity types that FusionAuth will compare the loginId to. Can be one or more of the following:

  • email
  • phoneNumber
  • username
The order is significant. If ["email", "username"] is supplied with a loginId value of terry@example.com, then a user with terry@example.com as their email address will match first before any user with terry@example.com as their username.

Response#

The response for this API contains the monthly active users report.

Response Codes
CodeDescription
200The request was successful. The response will contain a JSON body.
400The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present.
401You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See Authentication.
404The object you requested doesn't exist. The response will be empty.
500There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty.
503The search index is not available or encountered an exception so the request cannot be completed. The response will contain a JSON body.

Response Body#

monthlyActiveUsers

The list of monthly active users counts.

monthlyActiveUsers[x].intervalInteger

The interval for this count. The interval values for the monthly active users report are the number of months since Epoch UTC shifted to the report timezone.

monthlyActiveUsers[x].countInteger

The number of monthly active users for this count.

totalInteger

The total (sum) of each count across the query range.

Example Response JSON

{
  "total": 39,
  "monthlyActiveUsers": [
    {
      "count": 10,
      "interval": 543
    },
    {
      "count": 10,
      "interval": 544
    },
    {
      "count": 10,
      "interval": 545
    },
    {
      "count": 9,
      "interval": 546
    }
  ]
}