URL
POST https://{api-url}/api/v2/tenants/{tenantId}/policies/firstResponse/{policyId}
Sample URLs
https://{api-url}/api/v2/tenants/client_7/policies/firstResponse/{policyId}
Parameters
Field | Data Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name | String | Name of the first response policy. Maximum length: 250 characters. | ||||||||||||||||||||
enabled | String | (Optional) State of the first response policy. Default state: true. | ||||||||||||||||||||
precedence | Integer | (Optional) Order of execution of the first response policy. | ||||||||||||||||||||
filterCriteria
| Object
| (Optional) Values used for filter criteria.
| ||||||||||||||||||||
firstResponseType | String | The first response type. Supported value: SUPPRESSION. | ||||||||||||||||||||
suppression
| Object
| Used only for suppression type.
|
Status code
200 OK
Sample request
{
"name": "firstResponse_1",
"enabled": true,
"filterCriteria": {
"filterBased": true,
"matchingType": "ALL",
"rules": [
{
"filterType": "nativeAttributes",
"entityName": "host_name",
"operator": "Starts with",
"entityValue": "vm"
},
{
"filterType":"nativeAttributes",
"entityName":"ip_address",
"ipMatchingConditions": {
"ipAddressMatchType":"CIDR Match",
"cidrNotation":"192.168.1.1/24"
}
}
]
},
"firstResponseType": "SUPPRESSION",
"suppression": {
"suppressSeasonalAlerts": true,
"suppressByAttributes": true,
"autoSnooze": true,
"continuousLearning": false,
"trainingFileId": "ml_alert_suppression_training"
}
}
Sample response
{
"id": "POLICY-AC-c44f4193-154a-4aa5-b8a9-e5ea5acb386b",
"name": "Policy1",
"enabled": true,
"precedence": 1,
"filterCriteria":
{
"filterBased": true,
"matchingType": "ALL",
"rules":
[
{
"filterType": "nativeAttributes",
"entityName": "host_name",
"operator": "Starts with",
"entityValue": "vm"
}
]
},
"firstResponseType": "SUPPRESSION",
"suppression":
{
"suppressSeasonalAlerts": true,
"suppressByAttributes": true,
"autoSnooze": true,
"continuousLearning": true,
"trainingFileId": "ml_alert_suppression_training"
},
"createdBy":
{
"loginName": "opsramp_api_user",
"lastName": " ",
"firstName": "OpsRamp API User",
"email": "opsAdmin@opsramp.com"
},
"createdTime": "2019-02-27T12:50:44+0000",
"updatedTime": ""
}