Documentation is now available for the Fall 2020 Update release!

Update alert escalation policy

This endpoint is used to update an alert escalation policy.

Leave Feedback

URL

POST https://{api-url}/api/v2/tenants/{tenantId}/escalations/{id}

Sample URLs

https://{api-url}/api/v2/tenants/msp_5/escalations/POLICY-a0250f66-bf3a-7568-edef-83e7e8ac4231
https://{api-url}/api/v2/tenants/client_7/escalations/POLICY-e231dcc6-b338-466e-afc4-6638fc6de9a9

Header format

HeaderValue
AuthorizationBearer {accessToken}
Content-typeapplication/json
Acceptapplication/json

Status code

200 OK

Parameters

FieldSub-FieldsData TypeValuesDescription
nameNA StringNA(Optional) Escalation policy name.
descriptionNAStringNA(Optional) Escalation policy description.
resources
  1. id
  2. type
String
  1. NA
  2. Resource type
    1. DEVICE
    2. DEVICEGROUP
    3. SERVICEGROUP
    4. LOCATION
    5. CLIENT
(Optional) Resources on which the policy would be applied.
  1. Resource ID
  2. Resource type Example: DEVICE,Use the following APIs to fetch the resource types:
    1. Search Devices or Get Minimal Details of Resources API to fetch the list of devices or resources in a client.
    2. Get Child Device Groups and Get Root Level Device Groups to fetch the list of device groups.
    3. Get Service Groups to fetch the list of service groups.
    4. Search Sites to fetch the list of sites.
    5. Search Clients to fetch the list of clients. Only partner users have permission to fetch the details of client.
enabledModeN/AStringON, OFF, RECOMMEND, and OBSERVED.(Optional) Mode for the alert escalation policy. RECOMMEND and OBSERVED modes are only applicable for incident actions.
filterCriteria1. matchingTypeStringALL, ANY(Optional) Define alert conditions for the policy. Only the filtered alerts are escalated. All the alerts on the resource will match this policy if NO condition is defined. Match ANY or ALL of the filter rules.
2. rules: Conditions to filter the alerts.
1. keyStringAlert: Created Date
Alert: Description
Alert: Event Type
Alert: Healed Time
Alert: Metric
Alert: No of Occurrence
Alert: Source
Alert: State
Alert: Subject
Alert: Type
Alert: Update Time
Resource: Aws Account Id
Resource: Aws Instance Name
Resource: Instance Id
Resource: Resource IP
Resource: Resource Name
Resource: Resource Type
Unique attribute to filter the alert.Use Get Alert Types API to fetch the list of alert types.Alert: Occurrence Frequency: Escalate alerts which trigger repeatedly despite Acknowledge/Suppress actions. Below are the fields for alert occurrence frequency:

occurrences
  • Datatype: Integer
  • Description: Rate at which an alert triggers repeatedly over a particular duration. Example: 5

frequency
  • Data Type: Integer
  • Description: Duration in which alert triggers repeatedly. Example: 2

frequencyType
  • Data Type: String
  • Description: Provide the type of duration.Supported values: hours, days, weeks. Example: days
Consider a scenario where a user wants to escalate alerts which trigger repeatedly for 5 times in 2 days. For this scenario, the values are provided as
"occurrences": 5
"frequency": 2
"frequencyType": "days"
2. operatorStringContains, Not Contains, Equals, Not Equals, Starts with, Ends with, Regex, IsOperating values to filter the resource types. Operators Is and Is Not are applicable only for "key": "Resource: Resource Type"
3. valueStringNAUnique information of alert. Example: Critical.
Example for filter rules: key: Alert: Subject, operator: Contains, value: Critical, this implies that filter the alerts that contain the subject critical.
escalationTypeNAStringMANUAL, AUTOMATICEscalation rules are actions to be taken when an alert is not acknowledged within the desired time. OpsRamp supports manual and automatic escalation types.
If escalation Type is Manual, then escalations would be:
escalationsrecipients

1. id (or) name

StringNA(Optional) Users to contact directly. User ID (or) name.
2. typeString
  1. USERS
  2. USER GROUPS
  3. ROSTERS
  4. USERGROUP_DL
User type. Use the following APIs to fetch the user types for the escalation:
  1. Search Users to fetch the list of users.
  2. Search User Groups to fetch the list of user groups.
  3. here to know more about User Group Distributed List. Provide only the user group IDs which have distributed list of email addresses configured in OpsRamp.
If escalation Type is Automatic, then escalations would be:
escalations1. waitMinsInteger0 to 30 mins, 45 mins
1 to 6 hours, 12 hours
1 day, 3 days, 5 days, 7 days, 10 days
Configure the time interval to escalate an alert after it is generated. Escalate after the alert has elapsed the set time.
Convert hours and days to minutes and provide the minutes time format. Example: For 6 hours provide the value as 360 minutes.
2. actionStringNOTIFICATION
INCIDENT
Escalation action to be taken.Escalate as Notification implies to send periodic notifications to users until the alert is acknowledged. Escalate as Incident implies to automatically create an incident from the alert and assign it to the desired user or team.

NA indicates that the value is not applicable.

The table below has detailed information on escalation actions: Notification and Incident for escalation type Automatic.

FieldSub-FieldsData TypeValuesDescription
escalationsaction: NOTIFICATION
  1. recipients
    1. id (or) name
    2. type
  1. String
  2. String
  1. NA
  2. Recipient types:
    1. USER
    2. USER GROUPS
    3. ROSTERS
    4. USERGROUP_DL
Recipients who would receive the alert notifications.
  1. Recipient ID (or) name.
  2. Recipient type. Example: USERUse the following APIs to fetch the recipient types:
    1. Search Users to fetch the list of users.
    2. Search User Groups to fetch the list of user groups.
    3. Search Rosters to fetch the list of Rosters.
    4. User Group which has distributed list of email addresses. Click here to know more about User Group Distribution List. Provide only the user group IDs which have distributed list of email address configured in OpsRamp.
2. priorityString
  • Very Low
  • Low
  • Normal
  • High
  • Urgent
Priority of the notification.
3. repeatFrequencyInteger5 mins, 10 mins, 15 mins, 20 mins, 30 mins, 1 hour, 2 hours, 3 hours, 4 hours, 6 hours, 8 hours, 12 hours, 24 hoursRepeat alert notification at specific time intervals. Example: If repeatFrequency is set as 15 minutes, then the alert notification would repeat every 15 minutes until the alert is acknowledged.
Convert hours to minutes.
4. notifyLimitCountInteger1 through 10Number of repeated notifications a user has to receive within a certain time interval. For example, if repeatFrequency: 15 and notifyLimitCount: 5. The above example indicates that user receives notifications every 15 minutes and stops receiving after 5 notifications. When a notification limit count is not provided, the default notifyLimitCount is 2.
5. alertStateTransitionFromStringCRITICAL, WARNINGEscalate alerts as notification on a change in alert state. For example, escalate alerts as notification when alert state changes from Warning to Critical. The notification is a one-time notification sent at the time of the state transition.
escalationsaction: INCIDENTAn Incident is automatically created from the alert and assigned to the desired user/team.
  1. Create New Incident
  2. Update Incident
No further level of escalation can be added as the escalation will end when an incident is created from the alert.
1. incident.
Create New Incident: Configure the properties of an incident that will be created when an alert's condition matches with this policy.
    1. Assignee Group
  • uniqueId
  • name
StringNAEscalate incident to a user group who would be responsible for working on the incident

 2. Assign

  • id
  • name
StringNAEscalate incident to a user
    3. CustomFields
  • id
  • name
  • value
StringNAUser customized fields. User can include additional information of incident by creating custom fields. Use Get Incident Custom Fields to get the custom forms of incident.
    4. businessImpact
  • uniqueId
StringNAThe severity of an incident on the business. Use Get Business Impacts to get the list of defined business impacts.
     5. urgency
  • uniqueId
StringNAUrgency to prioritize and work on the incident. Use Get Urgencies to get the list of defined urgencies.
     6. PriorityStringLow, Normal, High, Urgent, Very LowPriority of the incident. This can be defined with respect to business impact and urgency.
     7. Cc
  • toEmail
StringNAUser would receive the incident notifications via email.
2. updateIncident: Configure how to update an existing incident of an escalated alert.

If an Open incident (other than Closed) is available for the alert, the incident gets updated instead of creating a new incident.

  1. none
  2. withAlertState
(One of the above fields is mandatory.)
 String1. true, false
2. true, false
Update incident with respect to alert state.
  1. The latest description is appended on the alert. NO change to the status of the incident is made based on escalated alert's state.
  2. The incident gets updated every time the escalated alert repeats with a state change.
 3. priorityRules
  1. key
  2. operator
  3. value
  4. businessImpact
    • uniqueId
  5. urgency
    • uniqueId
  6. priority
  1. String
  2. String
  3. String
  4. String
  5. String
  6. String
  1. Value for key is [currentState.code].
  2. Supported value for operator - Is.
  3. Supported values for the priority rule value are Warning, Critical.
  4. ID of the business impact.
  5. Urgency to prioritize the incident.
  6. Supported value for priority are Low, Normal, High, Urgent, Very Low.
3. Update incident priority based on these rules:
  1. Unique attribute of the alert. Example: Alert State
  2. Operating values to filter the incident. Example: Is
  3. Status of the incident. Example: Critical
  4. The severity of an incident on the business. Use Get Business Impacts to get the list of defined business impacts.
  5. Urgency to prioritize and work on the incident. Use Get Urgencies to get the list of defined urgencies.
  6. Priority of the incident. This can be defined with respect to business impact and urgency.
 4. notifyIncident
  1. forEveryUpdate
  2. whenAlertStateChanged

(Either sub-field is mandatory)

 StringNANotify users when incident is updated due to change in alert state.

Sample 1: AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED_TICKETED

This sample code updates an escalation alert policy with an escalationType of AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED_TICKETED.

Sample 1 request

{
	"name": "Create escalate alert policy API",
	"description": "Test description",
	"enabledMode": "ON",
	"resources": [{
		"id": "bf3a10a2-92f1-4610-b3f4-174ed83db7b9",
		"type": "RESOURCE"
	}, {
		"id": "DGP-0b165e70-7152-49f1-bfe3-ebe77409d5f2",
		"type": "DEVICEGROUP"
	}, {
		"id": "SGP-11f1a6a8-acc8-411f-86c1-b693dd8e9817",
		"type": "SERVICEGROUP"
	}, {
		"id": "7_AWS",
		"type": "LOCATION"
	}, {
		"id": "client_7",
		"type": "CLIENT"
	}],
	"filterCriteria": {
		"matchingType": "ANY",
		"rules": [{
			"key": "Alert : Description",
			"operator": "CONTAINS",
			"value": "critical"
		}, {
			"key": "Alert : Occurrence Frequency",
			"operator": "GREATERTHANOREQUALTO",
			"value": {
				"occurrences": "5",
				"frequency": "2",
				"frequencyType": "hours"
			}
		}, {
			"key": "Resource : Resource Type",
			"operator": "MATCH",
			"value": "DEVICE"
            	}]
	},
	"escalationType": "AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED_TICKETED",
	"escalations": [{
		"waitMins": 5,
		"priority": "Low",
		"repeatFrequency": 5,
		"action": "NOTIFICATION",
		"recipients": [{
				"id": "ES-de9bfd9f-d8ee-430f-4bc0-e6e4645cdb47",
				"name": "Cloud roster",
				"type": "ROSTER"
			},
			{
				"id": "USR0000000028",
				"name": "AP_User",
				"type": "USER"
			},
			{
				"id": "USRGRP-9498fc95-67b7-3477-953f-1ec70bf0c61d",
				"name": "Cloud group",
				"type": "USERGROUP"
			},
			{
				"id": "USRGRP-9498fc95-67b7-3477-953f-1ec70bf0c61d",
				"name": "Ops group",
				"type": "USERGROUP_DL"
			}
		]
	}, {
		"waitMins": 5,
		"action": "INCIDENT",
		"updateIncident": {
			"none": "true",
			"withAlertState": "true",
			"priorityRules": [{
				"key": "currentState.code",
				"operator": "Is",
				"value": "Warning",
				"businessImpact": {
					"uniqueId": "SIMPACT-e8853b21-ebc5-dd1d-d9a3-7a7b121a5e0f"
				},
				"urgency": {
					"uniqueId": "SURG-09358506-4af1-4d35-b902-cd3b14a00c10"
				},
				"priority": "High"
			}]
		},
		"notifyIncident": "whenAlertStateChanged",
		"incident": {
			"priority": "Very Low",
			"assigneeGroup": {
				"uniqueId": "USRGRP-4189ae2e-bcf5-f686-26d0-8b6eabd91558",
				"name": "Test Group"
			},
			"assignedUser": {
				"id": "USR0000000030",
				"loginName": "Ops_User"
			},
			"customFields": [{
					"id": "UDF0000000002",
					"name": "test_cutom_2",
					"value": "2"
				},
				{
					"id": "UDF0000000004",
					"name": "esc_custom_field_4",
					"value": "request custom field - text"
				}
			],
			"cc": "tester1@opsramp.com",
			"toEmail": "tester2@opsramp.com"
		}
	}]
}	

Sample 1 response

{
	"id": "POLICY-e29f63f3-951a-4b41-a2a9-94835f6e9a42",
	"name": "Create escalate alert policy API",
	"description": "Test description",
	"policyType": "ESCALATION_POLICY",
	"clientMatchingType": "ALL",
	"createdDate": "2017-05-15T10:35:51+0000",
	"updatedDate": "2017-05-15T10:35:51+0000",
	"active": true,
	"enabledMode": "ON",
	"scope": {
		"id": 7,
		"uniqueId": "client_7",
		"name": "Netenrich  Client",
		"activated": true
	},
	"createdBy": {
		"loginName": "ops_admin_user",
		"firstName": "Ops Admin",
		"email": "opsuser@opsramp.com"
	},
	"updatedBy": {
		"loginName": "ops_admin_user",
		"lastName": " ",
		"firstName": "Ops Admin",
		"email": "opsuser@opsramp.com"
	},
	"resources": [{
			"id": "bf3a10a2-92f1-4610-b3f4-174ed83db7b9",
			"name": "LPT00001",
			"type": "RESOURCE"
		},
		{
			"id": "7_AWS",
			"name": "AWS",
			"type": "LOCATION"
		},
		{
			"id": "DGP-0b165e70-7152-49f1-bfe3-ebe77409d5f2",
			"name": "Test Group",
			"type": "DEVICEGROUP"
		},
		{
			"id": "SGP-11f1a6a8-acc8-411f-86c1-b693dd8e9817",
			"name": "Test SG",
			"type": "SERVICEGROUP"
		},
		{
			"id": "client_6",
			"name": "Ops Client",
			"type": "CLIENT"
		}
	],
	"filterCriteria": {
		"matchingType": "ALL",
		"rules": [{
			"key": "Alert : Description",
			"operator": "CONTAINS",
			"value": "critical"
		}, {
			"key": "Alert : Occurrence Frequency",
			"operator": "GREATERTHANOREQUALTO",
			"value": {
				"occurrences": "5",
				"frequency": "2",
				"frequencyType": "hours"
			}
		}, {
			"key": "Resource : Resource Type",
			"operator": "MATCH",
			"value": "DEVICE"
            	}]
	},
	"escalationType": "AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED_TICKETED",
	"escalations": [{
			"waitMins": 5,
			"priority": "Low",
			"repeatFrequency": 5,
			"action": "NOTIFICATION",
			"recipients": [{
					"id": "USR0000000028",
					"name": "AP_User",
					"type": "USER"
				},
				{
					"id": "USRGRP-9498fc95-67b7-3477-953f-1ec70bf0c61d",
					"name": "Cloud group",
					"type": "USERGROUP"
				},
				{
					"id": "ES-de9bfd9f-d8ee-430f-4bc0-e6e4645cdb47",
					"name": "Cloud roster",
					"type": "ROSTER"
				},
				{
					"id": "USRGRP-9498fc95-67b7-3477-953f-1ec70bf0c61d",
					"name": "Ops group",
					"type": "USERGROUP_DL"
				}
			]
		},
		{
			"waitMins": 5,
			"updateIncident": {
				"none": true,
				"priorityRules": [{
					"key": "currentState.code",
					"operator": "Is",
					"value": "Warning",
					"businessImpact": {
						"uniqueId": "SIMPACT-e8853b21-ebc5-dd1d-d9a3-7a7b121a5e0f",
						"name": "Test Ops impact",
						"description": "Test"
					},
					"urgency": {
						"uniqueId": "SURG-09358506-4af1-4d35-b902-cd3b14a00c10",
						"name": "Test Ops urgency",
						"description": "Test"
					},
					"priority": "High"
				}]
			},
			"incident": {
				"status": "New",
				"priority": "Low",
				"assignedUser": {
					"id": "USR0000000030",
					"loginName": "Ops_User",
					"lastName": "User",
					"firstName": "Ops",
					"email": "opsuser@opsramp.com",
					"phoneNumber": "",
					"mobileNumber": "9876543210"
				},
				"assigneeGroup": {
					"id": 1,
					"name": "Test Group",
					"description": "",
					"uniqueId": "USRGRP-4189ae2e-bcf5-f686-26d0-8b6eabd91558"
				},
				"customFields": [{
						"id": "UDF0000000002",
						"classCode": "INCIDENT",
						"displayLabel": "Test Cutom",
						"name": "test_cutom_2",
						"fieldType": "TYPE_TEXT",
						"mandatory": false,
						"editable": true,
						"description": "",
						"value": "2",
						"defaultValue": "",
						"customField": true
					},
					{
						"id": "UDF0000000004",
						"classCode": "INCIDENT",
						"displayLabel": "Esc custom field",
						"name": "esc_custom_field_4",
						"fieldType": "TYPE_TEXT",
						"mandatory": false,
						"editable": true,
						"description": "",
						"value": "request custom field - text",
						"defaultValue": "",
						"customField": true
					}
				],
				"cc": "tester1@opsramp.com",
				"toEmail": "tester2@opsramp.com"
			},
			"action": "INCIDENT",
			"notifyIncident": "whenAlertStateChanged"
		}
	]
}

Sample 2: AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED

This sample code updates an escalation alert policy with an escalationType of AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED.

Sample 2 request

{
	"name": "Create escalate alert policy API",
	"description": "Test description",
	"resources": [{
		"id": "bf3a10a2-92f1-4610-b3f4-174ed83db7b9",
		"type": "RESOURCE"
	}, {
		"id": "DGP-0b165e70-7152-49f1-bfe3-ebe77409d5f2",
		"type": "DEVICEGROUP"
	}, {
		"id": "SGP-11f1a6a8-acc8-411f-86c1-b693dd8e9817",
		"type": "SERVICEGROUP"
	}, {
		"id": "7_AWS",
		"type": "LOCATION"
	}, {
		"id": "client_7",
		"type": "CLIENT"
	}],
	"filterCriteria": {
		"matchingType": "ANY",
		"rules": [{
			"key": "Alert : Description",
			"operator": "CONTAINS",
			"value": "critical"
		}, {
			"key": "Alert : Occurrence Frequency",
			"operator": "GREATERTHANOREQUALTO",
			"value": {
				"occurrences": "5",
				"frequency": "2",
				"frequencyType": "hours"
			}
		}, {
			"key": "Resource : Resource Type",
			"operator": "MATCH",
			"value": "DEVICE"
            	}]
	},
	"escalationType": "AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED",
	"escalations": [{
		"waitMins": 5,
		"priority": "Low",
		"repeatFrequency": 5,
		"action": "NOTIFICATION",
		"recipients": [{
				"id": "ES-de9bfd9f-d8ee-430f-4bc0-e6e4645cdb47",
				"name": "Cloud roster",
				"type": "ROSTER"
			},
			{
				"id": "USR0000000028",
				"name": "AP_User",
				"type": "USER"
			},
			{
				"id": "USRGRP-9498fc95-67b7-3477-953f-1ec70bf0c61d",
				"name": "Cloud group",
				"type": "USERGROUP"
			},
			{
				"id": "USRGRP-9498fc95-67b7-3477-953f-1ec70bf0c61d",
				"name": "Ops group",
				"type": "USERGROUP_DL"
			}
		]
	}, {
		"waitMins": 5,
		"action": "INCIDENT",
		"updateIncident": {
			"none": "true",
			"withAlertState": "true",
			"priorityRules": [{
				"key": "currentState.code",
				"operator": "Is",
				"value": "Warning",
				"businessImpact": {
					"uniqueId": "SIMPACT-e8853b21-ebc5-dd1d-d9a3-7a7b121a5e0f"
				},
				"urgency": {
					"uniqueId": "SURG-09358506-4af1-4d35-b902-cd3b14a00c10"
				},
				"priority": "High"
			}]
		},
		"notifyIncident": "whenAlertStateChanged",
		"incident": {
			"priority": "Very Low",
			"assigneeGroup": {
				"uniqueId": "USRGRP-4189ae2e-bcf5-f686-26d0-8b6eabd91558",
				"name": "Test Group"
			},
			"assignedUser": {
				"id": "USR0000000030",
				"loginName": "Ops_User"
			},
			"customFields": [{
					"id": "UDF0000000002",
					"name": "test_cutom_2",
					"value": "2"
				},
				{
					"id": "UDF0000000004",
					"name": "esc_custom_field_4",
					"value": "request custom field - text"
				}
			],
			"cc": "tester1@opsramp.com",
			"toEmail": "tester2@opsramp.com"
		}
	}]
}

Sample 2 response

{
	"id": "POLICY-e29f63f3-951a-4b41-a2a9-94835f6e9a42",
	"name": "Create escalate alert policy API",
	"description": "Test description",
	"policyType": "ESCALATION_POLICY",
	"clientMatchingType": "ALL",
	"createdDate": "2017-05-15T10:35:51+0000",
	"updatedDate": "2017-05-15T10:35:51+0000",
	"active": true,
	"enabledMode": "ON",
	"scope": {
		"id": 7,
		"uniqueId": "client_7",
		"name": "Netenrich  Client",
		"activated": true
	},
	"createdBy": {
		"loginName": "ops_admin_user",
		"firstName": "Ops Admin",
		"email": "opsuser@opsramp.com"
	},
	"updatedBy": {
		"loginName": "ops_admin_user",
		"lastName": " ",
		"firstName": "Ops Admin",
		"email": "opsruser@opsramp.com"
	},
	"resources": [{
			"id": "bf3a10a2-92f1-4610-b3f4-174ed83db7b9",
			"name": "LPT00001",
			"type": "RESOURCE"
		},
		{
			"id": "7_AWS",
			"name": "AWS",
			"type": "LOCATION"
		},
		{
			"id": "DGP-0b165e70-7152-49f1-bfe3-ebe77409d5f2",
			"name": "Test Group",
			"type": "DEVICEGROUP"
		},
		{
			"id": "SGP-11f1a6a8-acc8-411f-86c1-b693dd8e9817",
			"name": "Test SG",
			"type": "SERVICEGROUP"
		},
		{
			"id": "client_6",
			"name": "Ops Client",
			"type": "CLIENT"
		}
	],
	"filterCriteria": {
		"matchingType": "ALL",
		"rules": [{
			"key": "Alert : Description",
			"operator": "CONTAINS",
			"value": "critical"
		}, {
			"key": "Alert : Occurrence Frequency",
			"operator": "GREATERTHANOREQUALTO",
			"value": {
				"occurrences": "5",
				"frequency": "2",
				"frequencyType": "hours"
			}
		}, {
			"key": "Resource : Resource Type",
			"operator": "MATCH",
			"value": "DEVICE"
            	}]
	},
	"escalationType": "AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED",
	"escalations": [{
			"waitMins": 5,
			"priority": "Low",
			"repeatFrequency": 5,
			"action": "NOTIFICATION",
			"recipients": [{
					"id": "USR0000000028",
					"name": "AP_User",
					"type": "USER"
				},
				{
					"id": "USRGRP-9498fc95-67b7-3477-953f-1ec70bf0c61d",
					"name": "Cloud group",
					"type": "USERGROUP"
				},
				{
					"id": "ES-de9bfd9f-d8ee-430f-4bc0-e6e4645cdb47",
					"name": "Cloud roster",
					"type": "ROSTER"
				},
				{
					"id": "USRGRP-9498fc95-67b7-3477-953f-1ec70bf0c61d",
					"name": "Ops group",
					"type": "USERGROUP_DL"
				}
			]
		},
		{
			"waitMins": 5,
			"updateIncident": {
				"none": true,
				"priorityRules": [{
					"key": "currentState.code",
					"operator": "Is",
					"value": "Warning",
					"businessImpact": {
						"uniqueId": "SIMPACT-e8853b21-ebc5-dd1d-d9a3-7a7b121a5e0f",
						"name": "Test Ops impact",
						"description": "Test"
					},
					"urgency": {
						"uniqueId": "SURG-09358506-4af1-4d35-b902-cd3b14a00c10",
						"name": "Test Ops urgency",
						"description": "Test"
					},
					"priority": "High"
				}]
			},
			"incident": {
				"status": "New",
				"priority": "Low",
				"assignedUser": {
					"id": "USR0000000030",
					"loginName": "Ops_User",
					"lastName": "User",
					"firstName": "Ops",
					"email": "opsuser@opsramp.com",
					"phoneNumber": "",
					"mobileNumber": "9876543210"
				},
				"assigneeGroup": {
					"id": 1,
					"name": "Test Group",
					"description": "",
					"uniqueId": "USRGRP-4189ae2e-bcf5-f686-26d0-8b6eabd91558"
				},
				"customFields": [{
						"id": "UDF0000000002",
						"classCode": "INCIDENT",
						"displayLabel": "Test Cutom",
						"name": "test_cutom_2",
						"fieldType": "TYPE_TEXT",
						"mandatory": false,
						"editable": true,
						"description": "",
						"value": "2",
						"defaultValue": "",
						"customField": true
					},
					{
						"id": "UDF0000000004",
						"classCode": "INCIDENT",
						"displayLabel": "Esc custom field",
						"name": "esc_custom_field_4",
						"fieldType": "TYPE_TEXT",
						"mandatory": false,
						"editable": true,
						"description": "",
						"value": "request custom field - text",
						"defaultValue": "",
						"customField": true
					}
				],
				"cc": "tester1@opsramp.com",
				"toEmail": "tester2@opsramp.com"
			},
			"action": "INCIDENT",
			"notifyIncident": "whenAlertStateChanged"
		}
	]
}

Sample 3: MANUAL

This sample code updates an escalation alert policy with an escalationType of MANUAL.

Sample 3 request

{
	"name": "Create escalate alert policy API for NOC",
	"description": "Test description",
	"resources": [{
		"id": "bf3a10a2-92f1-4610-b3f4-174ed83db7b9",
		"type": "RESOURCE"
	}, {
		"id": "DGP-0b165e70-7152-49f1-bfe3-ebe77409d5f2",
		"type": "DEVICEGROUP"
	}, {
		"id": "SGP-11f1a6a8-acc8-411f-86c1-b693dd8e9817",
		"type": "SERVICEGROUP"
	}, {
		"id": "7_AWS",
		"type": "LOCATION"
	}, {
		"id": "client_7",
		"type": "CLIENT"
	}],
	"filterCriteria": {
		"matchingType": "ANY",
		"rules": [{
			"key": "Alert : Description",
			"operator": "CONTAINS",
			"value": "critical"
		}]
	},
	"escalationType": "MANUAL",
	"escalations": [{
		"recipients": [{
				"id": "ES-de9bfd9f-d8ee-430f-4bc0-e6e4645cdb47",
				"name": "Cloud roster",
				"type": "ROSTER"
			},
			{
				"id": "USR0000000028",
				"name": "AP_User",
				"type": "USER"
			},
			{
				"id": "USRGRP-9498fc95-67b7-3477-953f-1ec70bf0c61d",
				"name": "Cloud group",
				"type": "USERGROUP"
			}
		]
	}]
}

Sample 3 response

{
	"id": "POLICY-a204aea2-f943-46cb-86fa-86197e796f70",
	"name": "Create escalate alert policy API for NOC123",
	"description": "Test description",
	"policyType": "ESCALATION_POLICY",
	"clientMatchingType": "ALL",
	"createdDate": "2017-05-15T11:10:32+0000",
	"updatedDate": "2017-05-15T11:10:32+0000",
	"active": true,
	"enabledMode": "ON",
	"scope": {
		"id": 5,
		"uniqueId": "msp_5",
		"name": "Ops Partner",
		"activated": true
	},
	"createdBy": {
		"loginName": "ops_admin_user",
		"firstName": "Ops Admin",
		"email": "opsuser@opsramp.com"
	},
	"updatedBy": {
		"loginName": "ops_admin_user",
		"firstName": "Ops Admin",
		"email": "opsuser@opsramp.com"
	},
	"resources": [{
			"id": "bf3a10a2-92f1-4610-b3f4-174ed83db7b9",
			"name": "LPT00001",
			"type": "RESOURCE"
		},
		{
			"id": "7_AWS",
			"name": "AWS",
			"type": "LOCATION"
		},
		{
			"id": "DGP-0b165e70-7152-49f1-bfe3-ebe77409d5f2",
			"name": "Test Group",
			"type": "DEVICEGROUP"
		},
		{
			"id": "SGP-11f1a6a8-acc8-411f-86c1-b693dd8e9817",
			"name": "Test SG",
			"type": "SERVICEGROUP"
		},
		{
			"id": "client_6",
			"name": "Ops Client",
			"type": "CLIENT"
		}
	],
	"filterCriteria": {
		"matchingType": "ALL",
		"rules": [{
			"key": "Alert : Description",
			"operator": "CONTAINS",
			"value": "critical"
		}]
	},
	"escalationType": "MANUAL",
	"escalations": [{
		"action": "NOTIFICATION",
		"recipients": [{
				"id": "USR0000000019",
				"name": "mani_partner",
				"type": "USER"
			},
			{
				"id": "USRGRP-9498fc95-67b7-3477-953f-1ec70bf0c61d",
				"name": "Cloud group",
				"type": "USERGROUP"
			},
			{
				"id": "ES-d16473ee-29de-1cf2-4983-86307733e34c",
				"name": "Test roster",
				"type": "ROSTER"
			}
		]
	}]
}