Class ManagementAPI

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

public class ManagementAPI extends Object
Class that provides an implementation of the Management API methods defined in https://auth0.com/docs/api/management/v2. To begin create an instance of ManagementAPI(String, String) using the tenant domain and API token.

This class is not entirely thread-safe: A new immutable OkHttpClient instance is being created with each instantiation, not sharing the thread pool with any prior existing client instance.

  • Constructor Details

    • ManagementAPI

      @Deprecated public ManagementAPI(String domain, String apiToken, HttpOptions options)
      Deprecated.
      Use the ManagementAPI.Builder to configure and create instances.
      Create an instance with the given tenant's domain and API token. In addition, accepts an HttpOptions that will be used to configure the networking client. See the Management API section in the readme or visit https://auth0.com/docs/api/management/v2/tokens to learn how to obtain a token.
      Parameters:
      domain - the tenant's domain.
      apiToken - the token to authenticate the calls with.
      options - configuration options for this client instance.
      See Also:
    • ManagementAPI

      @Deprecated public ManagementAPI(String domain, String apiToken)
      Deprecated.
      Use the ManagementAPI.Builder to configure and create instances.
      Create an instance with the given tenant's domain and API token. See the Management API section in the readme or visit https://auth0.com/docs/api/management/v2/tokens to learn how to obtain a token.
      Parameters:
      domain - the tenant's domain.
      apiToken - the token to authenticate the calls with.
  • Method Details

    • newBuilder

      public static ManagementAPI.Builder newBuilder(String domain, String apiToken)
      Instantiate a new ManagementAPI.Builder to configure and build a new ManagementAPI client.
      Parameters:
      domain - the tenant's domain. Must be a non-null valid HTTPS domain.
      apiToken - the token to use when making API requests to the Auth0 Management API.
      Returns:
      a Builder for further configuration.
    • setApiToken

      public void setApiToken(String apiToken)
      Update the API token to use on new calls. This is useful when the token is about to expire or already has. Please note you'll need to obtain the corresponding entity again for this to apply. e.g. call clients() again. See the Management API section in the readme or visit https://auth0.com/docs/api/management/v2/tokens to learn how to obtain a token.
      Parameters:
      apiToken - the token to authenticate the calls with.
    • branding

      public BrandingEntity branding()
      Getter for the Branding entity.
      Returns:
      the Branding entity.
    • clientGrants

      public ClientGrantsEntity clientGrants()
      Getter for the Client Grants entity.
      Returns:
      the Client Grants entity.
    • clients

      public ClientsEntity clients()
      Getter for the Applications entity.
      Returns:
      the Applications entity.
    • connections

      public ConnectionsEntity connections()
      Getter for the Connections entity.
      Returns:
      the Connections entity.
    • deviceCredentials

      public DeviceCredentialsEntity deviceCredentials()
      Getter for the Device Credentials entity.
      Returns:
      the Device Credentials entity.
    • grants

      public GrantsEntity grants()
      Getter for the Grants entity.
      Returns:
      the Grants entity.
    • logEvents

      public LogEventsEntity logEvents()
      Getter for the Log Events entity.
      Returns:
      the Log Events entity.
    • logStreams

      public LogStreamsEntity logStreams()
      Getter for the Log Streams entity.
      Returns:
      the Log Streams entity.
    • rules

      public RulesEntity rules()
      Getter for the Rules entity.
      Returns:
      the Rules entity.
    • rulesConfigs

      public RulesConfigsEntity rulesConfigs()
      Getter for the Rules Configs entity.
      Returns:
      the Rules Configs entity.
    • userBlocks

      public UserBlocksEntity userBlocks()
      Getter for the User Blocks entity.
      Returns:
      the User Blocks entity.
    • users

      public UsersEntity users()
      Getter for the Users entity.
      Returns:
      the Users entity.
    • blacklists

      public BlacklistsEntity blacklists()
      Getter for the Blacklists entity.
      Returns:
      the Blacklists entity.
    • emailTemplates

      public EmailTemplatesEntity emailTemplates()
      Getter for the Email Templates entity.
      Returns:
      the Email Templates entity.
    • emailProvider

      public EmailProviderEntity emailProvider()
      Getter for the Email Provider entity.
      Returns:
      the Email Provider entity.
    • guardian

      public GuardianEntity guardian()
      Getter for the Guardian entity.
      Returns:
      the Guardian entity.
    • stats

      public StatsEntity stats()
      Getter for the Stats entity.
      Returns:
      the Stats entity.
    • tenants

      public TenantsEntity tenants()
      Getter for the Tenants entity.
      Returns:
      the Tenants entity.
    • tickets

      public TicketsEntity tickets()
      Getter for the Tickets entity.
      Returns:
      the Tickets entity.
    • resourceServers

      public ResourceServerEntity resourceServers()
      Getter for the Resource Servers entity.
      Returns:
      the Resource Servers entity.
    • jobs

      public JobsEntity jobs()
      Getter for the Jobs entity.
      Returns:
      the Jobs entity.
    • roles

      public RolesEntity roles()
      Getter for the Roles entity.
      Returns:
      the Roles entity.
    • organizations

      public OrganizationsEntity organizations()
      Getter for the Organizations entity.
      Returns:
      the Organizations entity.
    • actions

      public ActionsEntity actions()
      Getter for the Actions entity.
      Returns:
      the Actions entity.
    • attackProtection

      public AttackProtectionEntity attackProtection()
      Getter for the Attack Protection Entity
      Returns:
      the Attack Protection Entity
    • keys

      public KeysEntity keys()
      Getter for the Keys Entity
      Returns:
      the Keys Entity
    • refreshTokens

      public RefreshTokensEntity refreshTokens()
      Getter for the RefreshTokens Entity
      Returns:
      the RefreshTokens Entity
    • sessions

      public SessionsEntity sessions()
      Getter for the Sessions Entity
      Returns:
      the Sessions Entity