Retrieve Daily Active Users Report API

On this page

This report includes the number of daily active users for a given application or across all applications. You must specify a date range for the report. true

Request#

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

Query Parameters#

applicationId
  • Type: UUID
  • Optional

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

end
  • Type: Long
  • Required

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

start
  • Type: Long
  • Required

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

loginIdTypes
  • Type: Array<String>
  • Optional
  • Defaults 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
Note

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 daily active users report.

Response Codes
CodeDescription
200The request succeeded. The response contains a JSON body.
400The request was invalid or malformed. The response contains an Errors JSON object with the specific errors. FusionAuth also returns a 400 when the request needs a paid FusionAuth license and no license is present.
401FusionAuth didn't authorize the request. The Authorization header is missing, the API key isn't valid, or the API key doesn't have permission for this endpoint and method. The response is empty. For more information, see Unauthorized Responses.
404The object you requested doesn't exist. The response is empty.
500FusionAuth had an internal error and logged a stack trace in the FusionAuth log files. The response is empty.
503The search index is unavailable or returned an error, so FusionAuth can't complete the request. The response contains a JSON body.

Response Body#

dailyActiveUsers

The list of daily active users counts.

dailyActiveUsers[x].interval
  • Type: Integer

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

dailyActiveUsers[x].count
  • Type: Integer

The number of daily active users for this count.

total
  • Type: Integer

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

Example Response JSON
{
  "total": 30,
  "dailyActiveUsers": [
    {
      "interval": 16739,
      "count": 10
    },
    {
      "interval": 16740,
      "count": 10
    },
    {
      "interval": 16741,
      "count": 10
    }
  ]
}