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
connection
IManagementConnectionIManagementConnection used to make all API calls.
baseUri
UriUri of the endpoint to use in making API calls.
defaultHeaders
IDictionary<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
request
UsersExportsJobRequestThe UsersExportsJobRequest containing the information for the job to export users.
cancellationToken
CancellationTokenThe 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
id
stringThe ID of the job to retrieve.
cancellationToken
CancellationTokenThe 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
connectionId
stringThe connection identifier.
fileName
stringName of the file.
file
StreamThe file.
upsert
bool?Whether to update the user if already exists.
externalId
stringCustomer-defined id.
sendCompletionEmail
bool?Whether to send the user an email on import completion (true) or not (false).
cancellationToken
CancellationTokenThe 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
request
VerifyEmailJobRequestThe VerifyEmailJobRequest containing the information of the user whose email you want verified.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.