Skip to main content

event_orchestration_rules

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

Overview

Nameevent_orchestration_rules
TypeResource
Idpagerduty.recommendations.event_orchestration_rules

Fields

The following fields are returned by SELECT queries:

A list of recommended rules for the account's Service Event Orchestrations.

NameDatatypeDescription
recommendation_idstringThe unique identifier for this recommendation (rule instance hash). (example: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4)
actionsobjectThe action the recommended rule would apply when its condition is matched. One of the following action types will be present.
created_atstring (date-time)The date/time the recommendation was created.
descriptionstringA human-readable description of what the recommended rule does. (example: Suppress alerts where event.summary matches 'disk usage')
metricsobjectPerformance metrics describing the recommendation's historical match rate and effectiveness.
parentobjectThe service this recommendation applies to.
pcl_exprstringThe PagerDuty Condition Language (PCL) expression that defines the rule's matching condition. (example: event.summary matches part 'disk usage')
statusstringThe availability status of the recommendation. (available)
typestringThe type of resource this recommendation applies to. (service)
updated_atstring (date-time)The date/time the recommendation was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectservice_id, service_ids[], team_ids[], actions[], limit, cursorList AI-generated recommended rules available for an account's Service Event Orchestrations.<br /><br />Results can be filtered by service or team. Use cursor-based pagination to retrieve large result sets.<br /><br />Note: service_id and service_ids&#91;&#93; cannot be used together in the same request.<br /><br />Scoped OAuth requires: recommendations.read<br />
dismissexecservice_id, recommendation_id, decisionDismiss a recommended rule for a service, recording feedback on whether the recommendation was useful.<br /><br />Scoped OAuth requires: recommendations.write<br />
acceptexecservice_id, recommendation_idAccept a recommended rule and apply it to the service's Event Orchestration.<br /><br />Scoped OAuth requires: recommendations.write<br />
delete_accepted_ruleexecservice_id, rule_idRemove a previously accepted recommended rule from a service's Event Orchestration.<br /><br />Scoped OAuth requires: recommendations.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.

NameDatatypeDescription
recommendation_idstringThe recommendation ID (rule instance hash).
rule_idstringThe ID of the accepted rule.
service_idstringThe service ID
actions[]arrayFilter recommended rules by action type.
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 number of results per page.
service_idstringFilter recommended rules for a single service. Cannot be combined with service_ids&#91;&#93;.
service_ids[]arrayFilter recommended rules for multiple services. Cannot be combined with service_id.
team_ids[]arrayAn array of team IDs. Only results related to these teams will be returned. Account must have the teams ability to use this parameter.

SELECT examples

List AI-generated recommended rules available for an account's Service Event Orchestrations.<br /><br />Results can be filtered by service or team. Use cursor-based pagination to retrieve large result sets.<br /><br />Note: service_id and service_ids&#91;&#93; cannot be used together in the same request.<br /><br />Scoped OAuth requires: recommendations.read<br />

SELECT
recommendation_id,
actions,
created_at,
description,
metrics,
parent,
pcl_expr,
status,
type,
updated_at
FROM pagerduty.recommendations.event_orchestration_rules
WHERE service_id = '{{ service_id }}'
AND service_ids[] = '{{ service_ids[] }}'
AND team_ids[] = '{{ team_ids[] }}'
AND actions[] = '{{ actions[] }}'
AND limit = '{{ limit }}'
AND cursor = '{{ cursor }}'
;

Lifecycle Methods

Dismiss a recommended rule for a service, recording feedback on whether the recommendation was useful.<br /><br />Scoped OAuth requires: recommendations.write<br />

EXEC pagerduty.recommendations.event_orchestration_rules.dismiss
@service_id='{{ service_id }}' --required,
@recommendation_id='{{ recommendation_id }}' --required
@@json=
'{
"decision": "{{ decision }}"
}'
;