Remediation Update Policy

Remediation Update Policy

This API is used for updating a remediation rule or policy. Update API expects all parameters retrived via get API. Fields "policy_name", "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.

Request
URI
PUT
https://{api_host}/tcsa.host.com/remediation-rest/policy/{policy_name}
COPY
Path Parameters
string
policy_name
Required

Unique id, to indentify the user-preference


Request Body
RemediationPolicy of type(s) application/json
Required

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"
}
string
policy_name
Required

remediation rule name

string
policy_type
Required

either manual or automated

string
path_type
Required

either remediation or escalation

string
state
Optional

optional either enable or disable

array of object
events
Required

JSON list of dicts containing class, name and type fields.

array of object
conditions
Optional

JSON list of dicts containing propName, operation and propValue fields.

array of object
paths
Required

JSON list of dicts containing paths, levels and action names. The paths.levels.duration and paths.condition are mandatory for escalation policy.

string
created_on
Optional

rule creation timestamp

string
last_updated
Optional

rule last update timestamp

integer
duration
Optional

in case of escalation it is the time value in minutes, upon expiry the level's action will be triggered.

string
stop_criteria
Optional

optional field to specify escalation stop criteria. Either clear or ack, default value is clear

Authentication
This operation uses the following authentication methods.
Responses
201

Created

Returns RemediationPolicy of type(s) application/json
{
    "conditions": [],
    "events": [
        {
            "name": "Down",
            "class": "WirelessAccessPoint",
            "type": "problem",
            "condition": null
        }
    ],
    "description": "example rule",
    "policy_name": "examplerule",
    "path_type": "remediation",
    "policy_type": "automated",
    "stop_criteria": "clear",
    "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"
                        }
                    ]
                }
            ]
        }
    ],
    "state": "enable"
}
string
policy_name
Required

remediation rule name

string
policy_type
Required

either manual or automated

string
path_type
Required

either remediation or escalation

string
state
Optional

optional either enable or disable

array of object
events
Required

JSON list of dicts containing class, name and type fields.

array of object
conditions
Optional

JSON list of dicts containing propName, operation and propValue fields.

array of object
paths
Required

JSON list of dicts containing paths, levels and action names. The paths.levels.duration and paths.condition are mandatory for escalation policy.

string
created_on
Optional

rule creation timestamp

string
last_updated
Optional

rule last update timestamp

integer
duration
Optional

in case of escalation it is the time value in minutes, upon expiry the level's action will be triggered.

string
stop_criteria
Optional

optional field to specify escalation stop criteria. Either clear or ack, default value is clear


400

Invalid Request sent by the user

Operation doesn't return any data structure

404

resouce not found

Operation doesn't return any data structure

500

Internal server error

Operation doesn't return any data structure