Skip to main content

actions

Creates, updates, deletes, gets or lists an actions resource.

Overview

Nameactions
TypeResource
Idpagerduty.automation_actions.actions

Fields

The following fields are returned by SELECT queries:

Action information

NameDatatypeDescription

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_automation_actionselectidAccept, Content-TypeGet an Automation Action
get_all_automation_actionsselectAccept, Content-Type, limit, cursor, name, runner_id, classification, team_id, service_id, action_typeLists Automation Actions matching provided query params.

The returned records are sorted by action name in alphabetical order.

See Cursor-based pagination for instructions on how to paginate through the result set.
create_automation_action_invocationinsertid, data__invocationAccept, Content-TypeInvokes an Action
create_automation_actioninsertdata__actionAccept, Content-TypeCreate a Script, Process Automation, or Runbook Automation action
delete_automation_actiondeleteidAccept, Content-TypeDelete an Automation Action
_get_all_automation_actionsexecAccept, Content-Type, limit, cursor, name, runner_id, classification, team_id, service_id, action_typeLists Automation Actions matching provided query params.

The returned records are sorted by action name in alphabetical order.

See Cursor-based pagination for instructions on how to paginate through the result set.
_get_automation_actionexecidAccept, Content-TypeGet an Automation Action
update_automation_actionexecid, actionAccept, Content-TypeUpdates an Automation Action

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idstringThe ID of the resource.
AcceptstringThe Accept header is used as a versioning header.
Content-Typestring
action_typestringFilters results to include the ones matching the specified action type
classificationstringFilters results to include the ones matching the specified classification (aka category)
cursorstringOptional parameter used to request the "next" set of results from an API. The value provided here is most commonly obtained from the next_cursor field of the previous request. When no value is provided, the request starts at the beginning of the result set.
limitintegerThe minimum of the limit parameter used in the request or the maximum request size of the API.
namestringFilters results to include the ones matching the name (case insensitive substring matching)
runner_idstringFilters results to include the ones linked to the specified runner. Specifying the value any filters results to include the ones linked to runners only, thus omitting the results not linked to runners.
service_idstringFilters results to include the ones associated with the specified service
team_idstringFilters results to include the ones associated with the specified team.

SELECT examples

Get an Automation Action

SELECT
*
FROM pagerduty.automation_actions.actions
WHERE id = '{{ id }}' -- required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;

INSERT examples

Invokes an Action

INSERT INTO pagerduty.automation_actions.actions (
data__invocation,
id,
Accept,
Content-Type
)
SELECT
'{{ invocation }}' /* required */,
'{{ id }}',
'{{ Accept }}',
'{{ Content-Type }}'
RETURNING
invocation
;

DELETE examples

Delete an Automation Action

DELETE FROM pagerduty.automation_actions.actions
WHERE id = '{{ id }}' --required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;

Lifecycle Methods

Lists Automation Actions matching provided query params.

The returned records are sorted by action name in alphabetical order.

See Cursor-based pagination for instructions on how to paginate through the result set.

EXEC pagerduty.automation_actions.actions._get_all_automation_actions 
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}',
@limit='{{ limit }}',
@cursor='{{ cursor }}',
@name='{{ name }}',
@runner_id='{{ runner_id }}',
@classification='{{ classification }}',
@team_id='{{ team_id }}',
@service_id='{{ service_id }}',
@action_type='{{ action_type }}'
;