triggers
Creates, updates, deletes, gets or lists a triggers resource.
Overview
| Name | triggers |
| Type | Resource |
| Id | pagerduty.incident_workflows.triggers |
Fields
The following fields are returned by SELECT queries:
- get
- list
The Incident Workflows Trigger
| Name | Datatype | Description |
|---|---|---|
id | string | |
trigger_type_name | string | Human readable name for the trigger type |
condition | string | A PCL condition string. If specified, the trigger will execute when the condition is met on an incident. If unspecified, the trigger will execute on incident creation. Required if trigger_type is “conditional”, not allowed for other trigger types. |
html_url | string (url) | a URL at which the entity is uniquely displayed in the Web app |
incident_types | array | An optional array of Incident Types associated with the trigger when it is of type incident_type. |
is_disabled | boolean | Indicates whether the Trigger is disabled or not. Inherited from the "is_enabled" property on the workflow to which this trigger belongs. This attribute is deprecated, and will be removed in a future version of this API. |
is_subscribed_to_all_services | boolean | Indicates that the Trigger should be associated with All Services |
permissions | object | An object detailing who can start this Trigger. Applicable only to manual Triggers. |
self | string (url) | the API show URL at which the object is accessible |
services | array | An optional array of Services associated with this workflow. Incidents in any of the listed Services are eligible to fire this Trigger |
summary | string | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier. |
trigger_type | string | (conditional, manual, incident_type) |
trigger_url | string (url) | |
type | string | A string that determines the schema of the object. This must be the standard name for the entity, suffixed by _reference if the object is a reference. |
workflow | object | Workflow to start when this trigger is invoked |
A paginated array of Incident Workflow Triggers
| Name | Datatype | Description |
|---|---|---|
id | string | |
trigger_type_name | string | Human readable name for the trigger type |
condition | string | A PCL condition string. If specified, the trigger will execute when the condition is met on an incident. If unspecified, the trigger will execute on incident creation. Required if trigger_type is “conditional”, not allowed for other trigger types. |
html_url | string (url) | a URL at which the entity is uniquely displayed in the Web app |
incident_types | array | An optional array of Incident Types associated with the trigger when it is of type incident_type. |
is_disabled | boolean | Indicates whether the Trigger is disabled or not. Inherited from the "is_enabled" property on the workflow to which this trigger belongs. This attribute is deprecated, and will be removed in a future version of this API. |
is_subscribed_to_all_services | boolean | Indicates that the Trigger should be associated with All Services |
permissions | object | An object detailing who can start this Trigger. Applicable only to manual Triggers. |
self | string (url) | the API show URL at which the object is accessible |
services | array | An optional array of Services associated with this workflow. Incidents in any of the listed Services are eligible to fire this Trigger |
summary | string | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier. |
trigger_type | string | (conditional, manual, incident_type) |
trigger_url | string (url) | |
type | string | A string that determines the schema of the object. This must be the standard name for the entity, suffixed by _reference if the object is a reference. |
workflow | object | Workflow to start when this trigger is invoked |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id | Retrieve an existing Incident Workflows Trigger<br /><br />Scoped OAuth requires: incident_workflows.read<br /> | |
list | select | workflow_id, incident_id, service_id, trigger_type, workflow_name_contains, is_disabled, sort_by, limit, cursor | List existing Incident Workflow Triggers<br /><br />Scoped OAuth requires: incident_workflows.read<br /> | |
create | insert | trigger | Create new Incident Workflow Trigger<br /><br />Scoped OAuth requires: incident_workflows.write<br /> | |
update | update | id, trigger | Update an existing Incident Workflow Trigger<br /><br />Scoped OAuth requires: incident_workflows.write<br /> | |
delete | delete | id | Delete an existing Incident Workflow Trigger<br /><br />Scoped OAuth requires: incident_workflows.write<br /> |
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.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
cursor | string | Optional 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. |
incident_id | string | If provided, only show triggers configured on the service of the given incident. Useful for finding manual triggers that are configured on the service for a specific incident. Cannot be specified if service_id is provided. |
is_disabled | boolean | If provided, filters between disabled and enabled Triggers. This query parameter is deprecated, and will be removed in a future version of this API. |
limit | integer | The minimum of the limit parameter used in the request or the maximum request size of the API. |
service_id | string | If provided, only show triggers configured for incidents in the given service. Useful for listing all workflows associated with the given service. Cannot be specified if incident_id is provided. |
sort_by | string | If provided, returns triggers sorted by the specified property. |
trigger_type | string | If provided, only show triggers of the given type. For example “manual” to search for manual triggers |
workflow_id | string | If provided, only show triggers configured to start the given workflow. Useful for listing all services associated with the given workflow |
workflow_name_contains | string | If provided, only show triggers configured to start workflows whose name contain the provided value. |
SELECT examples
- get
- list
Retrieve an existing Incident Workflows Trigger<br /><br />Scoped OAuth requires: incident_workflows.read<br />
SELECT
id,
trigger_type_name,
condition,
html_url,
incident_types,
is_disabled,
is_subscribed_to_all_services,
permissions,
self,
services,
summary,
trigger_type,
trigger_url,
type,
workflow
FROM pagerduty.incident_workflows.triggers
WHERE id = '{{ id }}' -- required
;
List existing Incident Workflow Triggers<br /><br />Scoped OAuth requires: incident_workflows.read<br />
SELECT
id,
trigger_type_name,
condition,
html_url,
incident_types,
is_disabled,
is_subscribed_to_all_services,
permissions,
self,
services,
summary,
trigger_type,
trigger_url,
type,
workflow
FROM pagerduty.incident_workflows.triggers
WHERE workflow_id = '{{ workflow_id }}'
AND incident_id = '{{ incident_id }}'
AND service_id = '{{ service_id }}'
AND trigger_type = '{{ trigger_type }}'
AND workflow_name_contains = '{{ workflow_name_contains }}'
AND is_disabled = '{{ is_disabled }}'
AND sort_by = '{{ sort_by }}'
AND limit = '{{ limit }}'
AND cursor = '{{ cursor }}'
;
INSERT examples
- create
- Manifest
Create new Incident Workflow Trigger<br /><br />Scoped OAuth requires: incident_workflows.write<br />
INSERT INTO pagerduty.incident_workflows.triggers (
trigger
)
SELECT
'{{ trigger }}' /* required */
RETURNING
trigger
;
# Description fields are for documentation purposes
- name: triggers
props:
- name: trigger
value:
id: "{{ id }}"
summary: "{{ summary }}"
type: "{{ type }}"
self: "{{ self }}"
html_url: "{{ html_url }}"
trigger_type: "{{ trigger_type }}"
condition: "{{ condition }}"
trigger_url: "{{ trigger_url }}"
incident_types:
- "{{ incident_types }}"
workflow:
id: "{{ id }}"
services:
- id: "{{ id }}"
is_subscribed_to_all_services: {{ is_subscribed_to_all_services }}
permissions:
restricted: {{ restricted }}
team_id: "{{ team_id }}"
is_disabled: {{ is_disabled }}
UPDATE examples
- update
Update an existing Incident Workflow Trigger<br /><br />Scoped OAuth requires: incident_workflows.write<br />
UPDATE pagerduty.incident_workflows.triggers
SET
trigger = '{{ trigger }}'
WHERE
id = '{{ id }}' --required
AND trigger = '{{ trigger }}' --required
RETURNING
trigger;
DELETE examples
- delete
Delete an existing Incident Workflow Trigger<br /><br />Scoped OAuth requires: incident_workflows.write<br />
DELETE FROM pagerduty.incident_workflows.triggers
WHERE id = '{{ id }}' --required
;