Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell EMC OpenManage Enterprise 3.9 RESTful API Guide

PDF

GET method for AlertPolicies

This method returns the policies that are created.

Description
Returns all the policies.
Privilege
VIEW
HTTP response codes
200
Example response body
{
    "@odata.context": "/api/$metadata#Collection(AlertService.AlertPolicy)",
    "@odata.count": 4,
    "value": [
        {
            "@odata.type": "#AlertService.AlertPolicy",
            "@odata.id": "/api/AlertService/AlertPolicies(11981)",
            "Id": 11981,
            "Name": "Policy1",
            "Description": "Policy1",
            "Enabled": true,
            "DefaultPolicy": false,
            "PolicyData": {
                "Catalogs": [],
                "Severities": [],
                "MessageIds": [],
                "Devices": [],
                "DeviceTypes": [],
                "Groups": [
                    500
                ],
                "AllTargets": false,
                "Schedule": {
                    "StartTime": "2021-08-31 18:30:00.455",
                    "EndTime": "",
                    "CronString": "* * * ? * * *",
                    "Interval": false
                },
                "Actions": [
                    {
                        "Id": 28,
                        "Name": "Email",
                        "ParameterDetails": [
                            {
                                "Id": 1,
                                "Name": "subject",
                                "Value": "Device Name: $name,  Device IP Address: $ip,  Severity: $severity",
                                "Type": "string",
                                "TypeParams": [
                                    {
                                        "Name": "maxLength",
                                        "Value": "255"
                                    }
                                ]
                            },
                            {
                                "Id": 1,
                                "Name": "to",
                                "Value": "ngmuser@ngmmail.com",
                                "Type": "string",
                                "TypeParams": [
                                    {
                                        "Name": "maxLength",
                                        "Value": "255"
                                    }
                                ]
                            },
                            {
                                "Id": 1,
                                "Name": "from",
                                "Value": "Akbar@Dell.com",
                                "Type": "string",
                                "TypeParams": [
                                    {
                                        "Name": "maxLength",
                                        "Value": "255"
                                    }
                                ]
                            },
                            {
                                "Id": 1,
                                "Name": "message",
                                "Value": "Event occurred for Device Name: $name, Device IP Address: $ip, Service Tag: $identifier, UTC Time: $time, Severity: $severity, Message ID: $messageId, $message",
                                "Type": "string",
                                "TypeParams": [
                                    {
                                        "Name": "maxLength",
                                        "Value": "255"
                                    }
                                ]
                            }
                        ],
                        "TemplateId": 50
                    }
                ],
                "UndiscoveredTargets": []
            },
            "State": true,
            "Visible": true,
            "Owner": 10061,
            "PolicyActions@odata.navigationLink": "/api/AlertService/AlertPolicies(11981)/PolicyActions",
            "PolicyCriteria@odata.navigationLink": "/api/AlertService/AlertPolicies(11981)/PolicyCriteria"
        },
        {
            "@odata.type": "#AlertService.AlertPolicy",
            "@odata.id": "/api/AlertService/AlertPolicies(11982)",
            "Id": 11982,
            "Name": "Policy2",
            "Description": "Policy2",
            "Enabled": true,
            "DefaultPolicy": false,
            "PolicyData": {
                "Catalogs": [],
                "Severities": [],
                "MessageIds": [],
                "Devices": [],
                "DeviceTypes": [],
                "Groups": [
                    500
                ],
                "AllTargets": false,
                "Schedule": {
                    "StartTime": "2021-08-31 18:30:00.076",
                    "EndTime": "",
                    "CronString": "* * * ? * * *",
                    "Interval": false
                },
                "Actions": [
                    {
                        "Id": 29,
                        "Name": "Trap",
                        "ParameterDetails": [
                            {
                                "Id": 1,
                                "Name": "100.97.208.67:162",
                                "Value": "true",
                                "Type": "boolean",
                                "TypeParams": []
                            },
                            {
                                "Id": 2,
                                "Name": "100.97.203.77:162",
                                "Value": "true",
                                "Type": "boolean",
                                "TypeParams": []
                            },
                            {
                                "Id": 3,
                                "Name": "100.97.203.79:162",
                                "Value": "true",
                                "Type": "boolean",
                                "TypeParams": []
                            },
                            {
                                "Id": 4,
                                "Name": "2607:f2b1:f083:208::121:162",
                                "Value": "true",
                                "Type": "boolean",
                                "TypeParams": []
                            }
                        ],
                        "TemplateId": 60
                    }
                ],
                "UndiscoveredTargets": []
            },
            "State": true,
            "Visible": true,
            "Owner": 10061,
            "PolicyActions@odata.navigationLink": "/api/AlertService/AlertPolicies(11982)/PolicyActions",
            "PolicyCriteria@odata.navigationLink": "/api/AlertService/AlertPolicies(11982)/PolicyCriteria"
        },
        {
            "@odata.type": "#AlertService.AlertPolicy",
            "@odata.id": "/api/AlertService/AlertPolicies(11983)",
            "Id": 11983,
            "Name": "Policy3",
            "Description": "Policy3",
            "Enabled": true,
            "DefaultPolicy": false,
            "PolicyData": {
                "Catalogs": [],
                "Severities": [],
                "MessageIds": [],
                "Devices": [],
                "DeviceTypes": [],
                "Groups": [
                    500
                ],
                "AllTargets": false,
                "Schedule": {
                    "StartTime": "2021-08-31 18:30:00.420",
                    "EndTime": "",
                    "CronString": "* * * ? * * *",
                    "Interval": false
                },
                "Actions": [
                    {
                        "Id": 30,
                        "Name": "Syslog",
                        "ParameterDetails": [
                            {
                                "Id": 1,
                                "Name": "100.97.208.67:514",
                                "Value": "true",
                                "Type": "boolean",
                                "TypeParams": []
                            },
                            {
                                "Id": 2,
                                "Name": "100.97.203.77:514",
                                "Value": "true",
                                "Type": "boolean",
                                "TypeParams": []
                            },
                            {
                                "Id": 3,
                                "Name": "100.97.203.79:514",
                                "Value": "true",
                                "Type": "boolean",
                                "TypeParams": []
                            },
                            {
                                "Id": 4,
                                "Name": "2607:f2b1:f083:208::121:514",
                                "Value": "true",
                                "Type": "boolean",
                                "TypeParams": []
                            }
                        ],
                        "TemplateId": 90
                    }
                ],
                "UndiscoveredTargets": []
            },
            "State": true,
            "Visible": true,
            "Owner": 10061,
            "PolicyActions@odata.navigationLink": "/api/AlertService/AlertPolicies(11983)/PolicyActions",
            "PolicyCriteria@odata.navigationLink": "/api/AlertService/AlertPolicies(11983)/PolicyCriteria"
        },
        {
            "@odata.type": "#AlertService.AlertPolicy",
            "@odata.id": "/api/AlertService/AlertPolicies(14666)",
            "Id": 14666,
            "Name": "Forward Traps to OME Policy 100.97.203.79 Wed Sep 29 08:21:33 UTC 2021",
            "Description": "Autogenerated Policy By OMEnterprise Appliance",
            "Enabled": true,
            "DefaultPolicy": false,
            "PolicyData": {
                "Catalogs": [],
                "Severities": [],
                "MessageIds": [],
                "Devices": [
                    11712,
                    11713,
                    11714,
                    11718,
                    11719,
                    11721,
                    11722,
                    11724,
                    11728,
                    11729,
                    11730,
                    11733,
                    11734,
                    11735,
                    11737,
                    11739,
                    10076,
                    11740,
                    10077,
                    11741,
                    10078,
                    11742,
                    10079,
                    10080,
                    10081,
                    10082,
                    10083,
                    11747,
                    10084,
                    11749,
                    11752,
                    11755,
                    11758,
                    11760,
                    11705,
                    11706,
                    11707,
                    11709,
                    11710
                ],
                "DeviceTypes": [
                    1000,
                    2000,
                    4000,
                    8000
                ],
                "Groups": [],
                "AllTargets": false,
                "Schedule": {
                    "StartTime": null,
                    "EndTime": null,
                    "CronString": null,
                    "Interval": false
                },
                "Actions": [
                    {
                        "Id": 32,
                        "Name": "Trap",
                        "ParameterDetails": [
                            {
                                "Id": 3,
                                "Name": "100.97.203.79:162",
                                "Value": "true",
                                "Type": "boolean",
                                "TypeParams": []
                            }
                        ],
                        "TemplateId": 60
                    }
                ],
                "UndiscoveredTargets": []
            },
            "State": true,
            "Visible": true,
            "Owner": 10061,
            "PolicyActions@odata.navigationLink": "/api/AlertService/AlertPolicies(14666)/PolicyActions",
            "PolicyCriteria@odata.navigationLink": "/api/AlertService/AlertPolicies(14666)/PolicyCriteria"
        }
    ]
}
Table 1. AttributesThis table lists the attributes that this method supports.
Attribute name Description
Id Event record ID.
Name Name associated with the policy.
Description Description associated with the policy.
Enabled Indicates if the policy is enabled or disabled.
DefaultPolicy Indicates if the policy is the default policy or pre-seeded.
State State associated with the policy.
Visible Indicate if the policy is visible or hidden.
PolicyData
CatalogName Name of the catalogs associated with the policy. This field is checked during policy evaluation.
Categories Name of the categories associated with the policy. This field is checked during policy evaluation.
SubCategories Name of the subcategories associated with the policy. If defined, this field is checked during policy evaluation.
Severities List of severities that are associated with the policy. This field is checked during policy evaluation.
Devices List of devices that are associated with the policy. This field is checked during policy evaluation.
DevicesTypes List of devices types associated to the policy.
Groups List of groups that are associated with the policy. This field is checked during policy evaluation.
Schedule
StartTime Start event-time to verify. This value indicates the start date and time for policy validity. If defined. This field is checked during policy evaluation.
EndTime End event-time to verify. This value indicates the end date and time for policy validity. If defined. This field is checked during policy evaluation.
CronString CRON string that is associated with the policy. This field indicates a special CRON that can be applied to the policy to indicate values such as the days for which the policy is valid.
Actions
Id ID of action.
Name Name associated with the action.
ParameterDetails Extra parameters that can be used for the action.
TemplateId ID of the template associated with the action.
PolicyActions Link to the list of actions that can be triggered for the policy.
PolicyCriteria Link to the criteria for the evaluation of the alert contents with the policy contents. This evaluation determines if the policy is valid and if any actions are triggered.

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\