Endpoint
/api/v2/tenants/{tenantId}/policies/firstResponse/{policyId}
Path Parameters
tenantId
string

policyId
string

Responses

OK

Endpoint
/api/v2/tenants/{tenantId}/policies/firstResponse/{policyId}
Path Parameters
tenantId
string

policyId
string

Responses

OK

createdBy
object

createdBy.email
createdBy.firstName
createdBy.lastName
createdBy.loginName
createdTime
string

enabled
boolean

filterCriteria
object

filterCriteria.filterBased
filterCriteria.matchingType
filterCriteria.rules
firstResponseType
string

id
string

name
string

precedence
integer

suppression
object

suppression.autoSnooze
suppression.continuousLearning
suppression.suppressByAttributes
suppression.suppressSeasonalAlerts
suppression.trainingFileId
updatedTime
string

{
  "createdBy": {
    "email": "opsAdmin@opsramp.com",
    "firstName": "OpsRamp API User",
    "lastName": " ",
    "loginName": "opsramp_api_user"
  },
  "createdTime": "2019-02-28T09:25:56+0000",
  "enabled": true,
  "filterCriteria": {
    "filterBased": true,
    "matchingType": "ALL",
    "rules": [
      {
        "entityName": "host_name",
        "entityValue": "vm",
        "filterType": "nativeAttributes",
        "operator": "Starts with"
      }
    ]
  },
  "firstResponseType": "SUPPRESSION",
  "id": "POLICY-AC-d53e179d-8c9b-4564-b793-dc639f6a7cf2",
  "name": "Policy2",
  "precedence": 2,
  "suppression": {
    "autoSnooze": true,
    "continuousLearning": true,
    "suppressByAttributes": false,
    "suppressSeasonalAlerts": false,
    "trainingFileId": "ml_alert_suppression_training"
  },
  "updatedTime": ""
}
Endpoint
/api/v2/tenants/{tenantId}/policies/firstResponse/{policyId}
Path Parameters
tenantId
string

policyId
string

enabled
boolean

(Optional) State of the first response policy. Default state: true.

filterCriteria
object

(Optional) Values used for filter criteria.

filterCriteria.filterBased
Defines the value used for filterBased. Default Value: False.
filterCriteria.matchingType
Defines the type of matching results either ANY or ALL. - Select ANY to match results based on any specified filter criteria. - Select ALL to match results based on all specified filter criteria.
filterCriteria.rules
By default, the field rules is set to False. Mandatory only when filterBased is TRUE. Values for filterType are either - native attributes - dns_name - host_name - alias_name - ip_address - resource_type - agent_installed - operating_system - make - model - alert_source - alert_metric - custom attributes - Provide custom attribute names defined for client or partner or service provider assigned to the resources.
firstResponseType
string

The first response type. Supported value: SUPPRESSION.

name
string

Name of the first response policy. Maximum length: 250 characters.

precedence
integer

(Optional) Order of execution of the first response policy.

suppression
object

Used only for suppression type.

suppression.autoSnooze
Snooze specific alerts for a given time.
suppression.continuousLearning
Enable/Disable continuous machine learning.
suppression.suppressByAttributes
Suppress specific alerts.
suppression.suppressSeasonalAlerts
Suppress alerts that happen regularly and at the same time approximately.
suppression.trainingFileId
ID of the training file. This ID is used only when suppressByAttributes is TRUE.
{
  "enabled": true,
  "filterCriteria": {
    "filterBased": true,
    "matchingType": "ALL",
    "rules": [
      {
        "entityName": "host_name",
        "entityValue": "vm",
        "filterType": "nativeAttributes",
        "operator": "Starts with"
      },
      {
        "entityName": "ip_address",
        "filterType": "nativeAttributes",
        "ipMatchingConditions": {
          "cidrNotation": "192.168.1.1/24",
          "ipAddressMatchType": "CIDR Match"
        }
      }
    ]
  },
  "firstResponseType": "SUPPRESSION",
  "name": "firstResponse_1",
  "suppression": {
    "autoSnooze": true,
    "continuousLearning": false,
    "suppressByAttributes": true,
    "suppressSeasonalAlerts": true,
    "trainingFileId": "ml_alert_suppression_training"
  }
}

Responses

OK

createdBy
object

createdBy.email
createdBy.firstName
createdBy.lastName
createdBy.loginName
createdTime
string

enabled
boolean

filterCriteria
object

filterCriteria.filterBased
filterCriteria.matchingType
filterCriteria.rules
firstResponseType
string

id
string

name
string

precedence
integer

suppression
object

suppression.autoSnooze
suppression.continuousLearning
suppression.suppressByAttributes
suppression.suppressSeasonalAlerts
suppression.trainingFileId
updatedTime
string

{
  "createdBy": {
    "email": "opsAdmin@opsramp.com",
    "firstName": "OpsRamp API User",
    "lastName": " ",
    "loginName": "opsramp_api_user"
  },
  "createdTime": "2019-02-27T12:50:44+0000",
  "enabled": true,
  "filterCriteria": {
    "filterBased": true,
    "matchingType": "ALL",
    "rules": [
      {
        "entityName": "host_name",
        "entityValue": "vm",
        "filterType": "nativeAttributes",
        "operator": "Starts with"
      }
    ]
  },
  "firstResponseType": "SUPPRESSION",
  "id": "POLICY-AC-c44f4193-154a-4aa5-b8a9-e5ea5acb386b",
  "name": "Policy1",
  "precedence": 1,
  "suppression": {
    "autoSnooze": true,
    "continuousLearning": true,
    "suppressByAttributes": true,
    "suppressSeasonalAlerts": true,
    "trainingFileId": "ml_alert_suppression_training"
  },
  "updatedTime": ""
}