Class StatsEntity

java.lang.Object
com.auth0.client.mgmt.StatsEntity

public class StatsEntity extends Object
Class that provides an implementation of the Stats methods of the Management API as defined in https://auth0.com/docs/api/management/v2#!/Stats

This class is not thread-safe.

See Also:
  • Field Details

    • client

      protected final Auth0HttpClient client
    • baseUrl

      protected final okhttp3.HttpUrl baseUrl
    • tokenProvider

      protected final TokenProvider tokenProvider
  • Method Details

    • getActiveUsersCount

      public Request<Integer> getActiveUsersCount()
      Request the Active Users Count (logged in during the last 30 days). A token with scope read:stats is needed. See https://auth0.com/docs/api/management/v2#!/Stats/get_active_users
      Returns:
      a Request to execute.
    • getDailyStats

      public Request<List<DailyStats>> getDailyStats(Date from, Date to)
      Request the Daily Stats for a given period. A token with scope read:stats is needed. See https://auth0.com/docs/api/management/v2#!/Stats/get_daily
      Parameters:
      from - the first day of the period (inclusive). Time is not taken into account.
      to - the last day of the period (inclusive). Time is not taken into account.
      Returns:
      a Request to execute.
    • formatDate

      protected String formatDate(Date date)
    • voidRequest

      protected Request<Void> voidRequest(HttpMethod method, Consumer<com.auth0.client.mgmt.RequestBuilder<Void>> customizer)
    • request

      protected <T> Request<T> request(HttpMethod method, com.fasterxml.jackson.core.type.TypeReference<T> target, Consumer<com.auth0.client.mgmt.RequestBuilder<T>> customizer)