Documentation is now available for the Fall 2020 Update release!

Update First Response Policy

This endpoint is used to update the First Response Policy.

Leave Feedback

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}

Header format

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

Status code

200 OK

Parameters

All parameters are mandatory unless specified otherwise.

FieldData TypeDescription
name (required)StringName of the first response policy. Maximum length: 250 characters.
enabledString(Optional) State of the first response policy. Default state: true.
enabledModeString(Optional) Mode for the first response policy. Options: ON, OFF, OBSERVED, RECOMMEND
filterCriteriaObject(Optional) Rule is mandatory when filterBased is specified.
filterCriteria : filterBasedString(Optional) Rule is mandatory when filterBased is specified.
filterCriteria : matchingTypeStringANY/ALL
filterCriteria : rules
  • filterType
  • entityName
  • operator
  • entityValue
  • String
  • String
  • String
  • String
Should be:
  • nativeAttributes or customAttributes
  • See Notes for more information.
  • See Notes for more information.
  • Value to compare.
attributeActionsObjectDefault: false
attributeActions : continuousLearningBooleanEnable/Disable continuous machine learning.
attributeActions : suppress
  • suppressDuration
  • learnedConfiguration
Object
  • Integer
  • Boolean
Used to suppress the alert.
  • -1 <= n <= 1440 (24 hrs), -1 to suppress always, 0 to do not suppress or a positive number n to suppress for n minutes.
  • Options: true/false. Default: false
attributeActions : runProcess
  • processIds
  • learnedConfiguration
Object
  • List
  • Boolean
Run process.
  • Suppress alerts that happen regularly, at around the same time.
  • Options: true/false. Default: false
patternActionsObjectDefault: false
patternActions : suppress
  • seasonalAlerts
Object
  • Boolean
Suppress alerts that happen regularly, at around the same time. Options: true/false. Default: false

Sample request

{
  "name": "firstResponse_1",
  "enabledMode":"ON",
  "filterCriteria": {
    "filterBased": true,
    "matchingType": "ALL",
    "rules": [
      {
        "filterType": "nativeAttributes",
        "entityName": "resource_name",
        "operator": "Starts with",
        "entityValue": "vm"
      },
      {
		"filterType":"nativeAttributes",
		"entityName":"ip_address",
		"ipMatchingConditions": {
			"ipAddressMatchType":"CIDR Match",
			"cidrNotation":"192.168.1.1/24"
		}
	  }
    ]
  },
  "attributeActions": {
    "continuousLearning": true,
    "suppress": {
        "learnedConfiguration": true,
        "suppressDuration": 5
    },
    "runProcess": {
        "learnedConfiguration": true,
        "processIds": [
            "PROCESS_9beade88-834a-4229-ab34-90380214cf74"
        ]
    }
   },
   "patternActions": {
     "suppress": {
         "seasonalAlerts": true
      }
    }
}

Sample response

{
  "id": "POLICY-AC-d53e179d-8c9b-4564-b793-dc639f6a7cf2",
  "name": "firstResponse_1",
  "enabled": true,
  "enabledMode":"ON",
  "filterCriteria": {
    "filterBased": true,
    "matchingType": "ALL",
    "rules": [
      {
        "filterType": "nativeAttributes",
        "entityName": "resource_name",
        "operator": "Starts with",
        "entityValue": "vm"
      },
      {
        "filterType": "nativeAttributes",
        "entityName": "ip_address",
        "ipMatchingConditions": {
          "ipAddressMatchType": "CIDR Match",
          "cidrNotation": "192.168.1.1/24"
        }
      }
    ]
  },
  "attributeActions": {
    "continuousLearning": true,
    "suppress": {
        "learnedConfiguration": true,
        "suppressDuration": 5
    },
    "runProcess": {
        "learnedConfiguration": true,
        "processIds": [
           "PROCESS_9beade88-834a-4229-ab34-90380214cf74"
        ]
    }
   },
  "patternActions": {
    "suppress": {
       "seasonalAlerts": true
    }
   },
  "createdBy": {
    "loginName": "opsramp_api_user",
    "lastName": " ",
    "firstName": "OpsRamp API User",
    "email": "opsAdmin@opsramp.com"
  },
  "updatedBy": {
    "loginName": "opsramp_api_user",
    "lastName": " ",
    "firstName": "OpsRamp API User",
    "email": "opsAdmin@opsramp.com"
  },
  "createdTime": "2019-02-28T09:25:56+0000",
  "updatedTime": "2019-02-28T10:14:05+0000"
}