Documentation is now available for the Fall 2020 Update release!

Create first response policy

This endpoint is used to create First Response Policy.

Leave Feedback

URL

POST https://{api-url}/api/v2/tenants/{tenantId}/policies/firstResponse

Sample URLs

https://{api-url}/api/v2/tenants/client_7/policies/firstResponse

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":"Policy1",
"enabledMode": "ON",
"filterCriteria": {
	"filterBased":"true",
	"matchingType":"ALL",
	"rules":
	[
		{
			"filterType":"native",
			"entityName":"resource_name",
			"operator":"Starts  With",
			"entityValue":"vm"
		}
	]
},
"attributeActions": {
    "continuousLearning": true,
    "suppress": {
        "suppressDuration": 5, 
        "learnedConfiguration": true
    },
    "runProcess": {
        "processIds": ["PROCESS_9beade88-834a-4229-ab34-90380214cf74"],
        "learnedConfiguration": true
    }
},
"patternActions": {
    "suppress": {
        "seasonalAlerts": true
    }
}
}

Sample response

{
"id": "POLICY-AC-aa3186cb-5572-43ed-abb9-7830574ee1b2",
"name": "Policy1",
"enabled": true,
"enabledMode": "ON",
"filterCriteria": {
    "filterBased": true,
    "matchingType": "ALL",
    "rules": [
        {
            "filterType": "nativeAttributes",
            "entityName": "resource_name",
            "operator": "Starts with",
            "entityValue": "vm"
        }
    ]
},
"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": "API User",
    "email": "helpdesk@opsramp.com"
},
"createdTime": "2020-08-17T13:35:28+0530",
"updatedTime": ""
}