URL
POST https://{api-url}/api/v2/tenants/{tenantId}/escalations
Sample URLs
https://{api-url}/api/v2/tenants/client_9/escalations
Parameters
N/A indicates that the value is not applicable.
Field | Sub-Fields | Data Type | Description |
---|---|---|---|
name | N/A | String | Value: N/A Description: Escalation policy name. |
description | N/A | String | Value: N/A Description: (Optional) Escalation policy description. |
resources | ID or Type | String | Resource values:
Description: Resources on which the policy would be applied.
|
filterCriteria | matchingType | String | Values: ALL, ANY Description: (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. |
filterCriteria | key rule | String | Values:
Description: Unique attribute to filter the alert. Use Get Alert Types API to fetch the list of alert types.
The following are the fields for alert occurrence frequency:
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: |
filterCriteria | operator rule | String | Values: Contains, Not Contains, Equals, Not Equals, Starts with, Ends with, Regex, Is Description: Operating values to filter the resource types. Operators Is and Is Not are applicable only for "key": "Resource: Resource Type" |
filterCriteria | value rule | String | Value: N/A Description: Unique 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. |
escalationType | N/A | String | Values:
|
Parameters for manual escalationType
The following tables provides detailed parameters for an escalationType of MANUAL.
Field | Sub-Fields | Data Type | Description |
---|---|---|---|
escalations | recipients ID (or) name | String | Value: N/A Description: Users to contact directly. User ID or name. |
escalations | type | String | Values:
Description: User type. Tips for retrieving user types for the escalation:
|
Parameters for automatic escalationType
The following tables provides detailed parameters for the following escalationType:
- AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED_TICKETED
- AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED
Field | Sub-Fields | Data Type | Description |
---|---|---|---|
escalations | waitMins | Integer | Values:
Description: 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. |
escalations | action | String | Values: NOTIFICATION or INCIDENT Description: 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. |
escalationsaction: NOTIFICATION | recipients ID or name | String | Value: N/A Description: Recipients ID or name who would receive the alert notifications. |
escalationsaction: NOTIFICATION | recipient type | String | Value: Recipient types:
Description: Recipient types who would receive the alert notifications. For example: USER. Tips for retrieving recipient types:
|
escalationsaction: NOTIFICATION | priority | String | Values:
Description: Priority of the notification. |
escalationsaction: NOTIFICATION | repeatFrequency | Integer | Values: repeatFrequency is represented in minutes format.
Description: The time interval in which user receives repeated notifications. When a repeat frequency is not provided, the default repeatFrequency is 15 mins. |
escalationsaction: NOTIFICATION | notifyLimitCount | Integer | Values: 1 through 10 Description: Number of repeated notifications a user has to receive within a certain time interval. For example, if repeatFrequency: 15 and notifyLimitCount: 5, it indicates that user receives notifications every 15 minutes and stops receiving after 5 notifications. Note: When a notification limit count is not provided, the default notifyLimitCount is 2. |
escalationsaction: NOTIFICATION | alertStateTransitionFrom | String | Values: CRITICAL, WARNING Description: Escalate 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: INCIDENT (create new incident) | incident: Assignee group | string | Values: uniqueId or name Description: An incident is automatically created from the alert and assigned to the desired user or team. Escalate the incident to a user group responsible for working on the incident. Note: The escalation ends when an incident is created from the alert. After that, adding further level of escalation is not possible. |
escalationsaction: INCIDENT (create new incident) | incident: Assign | String | Values: Id or name Description: An incident is automatically created from the alert and assigned to the desired user or team. Escalate incident to a user. Note: The escalation ends when an incident is created from the alert. After that, adding further level of escalation is not possible. |
escalationsaction: INCIDENT (create new incident) | incident: CustomFields | String | Values: Id, name, or value Description: An incident is automatically created from the alert and assigned to the desired user or team. User customized fields. Additional information of incident is added by creating custom fields. Note: The escalation ends when an incident is created from the alert. After that, adding further level of escalation is not possible. To obtain custom forms associated with an incident, retrieve incident custom fields. |
escalationsaction: INCIDENT (create new incident) | incident: businessImpact | String | Values: uniqueId Description: An incident is automatically created from the alert and assigned to the desired user or team. The severity of an incident on the business. Note: The escalation ends when an incident is created from the alert. After that, adding further level of escalation is not possible. To retrieve a list of defined business impacts, get business impacts information. |
escalationsaction: INCIDENT (create new incident) | incident: urgency | String | Values: uniqueId Description: An incident is automatically created from the alert and assigned to the desired user or team. Urgency to prioritize and work on the incident. Note: The escalation ends when an incident is created from the alert. After that, adding further level of escalation is not possible. To retrieve a list of defined urgencies, retrieve urgencies. |
escalationsaction: INCIDENT (create new incident) | incident: Priority | String | Values: Low, Normal, High, Urgent, Very Low Description: An incident is automatically created from the alert and assigned to the desired user or team. Priority of the incident. This can be defined with respect to business impact and urgency. Note: The escalation ends when an incident is created from the alert. After that, adding further level of escalation is not possible. |
escalationsaction: INCIDENT (create new incident) | incident: CC: to Email | String | Values: N/A Description: An incident is automatically created from the alert and assigned to the desired user or team. User receives the incident notifications via email. Note: The escalation ends when an incident is created from the alert. After that, adding further level of escalation is not possible. |
escalationsaction: INCIDENT (update incident) | updateIncident: none | String | Values: True/False Description: Configure how to update an existing incident of an escalated alert. Either none or withAlertState is required. Update incident with respect to alert state. The latest description is appended on the alert. No change to the status of the incident is made based on escalated alert's state. Note: If an open incident (other than closed) is available for the alert, the incident gets updated instead of creating a new incident. |
escalationsaction: INCIDENT (update incident) | updateIncident: withAlertState | String | Values: True/False Description: Configure how to update an existing incident of an escalated alert. Either none or withAlertState is required. The incident gets updated every time the escalated alert repeats with a state change. Note: If an open incident (other than closed) is available for the alert, the incident gets updated instead of creating a new incident. |
escalationsaction: INCIDENT (update incident) | priorityRules: key | String | Values: Value for key is currentState.code .Description: Update incident priority based on unique attribute of the alert. Example: Alert State. |
escalationsaction: INCIDENT (update incident) | priorityRules: operator | String | Values: Supported value for operator -Is .Description: Operating values to filter the incident. Example: Is. |
escalationsaction: INCIDENT (update incident) | priorityRules: value | String | Values: Supported priority values are warning and critical. Description: Status of incident. Example: Critical |
escalationsaction: INCIDENT (update incident) | priorityRules: businessImpact | String | Values: Unique Id of business impact. Description: Severity of an incident on the business. Note: To retrieve a list of defined business impacts, use the get business impacts API. |
escalationsaction: INCIDENT (update incident) | priorityRules: urgency | String | Values: Urgency to prioritize the incident Description: Urgency to prioritize and work on the incident. Note: To retrieve a list of defined urgencies, use the get urgencies API. |
escalationsaction: INCIDENT (update incident) | priorityRules: priority | String | Values: Low, Normal, High, Urgent, Very Low. Description: Priority of the incident. This can be defined with respect to business impact and urgency. |
escalationsaction: INCIDENT (update incident) | notifyIncident: whenAlertStateChanged | String | Values: N/A Description: (Required) Notify users when incident is updated due to change in alert state. |
Notes
- resources: Used to define different resources to apply the escalate alert policy.
- escalations: Used to define the users for escalated alerts notifications.
- escalationType:
- AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED_TICKETED: Automated notifications via recipient users until acknowledged, closed, suppressed, or ticketed.
- AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED: Automated notifications via recipient users until acknowledged, closed, or suppressed.
- MANUAL – Contact users directly as required.
- filterCriteria – Use the following request structure for ‘Alert : Occurrence Frequency’.
- occurrences – Any integer.
- frequency – Any integer.
- frequencyType – hours or days or weeks
Sample 1: AUTOMATIC_UNTIL_ACKNOWLEDGED_CLOSED_SUPPRESSED_TICKETED
This sample code creates 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",
"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,
"notifyLimitCount": 2,
"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,
"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": "OpsAdmin"
},
"businessImpact": {
"uniqueId": "SIMPACT-e8853b21-ebc5-dd1d-d9a3-7a7b121a5e0f"
},
"urgency": {
"uniqueId": "SURG-09358506-4af1-4d35-b902-cd3b14a00c10"
},
"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": "tester1@opsramp.com"
},
"updatedBy": {
"loginName": "ops_admin_user",
"firstName": "Ops Admin",
"email": "tester1@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,
"notifyLimitCount": 2,
"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": "OpsAdmin",
"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" }, "businessImpact": { "uniqueId": "SIMPACT-e8853b21-ebc5-dd1d-d9a3-7a7b121a5e0f", "name": "Impact 2", "description": "Impact level 2" }, "urgency": { "uniqueId": "SURG-09358506-4af1-4d35-b902-cd3b14a00c10", "name": "Urgency 1", "description": "Urgency level 1" }, "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 creates 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,
"notifyLimitCount": 2,
"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,
"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": "OpsAdmin"
},
"businessImpact": {
"uniqueId": "SIMPACT-e8853b21-ebc5-dd1d-d9a3-7a7b121a5e0f"
},
"urgency": {
"uniqueId": "SURG-09358506-4af1-4d35-b902-cd3b14a00c10"
},
"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", "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", "escalations": [
{ "waitMins": 5, "priority": "Low", "repeatFrequency": 5, "notifyLimitCount": 2, "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": "OpsAdmin", "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" },
"businessImpact": { "uniqueId": "SIMPACT-e8853b21-ebc5-dd1d-d9a3-7a7b121a5e0f", "name": "Impact 2", "description": "Impact level 2" },
"urgency": { "uniqueId": "SURG-09358506-4af1-4d35-b902-cd3b14a00c10", "name": "Urgency 1", "description": "Urgency level 1" },
"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 creates 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" } ]
}]
}