Table of Contents

Interface IActionsClient

Namespace
Auth0.ManagementApi.Clients
Assembly
Auth0.ManagementApi.dll
public interface IActionsClient

Methods

CreateAsync(CreateActionRequest, CancellationToken)

Create an action.

Task<Action> CreateAsync(CreateActionRequest request, CancellationToken cancellationToken = default)

Parameters

request CreateActionRequest

Specifies criteria to use when creating an action.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<Action>

The new Action that has been created.

Remarks

Once an action is created, it must be deployed, and then bound to a trigger before it will be executed as part of a flow.

DeleteAsync(string, DeleteActionRequest, CancellationToken)

Deletes an action and all of its associated versions.

Task DeleteAsync(string id, DeleteActionRequest request = null, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the action to delete.

request DeleteActionRequest

Specifies criteria to use when deleting an action.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task

A Task that represents the asynchronous delete operation.

Remarks

An action must be unbound from all triggers before it can be deleted.

DeployAsync(string, CancellationToken)

Deploy an action.

Task<ActionVersion> DeployAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the action to deploy.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<ActionVersion>

The action version that was created.

Remarks

Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately.Otherwise, the action will only be executed as a part of a flow once it is bound to that flow.

GetAllAsync(GetActionsRequest, PaginationInfo, CancellationToken)

Retrieve all actions.

Task<IPagedList<Action>> GetAllAsync(GetActionsRequest request, PaginationInfo pagination, CancellationToken cancellationToken = default)

Parameters

request GetActionsRequest

Specifies criteria to use when querying actions.

pagination PaginationInfo

Specifies pagination info to use.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<IPagedList<Action>>

An IPagedList<T> containing the actions.

GetAllTriggerBindingsAsync(string, PaginationInfo, CancellationToken)

Retrieve the actions that are bound to a trigger.

Task<IPagedList<TriggerBinding>> GetAllTriggerBindingsAsync(string triggerId, PaginationInfo pagination, CancellationToken cancellationToken = default)

Parameters

triggerId string

An actions extensibility point.

pagination PaginationInfo

Specifies pagination info to use.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<IPagedList<TriggerBinding>>

The retrieved trigger bindings.

Remarks

Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow.

GetAllTriggersAsync(CancellationToken)

Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound

Task<IList<Trigger>> GetAllTriggersAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<IList<Trigger>>

A list containing the triggers.

GetAllVersionsAsync(string, PaginationInfo, CancellationToken)

Retrieve all versions of an action.

Task<IPagedList<ActionVersion>> GetAllVersionsAsync(string actionId, PaginationInfo pagination, CancellationToken cancellationToken = default)

Parameters

actionId string

The ID of the action.

pagination PaginationInfo

Specifies pagination info to use.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<IPagedList<ActionVersion>>

The retrieved versions of the specified action.

Remarks

An action version is created whenever an action is deployed. An action version is immutable, once created.

GetAsync(string, CancellationToken)

Retrieve an action by its ID.

Task<Action> GetAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the action to retrieve.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<Action>

The retrieved action.

GetExecutionAsync(string, CancellationToken)

Retrieve information about a specific execution of a trigger.

Task<ActionExecution> GetExecutionAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the execution to retrieve.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<ActionExecution>

The retrieved execution.

Remarks

Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation.

GetVersionAsync(string, string, CancellationToken)

Retrieve a specific version of an action.

Task<ActionVersion> GetVersionAsync(string actionId, string versionId, CancellationToken cancellationToken = default)

Parameters

actionId string

The ID of the action.

versionId string

The ID of the action version.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<ActionVersion>

The retrieved version of the specified action.

Remarks

An action version is created whenever an action is deployed. An action version is immutable, once created.

RollbackToVersionAsync(string, string, CancellationToken)

Performs the equivalent of a roll-back of an action to an earlier, specified version.

Task<ActionVersion> RollbackToVersionAsync(string actionId, string versionId, CancellationToken cancellationToken = default)

Parameters

actionId string

The ID of the action.

versionId string

The ID of the version to deploy.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<ActionVersion>

A Task that represents the asynchronous delete operation.

Remarks

Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately.

UpdateAsync(string, UpdateActionRequest, CancellationToken)

Update an existing action.

Task<Action> UpdateAsync(string id, UpdateActionRequest request, CancellationToken cancellationToken = default)

Parameters

id string

The id of the action to update.

request UpdateActionRequest

Specifies criteria to use when updating an action.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<Action>

The Action that was updated.

Remarks

If this action is currently bound to a trigger, updating it will not affect any user flows until the action is deployed.

UpdateTriggerBindingsAsync(string, UpdateTriggerBindingsRequest, CancellationToken)

Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached(i.e.bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed.

Task<IList<TriggerBinding>> UpdateTriggerBindingsAsync(string triggerId, UpdateTriggerBindingsRequest request, CancellationToken cancellationToken = default)

Parameters

triggerId string

An actions extensibility point.

request UpdateTriggerBindingsRequest

Specifies criteria to use when updating the trigger bindings.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<IList<TriggerBinding>>

The trigger bindings.