About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Tutorial
Enterprise firmware update using Redfish APIs
Use UpdateService and TaskService for reliable asynchronous firmware deployment
The Redfish standard provides a modern, secure, and scalable API (Application programming interface) for managing hardware that includes performing firmware updates on baseboard management controllers (BMCs) and system components. This tutorial explains the IBM Power firmware update process using the Redfish UpdateService Uniform Resource Identifier (URI) with TaskService URI-based asynchronous monitoring, and includes real command output for reference.
Overview of the Redfish firmware update flow
Redfish supports firmware updates by uploading an image directly to the UpdateService URI. For large firmware images, the update operation typically runs asynchronously. Instead of returning success immediately, the BMC generates a Task object that the client must poll to track the update progress.
Key Redfish URI components used for firmware update include:
/redfish/v1/UpdateService An endpoint to upload an image and trigger firmware update operations.
/redfish/v1/TaskService/Tasks/{id} A resource representing a specific task associated with the update.
TaskMonitor A URI provided by the Task resource for lightweight progress polling.
Step-by-step guidance for firmware update
The firmware update procedure using Redfish consists of three major phases:
- Upload the firmware image to UpdateService URI
- Monitor and validate the update task object under TaskService URI
- Confirm completion on TaskService URI and perform any required post-update actions
Step 1: Upload the firmware image to UpdateService URI
The first step in the firmware update workflow is sending the firmware image file to the Redfish UpdateService URI. The update is triggered through a POST request, where the client uploads the firmware binary file in raw form (Content-Type: application/octet-stream).
Example command:
curl -k -H "X-Auth-Token: $bmc_token" \
-H "Content-Type: application/octet-stream" \
-X POST -T /path /Image.tar \
https://${<bmc_ip>}/redfish/v1/UpdateService
What happens internally is:
- The BMC accepts the file and begins validating the uploaded payload.
- The UpdateService URI creates a Task object to track the update because the operation is long running.
- The URI immediately returns control to the client without waiting for the update to finish.
Expected response:
A successful upload immediately returns a Task object response:
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"Id": "0",
"TaskState": "Running",
"TaskStatus": "OK"
}
Above result indicates that the update process has started asynchronously, and progress must be checked through the TaskService URI.
Step 2: Monitor and validate the update task object under TaskService URI
There are two ways in which you can monitor and validate the Update task object under the TaskService URI. This step explains both the options.
Option 1: Query task object by task ID
This step verifies the internal state of the firmware update that was started in step 1. The Task resource stores all operational information about the ongoing update.
curl -k -H "X-Auth-Token: $bmc_token" \
-X GET https://
${<bmc_ip>}/redfish/v1/TaskService/Tasks/0
Sample task output
The task includes metadata such as:
- Messages[] – Specifies the progress updates and events
- PercentComplete – Indicates numeric progress
- TaskState – Includes states such as Running, Completed, Exception, and so on
- TaskMonitor – Provides a shortcut URI for lighter polling
Expected response:
{
"Id": "0",
"Messages": [
{
"Message": "The task with id 0 has started.",
"MessageId": "TaskEvent.1.0.1.TaskStarted"
}
],
"PercentComplete": 0,
"TaskState": "Running",
"TaskStatus": "OK",
"TaskMonitor": "/redfish/v1/TaskService/Tasks/0/Monitor"
}
Option 2: Use the TaskMonitor URI (preferred for frequent polling)
When the full Task object data is too large, clients need not wait to download it. Instead, they can use the TaskMonitor URI, which is smaller and designed for fast, repeated checks.
curl -k -H "X-Auth-Token: $bmc_token" \
-X GET
https://${<bmc_ip>}//redfish/v1/TaskService/Tasks/0/Monitor
Expected response:
{
"Id": "0",
"TaskState": "Running",
"TaskStatus": "OK"
}
Step 3: Confirm completion on TaskService URI and perform any required post-update actions
After the update is complete, you can query the task object again to find the final state.
curl -k -H "X-Auth-Token: $bmc_token" \
-X GET https://$bmc_ip/redfish/v1/TaskService/Tasks/0
Expected response:
{
"Id": "0",
"EndTime": "2022-05-02T07:38:51+00:00",
"Messages": [
{ "Message": "The task with id 0 has started." },
{ "Message": "Progress 10 percent complete." },
{ "Message": "Progress 11 percent complete." },
{ "Message": "Progress 90 percent complete." },
{ "Message": "Progress 100 percent complete." },
{
"Message": "The task with id 0 has Completed.",
"MessageId": "TaskEvent.1.0.1.TaskCompletedOK"
}
],
"PercentComplete": 100,
"TaskState": "Completed",
"TaskStatus": "OK"
}
This confirms that:
- The firmware upload was successful.
- The update completed without errors.
- The image has been processed, and the system requires a reboot.
Conclusion
The Redfish-based firmware update process provides a modern, secure, and efficient method for updating BMC and system firmware using industry-standard RESTful APIs. By leveraging the UpdateService URI for image upload and the TaskService URI for asynchronous job management, administrators can reliably perform updates without blocking the client or interrupting other management operations.
The workflow ensures:
- Scalability, as large firmware images are handled asynchronously.
- Transparency, with detailed progress indicators, messages, and completion status.
- Reliability, thanks to structured Task states and clear error reporting.
- Automation-friendliness, making it easy to integrate into CI/CD pipelines or automated service tools.
Overall, the Redfish task-based update mechanism offers a predictable, manageable, and standards-compliant approach to firmware lifecycle management, enhancing both operational efficiency and platform stability.