arcade-mcp/toolkits/pagerduty_api/arcade_pagerduty_api/wrapper_tools/UpdateServiceOrchestration.json
jottakka f2332a7682
[Moar][Rewrapping] Rewrapping tools (#653)
## Rewrapping

- Calendly
- Airtable
- Squareup
- PagerDuty
- Trello
- Miro

---------

Co-authored-by: Francisco Liberal <francisco@arcade.dev>
2025-10-24 18:05:33 -03:00

208 lines
75 KiB
JSON

{
"name": "UpdateServiceOrchestration",
"fully_qualified_name": "PagerdutyApi.UpdateServiceOrchestration@2.0.0",
"description": "Update a Service Orchestration with new event rules.\n\nThis tool updates a Service Orchestration in PagerDuty by modifying its event rules. It evaluates incoming events against these rules to enhance and route them effectively. Use this tool to adjust the orchestration of a service. Requires 'services.write' scope for OAuth.",
"toolkit": {
"name": "ArcadePagerdutyApi",
"description": null,
"version": "2.0.0"
},
"input": {
"parameters": [
{
"name": "service_identifier",
"required": true,
"description": "The unique identifier for the service to update the orchestration rules.",
"value_schema": {
"val_type": "string",
"inner_val_type": null,
"enum": null,
"properties": null,
"inner_properties": null,
"description": "The service ID"
},
"inferrable": true,
"http_endpoint_parameter_name": "service_id"
},
{
"name": "versioning_header",
"required": true,
"description": "Specifies the versioning header for the API request, used for version control.",
"value_schema": {
"val_type": "string",
"inner_val_type": null,
"enum": null,
"properties": null,
"inner_properties": null,
"description": "The `Accept` header is used as a versioning header."
},
"inferrable": true,
"http_endpoint_parameter_name": "Accept"
},
{
"name": "content_type",
"required": true,
"description": "Specifies the format of the request body. Must be 'application/json'.",
"value_schema": {
"val_type": "string",
"inner_val_type": null,
"enum": [
"application/json"
],
"properties": null,
"inner_properties": null,
"description": ""
},
"inferrable": true,
"http_endpoint_parameter_name": "Content-Type"
},
{
"name": "update_service_orchestration_rules",
"required": false,
"description": "JSON object containing the rules to update the Service Orchestration. Any omitted rules will be deleted.",
"value_schema": {
"val_type": "json",
"inner_val_type": null,
"enum": null,
"properties": null,
"inner_properties": null,
"description": "Update Service Orchestration rules. Omitted rules and rule details are deleted."
},
"inferrable": true,
"http_endpoint_parameter_name": "requestBody"
}
]
},
"output": {
"description": "Response from the API endpoint 'updateOrchPathService'.",
"available_modes": [
"value",
"error",
"null"
],
"value_schema": {
"val_type": "json",
"inner_val_type": null,
"enum": null,
"properties": null,
"inner_properties": null,
"description": null
}
},
"requirements": {
"authorization": {
"provider_id": "arcade-pagerduty",
"provider_type": "oauth2",
"id": null,
"oauth2": null
},
"secrets": null,
"metadata": null
},
"deprecation_message": null,
"metadata": {
"object_type": "api_wrapper_tool",
"version": "1.1.0",
"description": "Tools that enable LLMs to interact directly with the Pagerduty API."
},
"http_endpoint": {
"metadata": {
"object_type": "http_endpoint",
"version": "1.2.0",
"description": ""
},
"url": "https://api.pagerduty.com/event_orchestrations/services/{service_id}",
"http_method": "PUT",
"headers": {},
"parameters": [
{
"name": "service_id",
"tool_parameter_name": "service_identifier",
"description": "The service ID",
"value_schema": {
"val_type": "string",
"inner_val_type": null,
"enum": null,
"properties": null,
"inner_properties": null,
"description": "The service ID"
},
"accepted_as": "path",
"required": true,
"deprecated": false,
"default": null,
"documentation_urls": []
},
{
"name": "Accept",
"tool_parameter_name": "versioning_header",
"description": "The `Accept` header is used as a versioning header.",
"value_schema": {
"val_type": "string",
"inner_val_type": null,
"enum": null,
"properties": null,
"inner_properties": null,
"description": "The `Accept` header is used as a versioning header."
},
"accepted_as": "header",
"required": true,
"deprecated": false,
"default": "application/vnd.pagerduty+json;version=2",
"documentation_urls": []
},
{
"name": "Content-Type",
"tool_parameter_name": "content_type",
"description": "",
"value_schema": {
"val_type": "string",
"inner_val_type": null,
"enum": [
"application/json"
],
"properties": null,
"inner_properties": null,
"description": ""
},
"accepted_as": "header",
"required": true,
"deprecated": false,
"default": "application/json",
"documentation_urls": []
},
{
"name": "requestBody",
"tool_parameter_name": "update_service_orchestration_rules",
"description": "Update Service Orchestration rules. Omitted rules and rule details are deleted.",
"value_schema": {
"val_type": "json",
"inner_val_type": null,
"enum": null,
"properties": null,
"inner_properties": null,
"description": "Update Service Orchestration rules. Omitted rules and rule details are deleted."
},
"accepted_as": "body",
"required": false,
"deprecated": false,
"default": null,
"documentation_urls": []
}
],
"documentation_urls": [],
"secrets": [
{
"arcade_key": "auth_token",
"parameter_name": "Authorization",
"accepted_as": "header",
"formatted_value": "Bearer {authorization}",
"description": "The OAuth token to use for authentication.",
"is_auth_token": true
}
],
"request_body_spec": "{\n \"description\": \"Update Service Orchestration rules. Omitted rules and rule details are deleted.\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"allOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"orchestration_path\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"default\": \"service\",\n \"readOnly\": true\n },\n \"parent\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"ID of the object these Orchestration Rules belongs to.\",\n \"readOnly\": true\n },\n \"type\": {\n \"type\": \"string\",\n \"description\": \"A string that determines the schema of the parent object\",\n \"readOnly\": true\n },\n \"self\": {\n \"type\": \"string\",\n \"format\": \"url\",\n \"description\": \"The API show URL at which the parent object is accessible\",\n \"readOnly\": true\n }\n },\n \"readOnly\": true\n },\n \"sets\": {\n \"type\": \"array\",\n \"description\": \"Must contain at least a \\\"start\\\" set, but can contain any number of additional sets that are routed to by other rules to form a directional graph of rules.\",\n \"items\": {\n \"type\": \"object\",\n \"description\": \"A set of rules\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The ID of this set of rules. Rules in other sets can route events into this set using the \\\"route_to\\\" properties.\",\n \"default\": \"start\"\n },\n \"rules\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"ID of the rule\",\n \"readOnly\": true\n },\n \"label\": {\n \"type\": \"string\",\n \"description\": \"A description of this rule's purpose.\"\n },\n \"conditions\": {\n \"type\": \"array\",\n \"description\": \"Each of these conditions is evaluated to check if an event matches this rule. The rule is considered a match if **any** of these conditions match.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"expression\": {\n \"type\": \"string\",\n \"description\": \"A PCL condition string\",\n \"example\": \"event.summary matches part 'my service error'\"\n }\n }\n }\n },\n \"actions\": {\n \"type\": \"object\",\n \"description\": \"When an event matches this rule, these are the actions that will be taken to change the resulting alert and incident.\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"description\": \"Indicates whether the rule is disabled and would therefore not be evaluated.\"\n }\n }\n }\n }\n }\n }\n },\n \"catch_all\": {\n \"type\": \"object\",\n \"description\": \"When none of the Rules in a set match an event, we apply the catch_all actions to the event.\",\n \"properties\": {\n \"actions\": {\n \"type\": \"object\",\n \"description\": \"These are the actions that will be taken to change the resulting alert and incident.\"\n }\n }\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"description\": \"The date/time the object was created.\",\n \"readOnly\": true\n },\n \"created_by\": {\n \"type\": \"object\",\n \"description\": \"Reference to the user that created the object.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"readOnly\": true\n },\n \"type\": {\n \"type\": \"string\",\n \"description\": \"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.\",\n \"readOnly\": true\n },\n \"self\": {\n \"type\": \"string\",\n \"format\": \"url\",\n \"description\": \"The API show URL at which the object is accessible\",\n \"readOnly\": true\n }\n },\n \"readOnly\": true\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"description\": \"The date/time the object was last updated.\",\n \"readOnly\": true\n },\n \"updated_by\": {\n \"type\": \"object\",\n \"description\": \"Reference to the user that last updated the object.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"readOnly\": true\n },\n \"type\": {\n \"type\": \"string\",\n \"description\": \"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.\",\n \"readOnly\": true\n },\n \"self\": {\n \"type\": \"string\",\n \"format\": \"url\",\n \"description\": \"The API show URL at which the object is accessible\",\n \"readOnly\": true\n }\n },\n \"readOnly\": true\n },\n \"version\": {\n \"type\": \"string\",\n \"description\": \"Version of these Orchestration Rules\",\n \"readOnly\": true\n }\n }\n }\n },\n \"required\": [\n \"orchestration_path\"\n ]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"orchestration_path\": {\n \"allOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"description\": \"The date/time the service's Event Rules were converted to this Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.\",\n \"readOnly\": true\n },\n \"migrated_by\": {\n \"type\": \"object\",\n \"description\": \"Reference to the user that converted the service's Event Rules to this Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"readOnly\": true\n },\n \"type\": {\n \"type\": \"string\",\n \"description\": \"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.\",\n \"readOnly\": true\n },\n \"self\": {\n \"type\": \"string\",\n \"format\": \"url\",\n \"description\": \"The API show URL at which the object is accessible\",\n \"readOnly\": true\n }\n },\n \"readOnly\": true\n },\n \"migrated_from\": {\n \"type\": \"object\",\n \"description\": \"Reference to the Service Event Rules that were converted to this Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"readOnly\": true\n },\n \"type\": {\n \"type\": \"string\",\n \"description\": \"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.\",\n \"readOnly\": true\n },\n \"self\": {\n \"type\": \"string\",\n \"format\": \"url\",\n \"description\": \"The API show URL at which the object is accessible\",\n \"readOnly\": true\n }\n },\n \"readOnly\": true\n },\n \"migrated_status\": {\n \"type\": \"string\",\n \"description\": \"The status indicating whether the service's Event Rules were successfully converted to this Service Orchestration. This property is only included if the `migrated_metadata` query parameter is provided.\",\n \"enum\": [\n \"completed\"\n ],\n \"readOnly\": true\n },\n \"migrated_via\": {\n \"type\": \"string\",\n \"description\": \"Indicates whether the conversion was performed via the PagerDuty API or PagerDuty website. This property is only included if the `migrated_metadata` query parameter is provided.\",\n \"enum\": [\n \"API\",\n \"UI\"\n ],\n \"readOnly\": true\n }\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"description\": \"Indicates that these are sets of rules belonging to a service.\",\n \"default\": \"service\"\n },\n \"parent\": {\n \"properties\": {\n \"id\": {\n \"description\": \"The ID of the Service this Orchestration belongs to.\"\n },\n \"type\": {\n \"enum\": [\n \"service_reference\"\n ]\n }\n }\n },\n \"sets\": {\n \"description\": \"A Service Orchestration must contain at least a \\\"start\\\" set, but can contain any number of additional sets that are routed to by other rules to form a directional graph.\",\n \"items\": {\n \"properties\": {\n \"rules\": {\n \"items\": {\n \"properties\": {\n \"actions\": {\n \"allOf\": [\n {\n \"properties\": {\n \"route_to\": {\n \"type\": \"string\",\n \"description\": \"The ID of a Set from this Service Orchestration whose rules you also want to use with event that match this rule.\"\n }\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"suppress\": {\n \"type\": \"boolean\",\n \"description\": \"If true, the resulting alert is suppressed. Suppressed alerts will not trigger an incident.\"\n },\n \"suspend\": {\n \"type\": \"integer\",\n \"description\": \"The number of seconds to suspend the resulting alert before triggering. This effectively pauses incident notifications. If a resolve event arrives before the alert triggers then PagerDuty won't create an incident for this the resulting alert.\"\n }\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"priority\": {\n \"type\": \"string\",\n \"description\": \"The ID of the priority you want to set on resulting incident. You can find the list of priority IDs for your account by calling the priorities endpoint.\",\n \"example\": \"P53ZZH5\"\n },\n \"escalation_policy\": {\n \"type\": \"string\",\n \"description\": \"The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.\",\n \"example\": \"PQOMK4S\"\n },\n \"annotate\": {\n \"type\": \"string\",\n \"description\": \"Add this text as a note on the resulting incident. AIOps users can additionally use the {{event}} variable to include elements of the event payload in the note.\"\n }\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"severity\": {\n \"type\": \"string\",\n \"description\": \"Set the severity of the resulting alert.\",\n \"enum\": [\n \"info\",\n \"error\",\n \"warning\",\n \"critical\"\n ]\n },\n \"event_action\": {\n \"type\": \"string\",\n \"description\": \"Set whether the resulting alert status is trigger or resolve.\",\n \"enum\": [\n \"trigger\",\n \"resolve\"\n ]\n },\n \"variables\": {\n \"type\": \"array\",\n \"description\": \"Populate variables from event payloads and use those variables in other event actions.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of the variable\",\n \"example\": \"server_name\"\n },\n \"path\": {\n \"type\": \"string\",\n \"description\": \"Path to a field in an event, in dot-notation.\",\n \"example\": \"event.summary\"\n },\n \"type\": {\n \"type\": \"string\",\n \"description\": \"The type of operation to populate the variable. Currently only Regex-based variable extraction is supported.\",\n \"enum\": [\n \"regex\"\n ]\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used.\",\n \"example\": \"High CPU on (.*) server\"\n }\n }\n }\n },\n \"extractions\": {\n \"type\": \"array\",\n \"description\": \"Dynamically extract values to set and modify new and existing PD-CEF fields.\",\n \"items\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"description\": \"Use a template string & variables\",\n \"properties\": {\n \"target\": {\n \"type\": \"string\",\n \"description\": \"The PD-CEF field that will be set with the value from the template.\",\n \"example\": \"event.summary\"\n },\n \"template\": {\n \"type\": \"string\",\n \"description\": \"A value that will be used to populate the target PD-CEF field. You can include variables extracted from the payload by using string interpolation.\",\n \"example\": \"High CPU on {{hostname}} server\"\n }\n }\n },\n {\n \"type\": \"object\",\n \"description\": \"Use a regex to extract a value\",\n \"properties\": {\n \"target\": {\n \"type\": \"string\",\n \"description\": \"The PD-CEF field that will be set with the value from the regex.\",\n \"example\": \"event.custom_details.server\"\n },\n \"regex\": {\n \"type\": \"string\",\n \"description\": \"A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used.\",\n \"example\": \"High CPU on (.*) server\"\n },\n \"source\": {\n \"type\": \"string\",\n \"description\": \"The path to the event field where the regex will be applied to extract a value.\",\n \"example\": \"event.summary\"\n }\n }\n }\n ]\n }\n }\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"pagerduty_automation_actions\": {\n \"type\": \"array\",\n \"description\": \"Configure an Automation Action to be run for certain alert states.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"action_id\": {\n \"type\": \"string\",\n \"description\": \"Automation Action ID\"\n },\n \"trigger_types\": {\n \"type\": \"array\",\n \"description\": \"The Automation Action will be triggered whenever an alert reaches the specified state\",\n \"minItems\": 1,\n \"maxItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"alert_triggered\",\n \"alert_suppressed\",\n \"alert_suspended\"\n ]\n }\n }\n }\n }\n }\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"automation_actions\": {\n \"type\": \"array\",\n \"description\": \"Create a Webhoook associated with the resulting incident.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of the Webhook.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"description\": \"The API endpoint where PagerDuty's servers will send the webhook request.\"\n },\n \"auto_send\": {\n \"type\": \"boolean\",\n \"description\": \"When true, PagerDuty's servers will automatically send this webhook request as soon as the resulting incident or alert is created. When false, your incident responder will be able to manually trigger the Webhook via the PagerDuty website & mobile app.\",\n \"default\": false\n },\n \"headers\": {\n \"type\": \"array\",\n \"description\": \"Specify custom key/value pairs that'll be sent with the webhook request as request headers.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"key\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"AIOps users can additionally use the {{event}} variable to include elements of the event payload in the header value.\"\n }\n }\n }\n },\n \"trigger_types\": {\n \"type\": \"array\",\n \"description\": \"The Webhook will be associated (or automatically triggered, if `auto_send` is `true`) with the incident, whenever an alert reaches the specified state\\n\\nNote: `auto_send` must be `true` for trigger types of `alert_suppressed` and `alert_suspended`\\n\",\n \"minItems\": 1,\n \"maxItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"alert_triggered\",\n \"alert_suppressed\",\n \"alert_suspended\"\n ]\n }\n },\n \"parameters\": {\n \"type\": \"array\",\n \"description\": \"Specify custom key/value pairs that'll be included in the webhook request's JSON payload.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"key\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"AIOps users can additionally use the {{event}} variable to include elements of the event payload in the parameter value.\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"incident_custom_field_updates\": {\n \"type\": \"array\",\n \"description\": \"Configure custom field updates for the incident.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Unique identifier for the custom field resource. You can find the list of IDs by calling the List Custom Fields endpoint.\",\n \"example\": \"PEXCK89\"\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"A value that will be used to populate the specified Incident Custom Field. AIOps users can additionally use the {{event}} variable to include elements of the event payload in the custom field value.\",\n \"example\": \"High CPU on server\"\n }\n }\n }\n }\n }\n }\n ]\n }\n }\n }\n }\n }\n }\n },\n \"catch_all\": {\n \"properties\": {\n \"actions\": {\n \"allOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"suppress\": {\n \"type\": \"boolean\",\n \"description\": \"If true, the resulting alert is suppressed. Suppressed alerts will not trigger an incident.\"\n },\n \"suspend\": {\n \"type\": \"integer\",\n \"description\": \"The number of seconds to suspend the resulting alert before triggering. This effectively pauses incident notifications. If a resolve event arrives before the alert triggers then PagerDuty won't create an incident for this the resulting alert.\"\n }\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"priority\": {\n \"type\": \"string\",\n \"description\": \"The ID of the priority you want to set on resulting incident. You can find the list of priority IDs for your account by calling the priorities endpoint.\",\n \"example\": \"P53ZZH5\"\n },\n \"escalation_policy\": {\n \"type\": \"string\",\n \"description\": \"The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.\",\n \"example\": \"PQOMK4S\"\n },\n \"annotate\": {\n \"type\": \"string\",\n \"description\": \"Add this text as a note on the resulting incident. AIOps users can additionally use the {{event}} variable to include elements of the event payload in the note.\"\n }\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"severity\": {\n \"type\": \"string\",\n \"description\": \"Set the severity of the resulting alert.\",\n \"enum\": [\n \"info\",\n \"error\",\n \"warning\",\n \"critical\"\n ]\n },\n \"event_action\": {\n \"type\": \"string\",\n \"description\": \"Set whether the resulting alert status is trigger or resolve.\",\n \"enum\": [\n \"trigger\",\n \"resolve\"\n ]\n },\n \"variables\": {\n \"type\": \"array\",\n \"description\": \"Populate variables from event payloads and use those variables in other event actions.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of the variable\",\n \"example\": \"server_name\"\n },\n \"path\": {\n \"type\": \"string\",\n \"description\": \"Path to a field in an event, in dot-notation.\",\n \"example\": \"event.summary\"\n },\n \"type\": {\n \"type\": \"string\",\n \"description\": \"The type of operation to populate the variable. Currently only Regex-based variable extraction is supported.\",\n \"enum\": [\n \"regex\"\n ]\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used.\",\n \"example\": \"High CPU on (.*) server\"\n }\n }\n }\n },\n \"extractions\": {\n \"type\": \"array\",\n \"description\": \"Dynamically extract values to set and modify new and existing PD-CEF fields.\",\n \"items\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"description\": \"Use a template string & variables\",\n \"properties\": {\n \"target\": {\n \"type\": \"string\",\n \"description\": \"The PD-CEF field that will be set with the value from the template.\",\n \"example\": \"event.summary\"\n },\n \"template\": {\n \"type\": \"string\",\n \"description\": \"A value that will be used to populate the target PD-CEF field. You can include variables extracted from the payload by using string interpolation.\",\n \"example\": \"High CPU on {{hostname}} server\"\n }\n }\n },\n {\n \"type\": \"object\",\n \"description\": \"Use a regex to extract a value\",\n \"properties\": {\n \"target\": {\n \"type\": \"string\",\n \"description\": \"The PD-CEF field that will be set with the value from the regex.\",\n \"example\": \"event.custom_details.server\"\n },\n \"regex\": {\n \"type\": \"string\",\n \"description\": \"A RE2 regular expression. If it contains one or more capture groups, their values will be extracted and appended together. If it contains no capture groups, the whole match is used.\",\n \"example\": \"High CPU on (.*) server\"\n },\n \"source\": {\n \"type\": \"string\",\n \"description\": \"The path to the event field where the regex will be applied to extract a value.\",\n \"example\": \"event.summary\"\n }\n }\n }\n ]\n }\n }\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"pagerduty_automation_actions\": {\n \"type\": \"array\",\n \"description\": \"Configure an Automation Action to be run for certain alert states.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"action_id\": {\n \"type\": \"string\",\n \"description\": \"Automation Action ID\"\n },\n \"trigger_types\": {\n \"type\": \"array\",\n \"description\": \"The Automation Action will be triggered whenever an alert reaches the specified state\",\n \"minItems\": 1,\n \"maxItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"alert_triggered\",\n \"alert_suppressed\",\n \"alert_suspended\"\n ]\n }\n }\n }\n }\n }\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"automation_actions\": {\n \"type\": \"array\",\n \"description\": \"Create a Webhoook associated with the resulting incident.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of the Webhook.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"description\": \"The API endpoint where PagerDuty's servers will send the webhook request.\"\n },\n \"auto_send\": {\n \"type\": \"boolean\",\n \"description\": \"When true, PagerDuty's servers will automatically send this webhook request as soon as the resulting incident or alert is created. When false, your incident responder will be able to manually trigger the Webhook via the PagerDuty website & mobile app.\",\n \"default\": false\n },\n \"headers\": {\n \"type\": \"array\",\n \"description\": \"Specify custom key/value pairs that'll be sent with the webhook request as request headers.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"key\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"AIOps users can additionally use the {{event}} variable to include elements of the event payload in the header value.\"\n }\n }\n }\n },\n \"trigger_types\": {\n \"type\": \"array\",\n \"description\": \"The Webhook will be associated (or automatically triggered, if `auto_send` is `true`) with the incident, whenever an alert reaches the specified state\\n\\nNote: `auto_send` must be `true` for trigger types of `alert_suppressed` and `alert_suspended`\\n\",\n \"minItems\": 1,\n \"maxItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"alert_triggered\",\n \"alert_suppressed\",\n \"alert_suspended\"\n ]\n }\n },\n \"parameters\": {\n \"type\": \"array\",\n \"description\": \"Specify custom key/value pairs that'll be included in the webhook request's JSON payload.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"key\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"AIOps users can additionally use the {{event}} variable to include elements of the event payload in the parameter value.\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"incident_custom_field_updates\": {\n \"type\": \"array\",\n \"description\": \"Configure custom field updates for the incident.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Unique identifier for the custom field resource. You can find the list of IDs by calling the List Custom Fields endpoint.\",\n \"example\": \"PEXCK89\"\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"A value that will be used to populate the specified Incident Custom Field. AIOps users can additionally use the {{event}} variable to include elements of the event payload in the custom field value.\",\n \"example\": \"High CPU on server\"\n }\n }\n }\n }\n }\n }\n ]\n }\n }\n }\n }\n }\n ]\n }\n },\n \"example\": {\n \"orchestration_path\": {\n \"type\": \"service\",\n \"parent\": {\n \"id\": \"PC2D9ML\",\n \"self\": \"https://api.pagerduty.com/service/PC2D9ML\",\n \"type\": \"service_reference\"\n },\n \"self\": \"https://api.pagerduty.com/event_orchestrations/service/PC2D9ML\",\n \"sets\": [\n {\n \"id\": \"start\",\n \"rules\": [\n {\n \"label\": \"Always apply some consistent event transformations to all events\",\n \"id\": \"c91f72f3\",\n \"conditions\": [],\n \"actions\": {\n \"variables\": [\n {\n \"name\": \"hostname\",\n \"path\": \"event.component\",\n \"value\": \"hostname: (.*)\",\n \"type\": \"regex\"\n }\n ],\n \"extractions\": [\n {\n \"template\": \"{{variables.hostname}}\",\n \"target\": \"event.custom_details.hostname\"\n },\n {\n \"source\": \"event.source\",\n \"regex\": \"www (.*) service\",\n \"target\": \"event.source\"\n }\n ],\n \"incident_custom_field_updates\": [\n {\n \"id\": \"PEXCK89\",\n \"value\": \"#my-team-channel\"\n },\n {\n \"id\": \"PN1C4A2\",\n \"value\": \"{{event.timestamp}}\"\n }\n ],\n \"route_to\": \"step-two\"\n }\n }\n ]\n },\n {\n \"id\": \"step-two\",\n \"rules\": [\n {\n \"label\": \"All critical alerts should be treated as P1 incidents\",\n \"id\": \"7c54529d\",\n \"conditions\": [\n \"event.severity matches 'critical'\"\n ],\n \"actions\": {\n \"annotate\": \"Please use our P1 runbook: https://docs.test/p1-runbook\",\n \"priority\": \"P0IN2KQ\",\n \"suppress\": false,\n \"incident_custom_field_updates\": [\n {\n \"id\": \"PEXCK89\",\n \"value\": \"#p1-incident-response\"\n }\n ]\n }\n },\n {\n \"label\": \"If the API endpoints return HTTP 502 run an Automation Action that restarts the service\",\n \"id\": \"8a874630\",\n \"conditions\": [\n \"event.custom_details.http_status_code equals '502'\"\n ],\n \"actions\": {\n \"pagerduty_automation_actions\": [\n {\n \"action_id\": \"01CSB5SMOKCKVRI5GN0LJG7SMB\",\n \"trigger_types\": [\n \"alert_triggered\"\n ]\n }\n ]\n }\n },\n {\n \"label\": \"If there's something wrong on the canary let the team know about it in our deployments Slack channel\",\n \"id\": \"1f6d9a33\",\n \"conditions\": [\n \"event.custom_details.hostname matches part 'canary'\"\n ],\n \"actions\": {\n \"automation_actions\": [\n {\n \"name\": \"Canary Slack Notification\",\n \"url\": \"https://our-slack-listerner.test/send-notification\",\n \"auto_send\": true,\n \"headers\": [\n {\n \"key\": \"X-Notification-Source\",\n \"value\": \"PagerDuty Incident Webhook\"\n }\n ],\n \"parameters\": [\n {\n \"key\": \"channel\",\n \"value\": \"#my-team-channel\"\n },\n {\n \"key\": \"message\",\n \"value\": \"Something is wrong with the canary deployment\"\n }\n ],\n \"trigger_types\": [\n \"alert_triggered\"\n ]\n }\n ],\n \"incident_custom_field_updates\": [\n {\n \"id\": \"PEXCK89\",\n \"value\": \"#my-team-channel\"\n }\n ]\n }\n },\n {\n \"label\": \"Pause the alert and trigger a reboot action if flaky server receives an error\",\n \"id\": \"c0163dbe\",\n \"conditions\": [\n {\n \"expression\": \"event.custom_details.hostname matches part 'staging'\"\n }\n ],\n \"actions\": {\n \"suspend\": 300,\n \"pagerduty_automation_actions\": [\n {\n \"action_id\": \"01CSBCGJXMG7ABIJZKPD8P9RCL\",\n \"trigger_types\": [\n \"alert_suspended\"\n ]\n }\n ]\n }\n },\n {\n \"label\": \"Never bother the on-call for info-level events outside of work hours\",\n \"id\": \"cd770384\",\n \"conditions\": [\n \"event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\"\n ],\n \"actions\": {\n \"suppress\": true\n }\n }\n ]\n }\n ],\n \"catch_all\": {\n \"actions\": {\n \"suppress\": true,\n \"incident_custom_field_updates\": [\n {\n \"id\": \"PEXCK89\",\n \"value\": \"#general-incident-notifications\"\n }\n ]\n }\n },\n \"created_at\": \"2021-11-18T16:42:01Z\",\n \"created_by\": {\n \"id\": \"P8B9WR8\",\n \"self\": \"https://api.pagerduty.com/users/P8B9WR8\",\n \"type\": \"user_reference\"\n },\n \"updated_at\": \"2021-11-18T16:42:01Z\",\n \"updated_by\": {\n \"id\": \"P8B9WR8\",\n \"self\": \"https://api.pagerduty.com/users/P8B9WR8\",\n \"type\": \"user_reference\"\n },\n \"migrated_at\": \"2023-06-14T13:51:31Z\",\n \"migrated_by\": {\n \"id\": \"P8B9WR8\",\n \"self\": \"https://api.pagerduty.com/users/P8B9WR8\",\n \"type\": \"user_reference\"\n },\n \"migrated_from\": {\n \"id\": \"PC2D9ML\",\n \"self\": \"https://api.pagerduty.com/services/PC2D9ML/rules\",\n \"type\": \"service_event_rules_reference\"\n },\n \"migrated_status\": \"completed\",\n \"migrated_via\": \"UI\",\n \"version\": \"rn1Mja13T1HBdmPChqFilSQXUW2fWXM_\"\n }\n }\n }\n ]\n },\n \"examples\": {\n \"request\": {\n \"summary\": \"Example Request\",\n \"value\": {\n \"orchestration_path\": {\n \"sets\": [\n {\n \"id\": \"start\",\n \"rules\": [\n {\n \"label\": \"Always apply some consistent event transformations to all events\",\n \"id\": \"c91f72f3\",\n \"conditions\": [],\n \"actions\": {\n \"variables\": [\n {\n \"name\": \"hostname\",\n \"path\": \"event.component\",\n \"value\": \"hostname: (.*)\",\n \"type\": \"regex\"\n }\n ],\n \"extractions\": [\n {\n \"template\": \"{{variables.hostname}}\",\n \"target\": \"event.custom_details.hostname\"\n },\n {\n \"source\": \"event.source\",\n \"regex\": \"www (.*) service\",\n \"target\": \"event.source\"\n }\n ],\n \"pagerduty_automation_actions\": [\n {\n \"action_id\": \"01CSB5SMOKCKVRI5GN0LJG7SMB\",\n \"trigger_types\": [\n \"alert_triggered\"\n ]\n }\n ],\n \"incident_custom_field_updates\": [\n {\n \"id\": \"PEXCK89\",\n \"value\": \"#my-team-channel\"\n },\n {\n \"id\": \"PN1C4A2\",\n \"value\": \"{{event.timestamp}}\"\n }\n ],\n \"route_to\": \"step-two\"\n }\n }\n ]\n },\n {\n \"id\": \"step-two\",\n \"rules\": [\n {\n \"label\": \"All critical alerts should be treated as P1 incidents\",\n \"id\": \"7c54529d\",\n \"conditions\": [\n {\n \"expression\": \"event.severity matches 'critical'\"\n }\n ],\n \"actions\": {\n \"annotate\": \"Please use our P1 runbook: https://docs.test/p1-runbook\",\n \"priority\": \"P0IN2KQ\",\n \"suppress\": false,\n \"incident_custom_field_updates\": [\n {\n \"id\": \"PEXCK89\",\n \"value\": \"#p1-incident-response\"\n }\n ]\n }\n },\n {\n \"label\": \"If there's something wrong on the canary let the team know about it in our deployments Slack channel\",\n \"id\": \"1f6d9a33\",\n \"conditions\": [\n {\n \"expression\": \"event.custom_details.hostname matches part 'canary'\"\n }\n ],\n \"actions\": {\n \"automation_actions\": [\n {\n \"name\": \"Canary Slack Notification\",\n \"url\": \"https://our-slack-listerner.test/send-notification\",\n \"auto_send\": true,\n \"headers\": [\n {\n \"key\": \"X-Notification-Source\",\n \"value\": \"PagerDuty Incident Webhook\"\n }\n ],\n \"parameters\": [\n {\n \"key\": \"channel\",\n \"value\": \"#my-team-channel\"\n },\n {\n \"key\": \"message\",\n \"value\": \"Something is wrong with the canary deployment\"\n }\n ],\n \"trigger_types\": [\n \"alert_triggered\"\n ]\n }\n ],\n \"incident_custom_field_updates\": [\n {\n \"id\": \"PEXCK89\",\n \"value\": \"#my-team-channel\"\n }\n ]\n }\n },\n {\n \"label\": \"Pause the alert and trigger a reboot action if flaky server receives an error\",\n \"id\": \"c0163dbe\",\n \"conditions\": [\n {\n \"expression\": \"event.custom_details.hostname matches part 'staging'\"\n }\n ],\n \"actions\": {\n \"suspend\": 300,\n \"pagerduty_automation_actions\": [\n {\n \"action_id\": \"01CSBCGJXMG7ABIJZKPD8P9RCL\",\n \"trigger_types\": [\n \"alert_suspended\"\n ]\n }\n ]\n }\n },\n {\n \"label\": \"Never bother the on-call for info-level events outside of work hours\",\n \"id\": \"cd770384\",\n \"conditions\": [\n {\n \"expression\": \"event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\"\n }\n ],\n \"actions\": {\n \"suppress\": true\n }\n }\n ]\n }\n ],\n \"catch_all\": {\n \"actions\": {\n \"suppress\": true\n },\n \"incident_custom_field_updates\": [\n {\n \"id\": \"PEXCK89\",\n \"value\": \"#general-incident-notifications\"\n }\n ]\n }\n }\n }\n }\n }\n }\n }\n}",
"use_request_body_schema_mode": true,
"validate_request_body_schema": true
}
}