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

Describes the client ID or msp ID of the tenant

Query Parameters
pageNo
integer

pageSize
integer

Responses

OK

descendingOrder
boolean

nextPage
boolean

orderBy
string

pageNo
integer

pageSize
integer

previousPageNo
integer

results
array

results.enabled
results.firstResponseType
results.id
results.name
results.precedence
totalPages
integer

totalResults
integer

{
  "descendingOrder": false,
  "nextPage": false,
  "orderBy": "precedence",
  "pageNo": 1,
  "pageSize": 100,
  "previousPageNo": 0,
  "results": [
    {
      "enabled": true,
      "firstResponseType": "SUPPRESSION",
      "id": "POLICY-AC-c44f4193-154a-4aa5-b8a9-e5ea5acb386b",
      "name": "Policy1",
      "precedence": 1
    },
    {
      "enabled": true,
      "firstResponseType": "SUPPRESSION",
      "id": "POLICY-AC-d53e179d-8c9b-4564-b793-dc639f6a7cf2",
      "name": "Policy2",
      "precedence": 2
    }
  ],
  "totalPages": 1,
  "totalResults": 2
}
Endpoint
/api/v2/tenants/{tenantId}/policies/firstResponse
Path Parameters
tenantId
string

Describes the client ID or msp ID of the tenant

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.
{
  "filterCriteria": {
    "filterBased": "true",
    "matchingType": "ALL",
    "rules": [
      {
        "entityName": "host_name",
        "entityValue": "vm",
        "filterType": "native",
        "operator": "Starts With"
      }
    ]
  },
  "firstResponseType": "SUPPRESSION",
  "name": "Policy1",
  "suppression": {
    "autoSnooze": true,
    "continuousLearning": true,
    "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": ""
}