White Papers
43 Dell OpenManage Power Center 4.0 REST API Reference Guide
Sample Code:
4.22 PDU Outlet Assignment Report
Below API is used for consuming “PDU Outlet Assignment” report.
API usage:
POST <BASE_URL>/pduOutletAssignment
Sample Request:
“selectAllGroups”: false,
not applicable, do not use or set value to false
url = bseurl + 'eventsReport'
post_data = str.encode(
'{"requestObj": '
'{"description": "Events in last n days with certain severity",'
'"startDateTime": "' + reportStartDate + '",'
'"endDateTime": "' + reportEndDate + '",'
'"aggPeriodType": -1,'
'"aggPeriodValue": -1,'
'"maxResults": -1,'
'"entityList": [],'
'"entityGroupList": [],'
'"percentPower": 0,'
'"severity": [1,2,3],'
'"selectAllDevices": false,'
'"selectAllGroups": false,'
'"attributes": ['
'{"fieldName": "Name","key": "name","mandatory": 1,"needed": 1,"required": 1},'
'{"fieldName": "Time Stamp","key": "timeStamp","mandatory": 1,"needed": 1,"required": 1},'
'{"fieldName": "Event Severity","key": "severity","mandatory": 1,"needed": 1,"required": 1},'
'{"fieldName": "Event Type","key": "eventType","mandatory": 1,"needed": 1,"required": 1},'
'{"fieldName": "Event Acknowledged By","key": "eventAcknowledgedBy","mandatory": 0,"needed": 1,"required": 1},'
'{"fieldName": "Event Description","key": "eventDescription","mandatory": 1,"needed": 1,"required": 1}]}}')
Used
Body
Description
"aggPeriodType": -1,
Aggregation period disabled. Must be
-1
"aggPeriodValue": -1,
Aggregation period disabled. Must be
-1
"attributes": [],
Use default of customize attributes
"startDateTime": "2016-05-
01T00:00:00.000Z",
not applicable
"endDateTime": "2016-05-
02T00:00:00.000Z",
not applicable
"maxResults": -1,
Max result record count allowed, -1 for
returning all records
"entityList": [ {"hostName": "","ipAddress":
"192.186.2.20", "serviceTagOrSerialNum": ""
}],
Specify target PDU list.
If "selectAllDevices" is true, this field is
ignored, keep it empty. If
"selectAllDevices" is false, must
provide non-empty entity list.
Providing empty list or invalid group /
entity will result in error.
Note: if you provided devices that are
not PDUs or do not have Outlet Power
capability, error will not be returned,