Class JobsEntity

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

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

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

    • get

      public Request<Job> get(String jobId)
      Request a Job. A token with scope create:users is needed. See GET Jobs by ID.
      Parameters:
      jobId - the id of the job to retrieve.
      Returns:
      a Request to execute.
    • getErrorDetails

      public Request<List<JobErrorDetails>> getErrorDetails(String jobId)
      Get error details of a failed job. A token with scope create:users is needed. See GET Job Errors.
      Parameters:
      jobId - the id of the job to retrieve.
      Returns:
      a Request to execute.
    • sendVerificationEmail

      public Request<Job> sendVerificationEmail(String userId, String clientId)
      Sends an Email Verification. A token with scope update:users is needed. See POST Verification Email.
      Parameters:
      userId - The user_id of the user to whom the email will be sent.
      clientId - The id of the client, if not provided the global one will be used.
      Returns:
      a Request to execute.
      See Also:
    • sendVerificationEmail

      public Request<Job> sendVerificationEmail(String userId, String clientId, EmailVerificationIdentity emailVerificationIdentity)
      Sends an Email Verification. A token with scope update:users is needed. See POST Verification Email.
      Parameters:
      userId - The user_id of the user to whom the email will be sent.
      clientId - The id of the client, if not provided the global one will be used.
      emailVerificationIdentity - The identity of the user. Required to verify primary identities when using social, enterprise, or passwordless connections. It is also required to verify secondary identities.
      Returns:
      a Request to execute.
      See Also:
    • sendVerificationEmail

      public Request<Job> sendVerificationEmail(String userId, String clientId, EmailVerificationIdentity emailVerificationIdentity, String orgId)
      Sends an Email Verification. A token with scope update:users is needed. See POST Verification Email.
      Parameters:
      userId - The user_id of the user to whom the email will be sent.
      clientId - The id of the client, if not provided the global one will be used.
      emailVerificationIdentity - The identity of the user. Required to verify primary identities when using social, enterprise, or passwordless connections. It is also required to verify secondary identities.
      orgId - The organization ID. If provided, the organization_id and organization_name will be included as query arguments in the link back to the application.
      Returns:
      a Request to execute.
      See Also:
    • exportUsers

      @Deprecated public Request<Job> exportUsers(String connectionId, UsersExportFilter filter)
      Deprecated.
      Use exportUsers(UsersExportFilter) instead. Requests a Users Exports job. A token with scope read:users is needed. See POST Users Exports. See Bulk User Exports.
      Parameters:
      connectionId - The id of the connection to export the users from.
      filter - the filter to use. Can be null.
      Returns:
      a Request to execute.
    • exportUsers

      public Request<Job> exportUsers(UsersExportFilter filter)
      Requests a Users Exports job. A token with scope read:users is needed. See POST Users Exports. See Bulk User Exports.
      Parameters:
      filter - the filter to use. Can be null.
      Returns:
      a Request to execute.
    • importUsers

      public Request<Job> importUsers(String connectionId, File users, UsersImportOptions options)
      Requests a Users Imports job. A token with scope write:users is needed. See POST User Imports. See Bulk User Imports.
      Parameters:
      connectionId - The id of the connection to import the users to.
      users - The users file. Must have an array with the users' information in JSON format.
      options - Optional parameters to set. Can be null.
      Returns:
      a Request to execute.
    • 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)