event_orchestration_rules
Creates, updates, deletes, gets or lists an event_orchestration_rules resource.
Overview
| Name | event_orchestration_rules |
| Type | Resource |
| Id | pagerduty.recommendations.event_orchestration_rules |
Fields
The following fields are returned by SELECT queries:
- list
A list of recommended rules for the account's Service Event Orchestrations.
| Name | Datatype | Description |
|---|---|---|
recommendation_id | string | The unique identifier for this recommendation (rule instance hash). (example: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4) |
actions | object | The action the recommended rule would apply when its condition is matched. One of the following action types will be present. |
created_at | string (date-time) | The date/time the recommendation was created. |
description | string | A human-readable description of what the recommended rule does. (example: Suppress alerts where event.summary matches 'disk usage') |
metrics | object | Performance metrics describing the recommendation's historical match rate and effectiveness. |
parent | object | The service this recommendation applies to. |
pcl_expr | string | The PagerDuty Condition Language (PCL) expression that defines the rule's matching condition. (example: event.summary matches part 'disk usage') |
status | string | The availability status of the recommendation. (available) |
type | string | The type of resource this recommendation applies to. (service) |
updated_at | string (date-time) | The date/time the recommendation was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | service_id, service_ids[], team_ids[], actions[], limit, cursor | 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[] cannot be used together in the same request.<br /><br />Scoped OAuth requires: recommendations.read<br /> | |
dismiss | exec | service_id, recommendation_id, decision | Dismiss a recommended rule for a service, recording feedback on whether the recommendation was useful.<br /><br />Scoped OAuth requires: recommendations.write<br /> | |
accept | exec | service_id, recommendation_id | Accept a recommended rule and apply it to the service's Event Orchestration.<br /><br />Scoped OAuth requires: recommendations.write<br /> | |
delete_accepted_rule | exec | service_id, rule_id | Remove 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.
| Name | Datatype | Description |
|---|---|---|
recommendation_id | string | The recommendation ID (rule instance hash). |
rule_id | string | The ID of the accepted rule. |
service_id | string | The service ID |
actions[] | array | Filter recommended rules by action type. |
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. |
limit | integer | The number of results per page. |
service_id | string | Filter recommended rules for a single service. Cannot be combined with service_ids[]. |
service_ids[] | array | Filter recommended rules for multiple services. Cannot be combined with service_id. |
team_ids[] | array | An 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
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[] 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
- accept
- delete_accepted_rule
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 }}"
}'
;
Accept a recommended rule and apply it to the service's Event Orchestration.<br /><br />Scoped OAuth requires: recommendations.write<br />
EXEC pagerduty.recommendations.event_orchestration_rules.accept
@service_id='{{ service_id }}' --required,
@recommendation_id='{{ recommendation_id }}' --required
;
Remove a previously accepted recommended rule from a service's Event Orchestration.<br /><br />Scoped OAuth requires: recommendations.write<br />
EXEC pagerduty.recommendations.event_orchestration_rules.delete_accepted_rule
@service_id='{{ service_id }}' --required,
@rule_id='{{ rule_id }}' --required
;