
Examples¶
RestfulApiExamples.py and RedfishAPiExamples.py modules contain few examples for performing different iLO tasks using legacy RESTful API and Redfish API respectively. The examples in this page are legacy RESTful examples and are very similar to their Redfish equivalents. The HPE RESTful API 1.x expresses the root Uniform Resource Identifier (URI) protocol version as “/rest/v1”. Redfish 1.0 expresses the starting URI as “/redfish/v1/”.
Redfish changes the linking between resources, for example “href” is renamed to “@odata.id”. For more information about Redfish implementation click here .
The following examples can all be used as guidance for managing iLO using iLO RESTful API.
- Example 1: Get resource directory
- Example 2: Get base registry
- Example 3: Change BIOS setting
- Example 4: Reset a server
- Example 5: Enable secured boot
- Example 6: Revert to default BIOS setting
- Example 7: Change UEFI boot order
- Example 8: Change temporary boot order
- Example 9: Find iLO mac address
- Example 10: Add iLO user account
- Example 11: Modify iLO user account
- Example 12: Remove iLO user account
- Example 13: Dump iLO NIC states
- Example 14: Create and delete a user session
- Example 15: Set UID light
- Example 16: Get computer details
- Example 17: Mount virtual media ISO
- Example 18: Set server asset tag
- Example 19: Reset iLO
- Example 20: Get iLO NIC
- Example 21: Set iLO NIC active
- Example 22: Dump Integrated Management Log
- Example 23: Get iLO Event Log
- Example 24: Clear Integrated Management Log
- Example 25: Clear iLO Event Log
- Example 26: configure SNMP
- Example 27: Get schema
- Example 28: Set iLO time zone
- Example 29: Set iLO NTP servers
- Example 30: Get power metrics average
- Example 31: Set license key
- Example 32: Set BIOS DHCP
- Example 33: Set BIOS services
- Example 34: Set BIOS UEFI shell startup settings
- Example 35: Set BIOS ISCSI
- Example 36: Set BIOS URL boot file
- Example 37: Set ESKM Primary Key Server
- Example 38: Set ESKM username password
- Example 39: test ESKM conenction
- Example 40: reset ESKM event log
- Example 41: Dump ESKM Event Log
- Example 42: Get ESKM
- Example 43: Get Encryption Settings
- Example 44: Get logical drives
- Example 45: Get license key
- Example 46: Get AHS data
- Example 47: Clear AHS data
- Example 48: Set BIOS password