Skip to main content

UEFI Firmware update

Request

POST https://{{ip}}/redfish/v1/UpdateService/upload
Content-Type: application/json
Table 1. UEFI update properties
NameTypeRead onlyDescription

FlashType

Strings

False

UEFIUpdate, it means performing UEFI update action.

UploadSelector

String

False

Default. It's a fixed value for this version.

Targets

String

False

An URI that indicates where to apply the update image.

Procedure

  1. Open postman, select the POST method, and type the URL below:

    https://{{ip}}/redfish/v1/UpdateService/upload

  2. In the Body tab for post action, select form-data and provide the key name as “UpdateFile” and change the type to “File”.

  3. Then in the value section, select the firmware image file that is available in the local machine.

  4. Create a JSON file parameters.json with content as below:

    {
    "Targets": [
    "/redfish/v1/Managers/Self"
    ]
    }
  5. Create a JSON file oem_parameters.json with the following content:

    {
    "FlashType":"UEFIUpdate",
    "UploadSelector":"Default"
    }
  6. Provide key name UpdateParameters and select parameters.json created in step 4.

  7. Provide key name OemParameters and select oem_parameters.json created in step 5.

  8. Click Send.

Response

The response content is 202 Accepted.

Note
If the update started before BMC booting finished, the response will be 400 as below. Please wait a moment and try again.
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_7.Message",
"Message": "Action UpdateService.MultipartPush firmware update is failed.",
"MessageArgs": [
"UpdateService.MultipartPush"
],
"MessageId": "AmiOem.1.0.BMCNotReadyForFirmwareUpdate",
"Resolution": "Wait for BMC ready.",
"Severity": "Warning"
}
],
"code": "AmiOem.1.0.BMCNotReadyForFirmwareUpdate",
"message": "Action UpdateService.MultipartPush firmware update is failed."
}
}

Request

Update Status Query

When the FW update request was sent successfully, there is a URL bonded to a task in response to query update status. And the “TaskState” and “TaskStatus” in the response of this query URL will will display update progress , and its percentage of the action.

GET https://{{ip}}/redfish/v1/TaskService/Tasks/{id}
Content-Type: application/json

Response example

{
"@odata.context": "/redfish/v1/$metadata#Task.Task",
"@odata.etag": "\"1585275010\"",
"@odata.id": "/redfish/v1/TaskService/Tasks/2",
"@odata.type": "#Task.v1_4_1.Task",
"Description": "Task for Update Service Task",
"Id": "2",
"Messages": [
{
"@odata.type": "#Message.v1_0_7.Message",
"Message": "Task /redfish/v1/UpdateService/Upload has completed.",
"MessageArgs": [
"/redfish/v1/UpdateService/Upload"
],
"MessageId": "Task.1.0.Completed",
"Resolution": "None",
"Severity": "OK"
},
{
"@odata.type": "#Message.v1_0_7.Message",
"Message": "Action /redfish/v1/UpdateService/Upload firmware update is completed.",
"MessageArgs": [
"/redfish/v1/UpdateService/upload"
],
"MessageId": "UpdateService.1.0.FirmwareUpdateCompleted",
"Resolution": "None",
"Severity": "OK"
}
],
"Name": "Update Service Task",
"TaskState": "Progress",
"TaskStatus": "0%"