Auth0-PHP

Actions extends ManagementEndpoint
in package
implements ActionsInterface

Class Actions.

Handles requests to the Actions endpoint of the v2 Management API.

Tags
see
https://auth0.com/docs/api/management/v2#!/Actions

Interfaces, Classes, Traits and Enums

ActionsInterface
Interface ActionsInterface.

Table of Contents

$httpClient  : HttpClient
__construct()  : mixed
ManagementEndpoint constructor.
create()  : ResponseInterface
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.
delete()  : ResponseInterface
Delete an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted.
deploy()  : ResponseInterface
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.
get()  : ResponseInterface
Retrieve an action by its ID.
getAll()  : ResponseInterface
Retrieve all actions.
getExecution()  : ResponseInterface
Get 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.
getHttpClient()  : HttpClient
Get the injected HttpClient instance.
getLastRequest()  : HttpRequest|null
Return an instance of HttpRequest representing the last issued request.
getResponsePaginator()  : HttpResponsePaginator
Return a ResponsePaginator instance configured for the last HttpRequest.
getTriggerBindings()  : ResponseInterface
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.
getTriggers()  : ResponseInterface
Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound.
getVersion()  : ResponseInterface
Retrieve a specific version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created.
getVersions()  : ResponseInterface
Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created.
instance()  : static
rollbackVersion()  : ResponseInterface
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()  : ResponseInterface
Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected.
update()  : ResponseInterface
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.
updateTriggerBindings()  : ResponseInterface
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.

Properties

Methods

__construct()

ManagementEndpoint constructor.

public final __construct(HttpClient $httpClient) : mixed
Parameters
$httpClient : HttpClient

httpClient instance to use

Return values
mixed

create()

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.

public create(array<string|int, mixed> $body[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: create:actions.

Parameters
$body : array<string|int, mixed>

Body content to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

delete()

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

public delete(string $id[, bool|null $force = null ][, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: delete:actions.

Parameters
$id : string

action (by it's ID) to delete

$force : bool|null = null

Force action deletion detaching bindings

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

deploy()

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.

public deploy(string $id[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: create:actions.

Parameters
$id : string

action (by it's ID) to deploy

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

get()

Retrieve an action by its ID.

public get(string $id[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:actions.

Parameters
$id : string

action (by it's ID) to retrieve

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

getAll()

Retrieve all actions.

public getAll([array<string|int, mixed>|null $parameters = null ][, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:actions.

Parameters
$parameters : array<string|int, mixed>|null = null

Optional. Additional query parameters to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

getExecution()

Get 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.

public getExecution(string $id[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:actions.

Parameters
$id : string

execution (by it's ID) to retrieve

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

getTriggerBindings()

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.

public getTriggerBindings(string $triggerId[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:actions.

Parameters
$triggerId : string

an actions extensibility point

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

getTriggers()

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

public getTriggers([RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:actions.

Parameters
$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

getVersion()

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

public getVersion(string $id, string $actionId[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:actions.

Parameters
$id : string

action version (by it's ID) to retrieve

$actionId : string

action (by it's ID) to retrieve

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

getVersions()

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

public getVersions(string $actionId[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:actions.

Parameters
$actionId : string

action (by it's ID) to retrieve

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

rollbackVersion()

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.

public rollbackVersion(string $id, string $actionId[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:actions.

Parameters
$id : string

action version (by it's ID) to roll-back to

$actionId : string

action (by it's ID) to perform the roll-back on

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

test()

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

public test(string $id, array<string|int, mixed> $body[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: create:actions.

Parameters
$id : string

action (by it's ID) to test

$body : array<string|int, mixed>

Body content to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

update()

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.

public update(string $id, array<string|int, mixed> $body[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: update:actions.

Parameters
$id : string

action (by it's ID) to update

$body : array<string|int, mixed>

Body content to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

updateTriggerBindings()

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.

public updateTriggerBindings(string $triggerId, array<string|int, mixed> $body[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: update:actions.

Parameters
$triggerId : string

an actions extensibility point

$body : array<string|int, mixed>

Body content to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

Search results