Class RulesEntity

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

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

This class is not thread-safe.

See Also:
ManagementAPI
  • Field Details

    • client

      protected final okhttp3.OkHttpClient client
    • baseUrl

      protected final okhttp3.HttpUrl baseUrl
    • apiToken

      protected final String apiToken
  • Method Details

    • listAll

      public Request<RulesPage> listAll(RulesFilter filter)
      Request all the Rules. A token with scope read:rules is needed. See https://auth0.com/docs/api/management/v2#!/Rules/get_rules
      Parameters:
      filter - the filter to use. Can be null.
      Returns:
      a Request to execute.
    • list

      @Deprecated public Request<List<Rule>> list(RulesFilter filter)
      Deprecated.
      Calling this method will soon stop returning the complete list of rules and instead, limit to the first page of results. Please use listAll(RulesFilter) instead as it provides pagination support.
      Request all the Rules. A token with scope read:rules is needed. See https://auth0.com/docs/api/management/v2#!/Rules/get_rules
      Parameters:
      filter - the filter to use. Can be null.
      Returns:
      a Request to execute.
    • get

      public Request<Rule> get(String ruleId, RulesFilter filter)
      Request a Rule. A token with scope read:rules is needed. See https://auth0.com/docs/api/management/v2#!/Rules/get_rules_by_id
      Parameters:
      ruleId - the id of the rule to retrieve.
      filter - the filter to use. Can be null.
      Returns:
      a Request to execute.
    • create

      public Request<Rule> create(Rule rule)
      Create a Rule. A token with scope create:rules is needed. See https://auth0.com/docs/api/management/v2#!/Rules/post_rules
      Parameters:
      rule - the rule data to set
      Returns:
      a Request to execute.
    • delete

      public Request delete(String ruleId)
      Delete an existing Rule. A token with scope delete:rules is needed. See https://auth0.com/docs/api/management/v2#!/Rules/delete_rules_by_id
      Parameters:
      ruleId - the rule id
      Returns:
      a Request to execute.
    • update

      public Request<Rule> update(String ruleId, Rule rule)
      Update an existing Rule. A token with scope update:rules is needed. See https://auth0.com/docs/api/management/v2#!/Rules/patch_rules_by_id
      Parameters:
      ruleId - the rule id
      rule - the rule data to set. It can't include id.
      Returns:
      a Request to execute.