Redfish resources usually support HTTP GET requests to retrieve the current state. Modifications and deletions can be performed against eligible resources with HTTP POST, PUT, PATCH, or DELETE.
The exhaustive list of permitted requests on a given resource is in the Allow
header of the GET response. The following example retrieves the possible actions on the BIOS current attributes.
curl --insecure --silent --head --user ilo-user:password \
'https://ilo-ip/redfish/v1/Systems/1/Bios' | grep Allow
The following example retrieves the possible actions on the BIOS pending attributes URI.
curl --insecure --silent --head --user ilo-user:password \
'https://ilo-ip/redfish/v1/Systems/1/Bios/Settings' | grep Allow
However, there are some resources that support other types of operations not easily mapped to HTTP operations. For example, a power button is not readable so you cannot GET
its status. In this case, pressing the power button is an action.
For this reason the Redfish specification defines Actions
. Actions
are HTTP POST
operations with a specifically formatted JSON request including the operation to perform and potentially parameters. For instance, it is not enough to simply tell a server to reset, but it is also necessary to specify the type of reset
: cold boot, warm boot, PCI reset, etc. Actions are often used when the operation causes Management Controllers not just to update a value, but to change system state.
In Redfish, the available actions that can be invoked are identified by a target
property in the resource's Actions
object definitions. Potential parameters with possible supported values are listed with the annotation Parameter@Redfish.AllowableValues
.
The following example retrieves the list of possible actions from the PK Secure Boot Database resource of an HPE iLO 6 based server.
GET /redfish/v1/Systems/1/SecureBoot/SecureBootDatabases/PK/?$select=Actions
The following example retrieves the possible actions of a PLDM for RDE storage controller.
curl --insecure --silent --location \
'https://ilo-ip/redfish/v1/Systems/1/Storage/DE00D000/?$select=Actions' \
--user demopaq:password | jq
The Redfish specification allows OEMs to specify Actions
objects under their respective Oem
sections. Those actions are invoked the same way as standard actions with a POST request to the target
URI with allowable parameter values.
The following example retrieves the list of standard and HPE specific actions available in the ComputerSystem
resource of an iLO based server.
/redfish/v1/Systems/1/?$select=Actions, Oem/Hpe/Actions/
The following example retrieves all the HPE specific actions available in an HPE iLO based server using the iLOrest Redfish client.
#!/usr/bin/bash
bmcIp="ilo-ip"
bmcUser="ilo-user"
bmcPassword="password"
ilorest="ilorest --nologo"
$ilorest logout &>/dev/null # Cleanup iLOrest cache, just in case
$ilorest login $bmcIp -u $bmcUser -p $bmcPassword
Types=$($ilorest types | awk '!/Collection/ && !/Type options:/ {print $0}' | tr -d '\r')
for t in $Types ; do
echo "Processing ${t}"
$ilorest select ${t}
$ilorest get --json Oem/Hpe/Actions 2>/dev/null
echo -e "Done\n"
done
$ilorest logout
The following example lists the possible HPE OEM actions against an HPE iLO 5 (or later) management controller.
GET /redfish/v1/Managers/{{ManagerId}}/?$select=Oem/Hpe/Actions
The following example clears the Redfish state of an HPE iLO 5 (or later) management controller using its OEM specific action. An iLO reset is required.
Refer to the Session authentication paragraph to learn how to create a session token with cURL as used for the reset action in the following example.
POST /redfish/v1/Managers/1/Actions/Oem/Hpe/HpeiLO.ClearRestApiState/
Body:
{} or
none
The following example performs a PressAndHold HPE specific action on an HPE iLO based system using cURL and then iLOrest.
As explained in the Redfish error responses and messages section, successful responses are part of an error
JSON object.
iloIP="ilo-ip"
iloUser="ilo-user"
iloPassword="password"
curl --insecure -u ${iloUser}:${iloPassword} \
--header "Content-Type: application/json" \
--request POST --data '{"PushType": "PressAndHold"}' \
https://${iloIP}/redfish/v1/Systems/1/Actions/Oem/Hpe/HpeComputerSystemExt.PowerButton/
The following example performs an HPE specific action that simulates the removal of the physical power cables of an HPE ProLiant or Synergy server. This action is sometime called efuse, e-fuse or Auxiliary Power Cycle .
If the e-fuse action is sent while the server is off, iLO starts immediately a reset. Otherwise, a server power off is needed to trigger the e-fuse action.
POST: /redfish/v1/Systems/1/Actions/Oem/Hpe/HpeComputerSystemExt.SystemReset/
A standard computer reset example is presented in the Redfish examples section of this document.
The following example creates a user defined temperature threshold in the inlet ambient sensor object part of the Chassis/Thermal/Oem/Hpe
subtree. It is also present in the Examples section.
POST: /redfish/v1/Chassis/1/Thermal/Actions/Oem/Hpe/HpeThermalExt.SetUserTempThreshold/
- An iLO reset is required to take this action into account.
- A
WarningUsertTempThreshold=40
property is created under/redfish/v1/Chassis/1/Thermal/Oem/Hpe
. IfAlerType
isCritical
, the created property isCriticalUsertTempThreshold
. - An IML log record is created when the threshold is exceeded.