Remediation Create Policy
This API is used for creating a new remediation rule. Fields "created_on" and "last_updated" are read-only and can't be updated, Any missing non mandatory field in udpate request, will be set to default values.
Show optional properties
{
"events": [
{
"name": "Down",
"class": "WirelessAccessPoint",
"type": "problem",
"condition": null
}
],
"policy_name": "examplerule",
"path_type": "remediation",
"policy_type": "automated",
"paths": [
{
"condition": {
"property": "",
"expression": "match",
"value": ""
},
"path_name": "Path0",
"path_description": "",
"levels": [
{
"level_name": "level0",
"duration": 1,
"action": "slack_action",
"level_description": "",
"parameters": [
{
"slack_message": "TCSA slack"
},
{
"slack_channel": "#tcsa-notifs"
}
],
"connections": [
{
"task_post_slack_conn_id": "slack_connection"
}
]
}
]
}
]
}
{
"policy_name": "string",
"policy_type": "manual",
"path_type": "remediation",
"state": "enable",
"events": [
{}
],
"conditions": [
{}
],
"paths": [
{}
],
"created_on": "string",
"last_updated": "string",
"duration": 0,
"stop_criteria": "clear"
}
remediation rule name
either manual or automated
either remediation or escalation
optional either enable or disable
JSON list of dicts containing class, name and type fields.
JSON list of dicts containing propName, operation and propValue fields.
JSON list of dicts containing paths, levels and action names. The paths.levels.duration and paths.condition are mandatory for escalation policy.
rule creation timestamp
rule last update timestamp
in case of escalation it is the time value in minutes, upon expiry the level's action will be triggered.
optional field to specify escalation stop criteria. Either clear or ack, default value is clear
Created
"RemediationPolicy Object"
remediation rule name
either manual or automated
either remediation or escalation
optional either enable or disable
JSON list of dicts containing class, name and type fields.
JSON list of dicts containing propName, operation and propValue fields.
JSON list of dicts containing paths, levels and action names. The paths.levels.duration and paths.condition are mandatory for escalation policy.
rule creation timestamp
rule last update timestamp
in case of escalation it is the time value in minutes, upon expiry the level's action will be triggered.
optional field to specify escalation stop criteria. Either clear or ack, default value is clear
Invalid Request sent by the user
Internal server error
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"policy_name:"string","policy_type:"string","events":["object"],"paths":["object"],"path_type:"string"}' https://{api_host}/remediation-rest/policy