View Source Auth0.Management.Actions (Auth0Api v2.5.0)

Facade for the Auth0 Management API Actions endpoints.

Most applications should call Auth0.Api.Management instead of this module.

Summary

Functions

Create an action. 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.

Create a new Actions Module.

Create a new version of an Actions Module.

Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted.

Delete a specific Actions Module by ID.

Deploy an action. 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.

Retrieve an action by its ID.

Retrieve the actions that are bound 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 list of actions returned reflects the order in which they will be executed during the appropriate flow.

Retrieve information about a specific execution of a trigger. 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.

Get a specific Actions Module by ID.

Get a specific version of an Actions Module.

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

Retrieve a specific version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created.

Retrieve all actions.

List all actions using an Actions Module.

List all versions of an Actions Module.

List Actions Modules.

Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created.

Rollback an Actions Module to a previous version.

Performs the equivalent of a roll-back of an action to an earlier, specified version. 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.

Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected.

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

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.

Update a specific Actions Module.

Types

@type action_id() :: String.t()
@type config() :: Auth0.Config.t()
@type error() :: {:error, integer(), term()} | {:error, term()}
@type id() :: String.t()
@type trigger_id() :: String.t()

Functions

@spec create(map(), config()) :: {:ok, map()} | error()

Create an action. 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.

see

https://auth0.com/docs/api/management/v2/actions/post-action

Link to this function

create_module(params, config)

View Source
@spec create_module(map(), config()) :: {:ok, map()} | error()

Create a new Actions Module.

Create a new Actions Module for reusable code across actions.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/actions/post-action-module

Link to this function

create_module_version(id, config)

View Source
@spec create_module_version(String.t(), config()) :: {:ok, map()} | error()

Create a new version of an Actions Module.

Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/actions/post-action-module-version

Link to this function

delete(id, params, config)

View Source
@spec delete(id(), map(), config()) :: {:ok, String.t()} | error()

Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted.

see

https://auth0.com/docs/api/management/v2/actions/delete-action

Link to this function

delete_module(id, config)

View Source
@spec delete_module(String.t(), config()) :: {:ok, String.t()} | error()

Delete a specific Actions Module by ID.

Permanently delete an Actions Module. This will fail if the module is still in use by any actions.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/actions/delete-action-module

@spec deploy(id(), config()) :: {:ok, map()} | error()

Deploy an action. 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.

see

https://auth0.com/docs/api/management/v2/actions/post-deploy-action

@spec get(id(), config()) :: {:ok, map()} | error()

Retrieve an action by its ID.

see

https://auth0.com/docs/api/management/v2/actions/get-action

Link to this function

get_bindings(trigger_id, params, config)

View Source
@spec get_bindings(trigger_id(), map(), config()) :: {:ok, map()} | error()

Retrieve the actions that are bound 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 list of actions returned reflects the order in which they will be executed during the appropriate flow.

see

https://auth0.com/docs/api/management/v2/actions/get-bindings

Link to this function

get_execution(id, config)

View Source
@spec get_execution(id(), config()) :: {:ok, map()} | error()

Retrieve information about a specific execution of a trigger. 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.

see

https://auth0.com/docs/api/management/v2/actions/get-execution

@spec get_module(String.t(), config()) :: {:ok, map()} | error()

Get a specific Actions Module by ID.

Retrieve details of a specific Actions Module by its unique identifier.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/actions/get-action-module

Link to this function

get_module_version(id, version_id, config)

View Source
@spec get_module_version(String.t(), String.t(), config()) :: {:ok, map()} | error()

Get a specific version of an Actions Module.

Retrieve the details of a specific, immutable version of an Actions Module.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/actions/get-action-module-version

@spec get_triggers(config()) :: {:ok, map()} | error()

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

see

https://auth0.com/docs/api/management/v2/actions/get-triggers

Link to this function

get_version(action_id, id, config)

View Source
@spec get_version(action_id(), id(), config()) :: {:ok, map()} | error()

Retrieve a specific version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created.

see

https://auth0.com/docs/api/management/v2/actions/get-action-version

@spec list(map(), config()) :: {:ok, map()} | error()

Retrieve all actions.

see

https://auth0.com/docs/api/management/v2/actions/get-actions

Link to this function

list_module_actions(id, params, config)

View Source
@spec list_module_actions(String.t(), map(), config()) :: {:ok, map()} | error()

List all actions using an Actions Module.

Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/actions/get-action-module-actions

Link to this function

list_module_versions(id, params, config)

View Source
@spec list_module_versions(String.t(), map(), config()) :: {:ok, map()} | error()

List all versions of an Actions Module.

List all published versions of a specific Actions Module.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/actions/get-action-module-versions

Link to this function

list_modules(params, config)

View Source
@spec list_modules(map(), config()) :: {:ok, map()} | error()

List Actions Modules.

Retrieve a paginated list of all Actions Modules with optional filtering and totals.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/actions/get-action-modules

Link to this function

list_versions(action_id, params, config)

View Source
@spec list_versions(action_id(), map(), config()) :: {:ok, map()} | error()

Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created.

see

https://auth0.com/docs/api/management/v2/actions/get-action-versions

Link to this function

rollback_module(id, params, config)

View Source
@spec rollback_module(String.t(), map(), config()) :: {:ok, map()} | error()

Rollback an Actions Module to a previous version.

Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/actions/post-action-module-rollback

Link to this function

rollback_version(action_id, id, params, config)

View Source
@spec rollback_version(action_id(), id(), map(), config()) :: {:ok, map()} | error()

Performs the equivalent of a roll-back of an action to an earlier, specified version. 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.

see

https://auth0.com/docs/api/management/v2/actions/post-deploy-draft-version

Link to this function

test(id, params, config)

View Source
@spec test(id(), map(), config()) :: {:ok, map()} | error()

Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected.

see

https://auth0.com/docs/api/management/v2/actions/post-test-action

Link to this function

update(id, params, config)

View Source
@spec update(id(), map(), config()) :: {:ok, map()} | error()

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

see

https://auth0.com/docs/api/management/v2/actions/patch-action

Link to this function

update_bindings(trigger_id, params, config)

View Source
@spec update_bindings(trigger_id(), map(), config()) :: {:ok, map()} | error()

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.

see

https://auth0.com/docs/api/management/v2/actions/patch-bindings

Link to this function

update_module(id, params, config)

View Source
@spec update_module(String.t(), map(), config()) :: {:ok, map()} | error()

Update a specific Actions Module.

Update properties of an existing Actions Module, such as code, dependencies, or secrets.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/actions/patch-action-module