POST – Simple update for firmware
This action can perform an update of installed software component(s) as contained within a software image file located at a URI referenced by the ImageURI parameter.
Request URL
POST https://<BMC_IPADDR>/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate
Request body
Parameter | Type | Error Message ID |
---|---|---|
ImageURI | String | URI for the image file. |
Targets | String | URIs of the resource that is expected to update. That is, when you intend to update firmware for BMC (Backup), the Targets parameter must be [/redfish/v1/UpdateService/FirmwareInventory/BMC-Backup]. This is also the exclusive case to provide a value in Targets to update firmware with Redfish, and only applicable for BMC (Backup) update. In order to update other kind of firmware, the Targets is not needed or accepts null value. |
TransferProtocol | String | Network protocol used by the Service to retrieve the firmware image file. |
Username | String | User name to access an sftp server. It’s required when the image is located on an sftp server, and username:password is not available in ImageURI. |
Password | String | Password to access an sftp server. It’s required when the image is located on an sftp server, and username:password is not available in ImageURI. |
@Redfish.OperationApplyTime | String | Specify when to start to update SimpleUpdate-provided firmware. Accepted settings are
|
Response
Field | Type | Error Message ID |
---|---|---|
Id | String | The created task ID. |
Name | String | Task name. |
Description | String | This resource represents a task for a Redfish implementation. |
TaskMonitor | String | The URI of the Task Monitor for this task. |
StartTime | String | The date-time stamp that the task was last started. |
TaskState | String | The state of the task. |
Messages | Array | This is an array of messages associated with the task. |
PercentComplete | Integer | Task completion in percent. |
HidePayload | Boolean | Indicates Payload object is hidden and not returned on GET. |
Status code
HTTP Status Code | Error Message ID |
---|---|
202 | Accepted |
400 | BadRequest, ActionParamMissing , ActionParamTypeError , ActionParamFormatError |
419 | Conflict |
500 | InternalError |
Example
The following example is the request to update BMC (Backup). The POST body is filled as below:
{
"ImageURI":"sftp://192.168.1.216/tmp/xcc/lnvgy_fw_xcc_cdi338d-2.70_anyos_noarch.uxz",
"Targets": [
"/redfish/v1/UpdateService/FirmwareInventory/BMC-Backup"
],
"Username":"userid",
"Password":"password"
"@Redfish.OperationApplyTime": "Immediate"
}
The following example is the request to update UEFI. The POST body is filled as below:
{
"ImageURI":"sftp://192.168.1.216/test/lnvgy_fw_uefi_use105d-1.10_anyos_32-64.uxz",
"Targets": [],
"Username":"userid",
"Password":"password",
"@Redfish.OperationApplyTime": "OnReset"
}
The following example JSON response for POST SimpleUpdate action is returned.
{
"TaskState": "New",
"Id": "2a372022-8d74-4503-bf9a-6b24c52f26e0",
"TaskMonitor": "/redfish/v1/TaskService/7df1c3c5-a4ab-42a4-92cb-a8ace5b576d4",
"PercentComplete": 0,
"Description": "This resource represents a task for a Redfish implementation.",
"HidePayload": true,
"StartTime": "2022-12-15T08:05:56+00:00",
"Name": "Task 2a372022-8d74-4503-bf9a-6b24c52f26e0",
"@odata.type": "#Task.v1_5_1.Task",
"@odata.id": "/redfish/v1/TaskService/Tasks/2a372022-8d74-4503-bf9a-6b24c52f26e0",
"@odata.context": "/redfish/v1/$metadata#Task.Task",
"Messages": [],
"@odata.etag": "\"1671091556862\""
}
if “OnReset” is specified in the request, the Service will be pending until it receives a host power reset/on signal and then start update.
In the response body, a new created “task” resource is included.
{
"TaskState": "Pending",
"StartTime": "2022-12-15T08:05:56+00:00",
"TaskMonitor": "/redfish/v1/TaskService/7df1c3c5-a4ab-42a4-92cb-a8ace5b576d4",
"PercentComplete": 0,
"Description": "This resource represents a task for a Redfish implementation.",
"Id": "2a372022-8d74-4503-bf9a-6b24c52f26e0",
"HidePayload": true,
"Name": "Task 2a372022-8d74-4503-bf9a-6b24c52f26e0",
"@odata.type": "#Task.v1_5_1.Task",
"@odata.id": "/redfish/v1/TaskService/Tasks/2a372022-8d74-4503-bf9a-6b24c52f26e0",
"@odata.context": "/redfish/v1/$metadata#Task.Task",
"Messages": [
{
"MessageId": "Update.1.0.UpdateInProgress",
"@odata.type": "#Message.v1_1_2.Message",
"Resolution": "None.",
"MessageSeverity": "OK",
"Message": "An update is in progress.",
"MessageArgs": []
}
],
"@odata.etag": "\"1671091615381\""
}
if “OnReset” is specified in the request, the Service will be pending until it receives a host power reset/on signal and then start update.
Then “Get” the task URI to check the updating process. The following example JSON response is returned.
{
"TaskState": "Running",
"StartTime": "2022-12-15T08:05:56+00:00",
"TaskMonitor": "/redfish/v1/TaskService/7df1c3c5-a4ab-42a4-92cb-a8ace5b576d4",
"PercentComplete": 71,
"Description": "This resource represents a task for a Redfish implementation.",
"Id": "2a372022-8d74-4503-bf9a-6b24c52f26e0",
"HidePayload": true,
"Name": "Task 2a372022-8d74-4503-bf9a-6b24c52f26e0",
"@odata.type": "#Task.v1_5_1.Task",
"@odata.id": "/redfish/v1/TaskService/Tasks/2a372022-8d74-4503-bf9a-6b24c52f26e0",
"@odata.context": "/redfish/v1/$metadata#Task.Task",
"Messages": [
{
"MessageId": "Update.1.0.UpdateInProgress",
"@odata.type": "#Message.v1_1_2.Message",
"Resolution": "None.",
"MessageSeverity": "OK",
"MessageArgs": [],
"Message": "An update is in progress."
}
],
"@odata.etag": "\"1671091716264\""
}
In the response body, a new created “Job” resource is included.
{
"TaskState": "Completed",
"TaskStatus": "OK",
"EndTime": "2022-12-15T08:08:46+00:00",
"StartTime": "2022-12-15T08:05:56+00:00",
"TaskMonitor": "/redfish/v1/TaskService/7df1c3c5-a4ab-42a4-92cb-a8ace5b576d4",
"PercentComplete": 100,
"Description": "This resource represents a task for a Redfish implementation.",
"Id": "2a372022-8d74-4503-bf9a-6b24c52f26e0",
"HidePayload": true,
"Name": "Task 2a372022-8d74-4503-bf9a-6b24c52f26e0",
"@odata.type": "#Task.v1_5_1.Task",
"@odata.id": "/redfish/v1/TaskService/Tasks/2a372022-8d74-4503-bf9a-6b24c52f26e0",
"@odata.context": "/redfish/v1/$metadata#Task.Task",
"Messages": [
{
"MessageId": "Update.1.0.OperationTransitionedToJob",
"@odata.type": "#Message.v1_1_2.Message",
"Resolution": "Follow the referenced job and monitor the job for further updates.",
"MessageSeverity": "OK",
"Message": "The update operation has transitioned to the job at URI '/redfish/v1/JobService/Jobs/JobR000001-Update'.",
"MessageArgs": [
"/redfish/v1/JobService/Jobs/JobR000001-Update"
]
}
],
"@odata.etag": "\"1671091726964\""
}
Then “Get” the Job URI to check the updating process. The following example JSON response is returned.
{
"JobState": "Completed",
"Steps": {
"@odata.id": "/redfish/v1/JobService/Jobs/JobR000001-Update/Steps"
},
"EndTime": "2022-12-15T08:08:55+00:00",
"StartTime": "2022-12-15T08:08:46+00:00",
"PercentComplete": 100,
"Description": "This resource is used to represent a job for a Redfish implementation.",
"Messages": [
{
"MessageId": "Update.1.0.UpdateSuccessful",
"@odata.type": "#Message.v1_1_2.Message",
"Resolution": "None.",
"MessageSeverity": "OK",
"Message": "Device '/redfish/v1/UpdateService/FirmwareInventory/UEFI' successfully updated with image 'lnvgy_fw_uefi_use105d-1.10_anyos_32-64.uxz'.",
"MessageArgs": [
"/redfish/v1/UpdateService/FirmwareInventory/UEFI",
"lnvgy_fw_uefi_use105d-1.10_anyos_32-64.uxz"
]
}
],
"Id": "JobR000001-Update",
"Name": "JobR000001-Update",
"@odata.type": "#Job.v1_0_7.Job",
"@odata.id": "/redfish/v1/JobService/Jobs/JobR000001-Update",
"@odata.context": "/redfish/v1/$metadata#Job.Job",
"StepOrder": [
"UEFI"
],
"@odata.etag": "\"1671091735837\""
}