Class JobsClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
Contains methods to access the /jobs endpoints.
public class JobsClient : BaseClient, IJobsClient
- Inheritance
-
JobsClient
- Implements
- Inherited Members
Constructors
JobsClient(IManagementConnection, Uri, IDictionary<string, string>)
Initializes a new instance on JobsClient
public JobsClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)
Parameters
connectionIManagementConnectionIManagementConnection used to make all API calls.
baseUriUriUri of the endpoint to use in making API calls.
defaultHeadersIDictionary<string, string>Dictionary containing default headers included with every request this client makes.
Methods
ExportUsersAsync(UsersExportsJobRequest, CancellationToken)
Exports users from a connection to a file using a long running job.
public Task<Job> ExportUsersAsync(UsersExportsJobRequest request, CancellationToken cancellationToken = default)
Parameters
requestUsersExportsJobRequestThe UsersExportsJobRequest containing the information for the job to export users.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
Remarks
The documentation for user exports can be found here.
GetAsync(string, CancellationToken)
Gets a job.
public Task<Job> GetAsync(string id, CancellationToken cancellationToken = default)
Parameters
idstringThe ID of the job to retrieve.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
Remarks
This is useful to check the status of a job.
ImportUsersAsync(string, string, Stream, bool?, string, bool?, CancellationToken)
Imports users to a connection from a file using a long running job.
public Task<Job> ImportUsersAsync(string connectionId, string fileName, Stream file, bool? upsert = null, string externalId = null, bool? sendCompletionEmail = null, CancellationToken cancellationToken = default)
Parameters
connectionIdstringThe connection identifier.
fileNamestringName of the file.
fileStreamThe file.
upsertbool?Whether to update the user if already exists.
externalIdstringCustomer-defined id.
sendCompletionEmailbool?Whether to send the user an email on import completion (true) or not (false).
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
Remarks
The documentation for the file format is here.
SendVerificationEmailAsync(VerifyEmailJobRequest, CancellationToken)
Send an email to the specified user that asks them to click a link to verify their email address.
public Task<Job> SendVerificationEmailAsync(VerifyEmailJobRequest request, CancellationToken cancellationToken = default)
Parameters
requestVerifyEmailJobRequestThe VerifyEmailJobRequest containing the information of the user whose email you want verified.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.