Create Notification Plugin Rule Using POST

Create Notification Plugin Rule Using POST

The Notification Plugin with which the Rule needs to be associated must be specified as part of the request.

Request
URI
POST
https://{api_host}/api/notifications/rules
COPY
Request Body

The notification rule that needs to be created

notification-rule of type(s) application/json
Required

Show optional properties

{
    "name": "string"
}
{
    "alertControlStates": [
        "string"
    ],
    "alertDefinitionIdFilters": {
        "values": [
            "string"
        ]
    },
    "alertImpactFilters": {
        "values": [
            "string"
        ]
    },
    "alertStatuses": [
        "string"
    ],
    "alertTypeFilters": [
        {
            "alertSubTypes": [
                0
            ],
            "alertType": 0
        }
    ],
    "collectorGroupId": "string",
    "collectorUUId": "string",
    "criticalities": [
        "string"
    ],
    "id": "string",
    "links": [
        {
            "description": "string",
            "href": "string",
            "name": "string",
            "rel": "string"
        }
    ],
    "name": "string",
    "pluginId": "string",
    "properties": [
        {
            "name": "string",
            "value": "string"
        }
    ],
    "resourceFilter": {
        "childrenResourceKindFilters": [
            "string"
        ],
        "childrenResourceKindKeyFilters": [
            {
                "adapterKind": "string",
                "resourceKind": "string"
            }
        ],
        "matchResourceIdOnly": false,
        "relationship": "string",
        "resourceId": "string"
    },
    "resourceFilters": [
        {
            "childrenResourceKindFilters": [
                "string"
            ],
            "childrenResourceKindKeyFilters": [
                {
                    "adapterKind": "string",
                    "resourceKind": "string"
                }
            ],
            "matchResourceIdOnly": false,
            "relationship": "string",
            "resourceId": "string"
        }
    ],
    "resourceKindFilter": {
        "adapterKind": "string",
        "resourceKind": "string"
    },
    "resourceKindFilters": [
        {
            "adapterKind": "string",
            "resourceKind": "string"
        }
    ],
    "templateId": "string"
}
array of string
alertControlStates
Optional

Set of Alert control states that the alert is expected to be in

Possible values are : OPEN, ASSIGNED, SUSPENDED, SUPPRESSED,
alertDefinitionIdFilters
Optional

alertDefinitionIdFilters

alertImpactFilters
Optional

alertImpactFilters

array of string
alertStatuses
Optional

Set of Alert states that the alert is expected to be in

Possible values are : NEW, ACTIVE, UPDATED, CANCELED,
alertTypeFilters
Optional

Filter for the rule to match Alerts which are of the specified Alert type & Alert Subtypes

string
collectorGroupId
Optional

Filter for the rule to match Alerts triggered on resources belonging to given collector group

string
collectorUUId
Optional

Filter for the rule to match Alerts triggered on resources belonging to given collector

array of string
criticalities
Optional

Set of Alert criticalities that the alert is expected to be in

Possible values are : UNKNOWN, NONE, INFORMATION, WARNING, IMMEDIATE, CRITICAL, AUTO,
string As uuid As uuid
id
Optional

Identifier of this rule, automatically assigned by the system on create

array of link
links
Optional

links

string
name
Required

Name of this rule

string
pluginId
Optional

Identifier of the plugin for which this rule applies

array of name-value
properties
Optional

Properties associated with the given rule. This may include information such as the email addresses of receivers/etc...

resourceFilter
Optional

Filter for resources. If matchResourceIdOnly is specified, alerts are selected if their resource ids match with the 'resourceId' specified in the filter. Otherwise, the system looks at all the resource's children. The possible set of children can be further filtered based on the childrenResourceKindKeyFilters.

resourceFilters
Optional

Filters for the rule to be matched based on the "Resource and its Children" for which the Alerts were generated. This collection takes precedence over resourceFilter field.

resourceKindFilter
Optional

Filter based on the resource kind

resourceKindFilters
Optional

Filter for the rule to be matched based on the Resource Kind for which the alert was generated

string
templateId
Optional

Identifier of the template. NOTE: For deprecated plugin types this field will be ignored. For all other plugin types, default templates will be used if this value is not specified.

Authentication
This operation uses the following authentication methods.
Responses
201

The Notification Rule was created successfully in the system

Returns notification-rule of type(s) application/json
{
    "alertControlStates": [
        "string"
    ],
    "alertDefinitionIdFilters": {
        "values": [
            "string"
        ]
    },
    "alertImpactFilters": {
        "values": [
            "string"
        ]
    },
    "alertStatuses": [
        "string"
    ],
    "alertTypeFilters": [
        {
            "alertSubTypes": [
                0
            ],
            "alertType": 0
        }
    ],
    "collectorGroupId": "string",
    "collectorUUId": "string",
    "criticalities": [
        "string"
    ],
    "id": "string",
    "links": [
        {
            "description": "string",
            "href": "string",
            "name": "string",
            "rel": "string"
        }
    ],
    "name": "string",
    "pluginId": "string",
    "properties": [
        {
            "name": "string",
            "value": "string"
        }
    ],
    "resourceFilter": {
        "childrenResourceKindFilters": [
            "string"
        ],
        "childrenResourceKindKeyFilters": [
            {
                "adapterKind": "string",
                "resourceKind": "string"
            }
        ],
        "matchResourceIdOnly": false,
        "relationship": "string",
        "resourceId": "string"
    },
    "resourceFilters": [
        {
            "childrenResourceKindFilters": [
                "string"
            ],
            "childrenResourceKindKeyFilters": [
                {
                    "adapterKind": "string",
                    "resourceKind": "string"
                }
            ],
            "matchResourceIdOnly": false,
            "relationship": "string",
            "resourceId": "string"
        }
    ],
    "resourceKindFilter": {
        "adapterKind": "string",
        "resourceKind": "string"
    },
    "resourceKindFilters": [
        {
            "adapterKind": "string",
            "resourceKind": "string"
        }
    ],
    "templateId": "string"
}
array of string
alertControlStates
Optional

Set of Alert control states that the alert is expected to be in

Possible values are : OPEN, ASSIGNED, SUSPENDED, SUPPRESSED,
alertDefinitionIdFilters
Optional

alertDefinitionIdFilters

alertImpactFilters
Optional

alertImpactFilters

array of string
alertStatuses
Optional

Set of Alert states that the alert is expected to be in

Possible values are : NEW, ACTIVE, UPDATED, CANCELED,
alertTypeFilters
Optional

Filter for the rule to match Alerts which are of the specified Alert type & Alert Subtypes

string
collectorGroupId
Optional

Filter for the rule to match Alerts triggered on resources belonging to given collector group

string
collectorUUId
Optional

Filter for the rule to match Alerts triggered on resources belonging to given collector

array of string
criticalities
Optional

Set of Alert criticalities that the alert is expected to be in

Possible values are : UNKNOWN, NONE, INFORMATION, WARNING, IMMEDIATE, CRITICAL, AUTO,
string As uuid As uuid
id
Optional

Identifier of this rule, automatically assigned by the system on create

array of link
links
Optional

links

string
name
Required

Name of this rule

string
pluginId
Optional

Identifier of the plugin for which this rule applies

array of name-value
properties
Optional

Properties associated with the given rule. This may include information such as the email addresses of receivers/etc...

resourceFilter
Optional

Filter for resources. If matchResourceIdOnly is specified, alerts are selected if their resource ids match with the 'resourceId' specified in the filter. Otherwise, the system looks at all the resource's children. The possible set of children can be further filtered based on the childrenResourceKindKeyFilters.

resourceFilters
Optional

Filters for the rule to be matched based on the "Resource and its Children" for which the Alerts were generated. This collection takes precedence over resourceFilter field.

resourceKindFilter
Optional

Filter based on the resource kind

resourceKindFilters
Optional

Filter for the rule to be matched based on the Resource Kind for which the alert was generated

string
templateId
Optional

Identifier of the template. NOTE: For deprecated plugin types this field will be ignored. For all other plugin types, default templates will be used if this value is not specified.


404

An invalid Alert Definition identifier was specified as part of Alert Definition Filter

Operation doesn't return any data structure

422

An invalid request body was specified or any constraints were violated

Operation doesn't return any data structure

500

There was an error during the creation of the Notification Rule

Operation doesn't return any data structure