Skip to main content

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

ParameterTypeError 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.

Response

FieldTypeError 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 CodeError Message ID
202Accepted
400BadRequest, ActionParamMissing , ActionParamTypeError , ActionParamFormatError
419Conflict
500InternalError

Example

The following example is the request to update BMC (Backup). The POST body is filled as below:

{
"ImageURI":"sftp://192.168.1.126/tmp/xcc/lnvgy_fw_xcc_cdi338d-2.70_anyos_noarch.uxz",
"Targets": [
"/redfish/v1/UpdateService/FirmwareInventory/BMC-Backup"
],
"Username":"userid",
"Password":"password"
}

The following example JSON response is returned.

{
"Id" : "c13eea76-4ee3-4696-8e03-0f0b16bb6512",
"Messages" : [],
"TaskState" : "New",
"@odata.etag" : "\"1577366735335\"",
"@odata.id" : "/redfish/v1/TaskService/Tasks/c13eea76-4ee3-4696-8e03-0f0b16bb6512",
"PercentComplete" : 0,
"@odata.type" : "#Task.v1_4_1.Task",
"StartTime" : "2019-12-26T13:25:35+00:00",
"Description" : "This resource represents a task for a Redfish implementation.",
"Name" : "Task c13eea76-4ee3-4696-8e03-0f0b16bb6512",
"HidePayload" : true,
"TaskMonitor" : "/redfish/v1/TaskService/0c24a202-c4ef-4bf8-9c10-2bb806ffd8a2"
}

In the response body, a new created “task” resource is included. Then “Get” the URI to check the updating process. The following example JSON response is returned.

{
"StartTime": "2019-12-26T13:25:35+00:00",
"TaskState": "Running",
"HidePayload": true,
"@odata.id": "/redfish/v1/TaskService/Tasks/c13eea76-4ee3-4696-8e03-0f0b16bb6512",
"PercentComplete": 17,
"Name": "Task c13eea76-4ee3-4696-8e03-0f0b16bb6512",
"TaskMonitor": "/redfish/v1/TaskService/0c24a202-c4ef-4bf8-9c10-2bb806ffd8a2",
"Id": "c13eea76-4ee3-4696-8e03-0f0b16bb6512",
"@odata.type": "#Task.v1_4_1.Task",
"@odata.etag": "\"1577366759808\"",
"Messages": [
{
"@odata.type": "#Message.v1_0_7.Message",
"Message": "The task with id c13eea76-4ee3-4696-8e03-0f0b16bb6512 has changed to progress 17 percent complete.",
"Resolution": "None.",
"Severity": "OK",
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageArgs": [
"c13eea76-4ee3-4696-8e03-0f0b16bb6512",
"17"
]
},
{
"@odata.type": "#Message.v1_0_7.Message",
"Message": "Transfer 49 percent complete.",
"Resolution": "None",
"Severity": "OK",
"MessageId": "LenovoFirmwareUpdateRegistry.1.0.UpdateTransferInProgress",
"MessageArgs": [
"49"
]
}
],
"Description": "This resource represents a task for a Redfish implementation."
}

The following example is the request to update UEFI. The POST body is filled as below:

{
"ImageURI":"sftp://192.168.1.126/tmp/uefi/lnvgy_fw_uefi_ive148m-2.41_anyos_32-64.uxz",
"Username":"userid",
"Password":"password"
}

The following example JSON response for POST SimpleUpdate action is returned.

{
"Id" : "5913dce0-dbc7-4ba3-a643-0f4cd4bec5e8",
"Messages" : [],
"TaskState" : "New",
"@odata.etag" : "\"1577365985589\"",
"@odata.id" : "/redfish/v1/TaskService/Tasks/5913dce0-dbc7-4ba3-a643-0f4cd4bec5e8",
"PercentComplete" : 0,
"@odata.type" : "#Task.v1_4_1.Task",
"StartTime" : "2019-12-26T13:13:05+00:00",
"Description" : "This resource represents a task for a Redfish implementation.",
"Name" : "Task 5913dce0-dbc7-4ba3-a643-0f4cd4bec5e8",
"HidePayload" : true,
"TaskMonitor" : "/redfish/v1/TaskService/20c990b8-6a6b-44dd-818c-9e6348bdfc4d"
}

In the response body, a new created “task” resource is included. Then “Get” the URI to check the updating process. The following example JSON response is returned.

{
"StartTime": "2019-12-26T13:13:05+00:00",
"TaskState": "Running",
"HidePayload": true,
"@odata.id": "/redfish/v1/TaskService/Tasks/5913dce0-dbc7-4ba3-a643-0f4cd4bec5e8",
"PercentComplete": 59,
"Messages": [
{
"MessageArgs": [
"5913dce0-dbc7-4ba3-a643-0f4cd4bec5e8",
"59"
],
"Message": "The task with id 5913dce0-dbc7-4ba3-a643-0f4cd4bec5e8 has changed to progress 59 percent complete.",
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"Severity": "OK",
"Resolution": "None.",
"@odata.type": "#Message.v1_0_7.Message"
},
{
"MessageArgs": [
"1",
"/redfish/v1/UpdateService/FirmwareInventory/UEFI",
"UEFI-IVE1-6",
"48M-2.41",
"Unknown"
],
"Message": "Assignment 1: Resource /redfish/v1/UpdateService/FirmwareInventory/UEFI SoftwareID UEFI-IVE1-6 Version 48M-2.41 to Version Unknown.",
"@odata.type": "#Message.v1_0_7.Message",
"Severity": "OK",
"MessageId": "LenovoFirmwareUpdateRegistry.1.0.UpdateAssignment",
"Resolution": "None"
},
{
"@odata.type": "#Message.v1_0_7.Message",
"Message": "Assignment 1: Apply 38 percent complete.",
"Resolution": "None",
"Severity": "OK",
"MessageId": "LenovoFirmwareUpdateRegistry.1.0.PayloadApplyInProgress",
"MessageArgs": [
"1",
"38"
]
}
],
"@odata.type": "#Task.v1_4_1.Task",
"Name": "Task 5913dce0-dbc7-4ba3-a643-0f4cd4bec5e8",
"Id": "5913dce0-dbc7-4ba3-a643-0f4cd4bec5e8",
"@odata.etag": "\"1577366006339\"",
"TaskMonitor": "/redfish/v1/TaskService/20c990b8-6a6b-44dd-818c-9e6348bdfc4d",
"Description": "This resource represents a task for a Redfish implementation."
}