Skip to main content

POST – Multipart HTTP Push update for firmware

This operation can perform an update of installed software component(s) by pushing a software image file to the URI referenced by UpdateService.MultipartHttpPushUri property. In XCC2 redfish service, the UpdateService.MultipartHttpPushUri property value is “/mfwupdate”.

Request URL

POST https://<BMC_IPADDR>/mfwupdate

Request body

The HTTP POST operation shall provide authentication with the sufficient privilege to access the UpdateService resource.

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.

Note
The client may optionally include HTTP multipart form data in the POST body to specify the image file name as RFC2388 specified. XCC2 checks this header and verity the size is supported for firmware updates, and returns code 413 when file size is too large. If the client uploads multiple files in a POST request, it returns code 400 with an error message indicating the format is not supported.

Multipart HTTP push update may be rejected with code 503 when Http Push update is in progress, and vice versa.

Status code

HTTP Status CodeError Message ID
202Accepted
400BadRequest, ActionParamMissing, ActionParamTypeError, ActionParamFormatError
413RequestEntityTooLarge
500InternalError
503ServiceUnavailable

Example

The following example with curl commands is the multipart HTTP push update procedure for UEFI/ BMC (Backup).

  1. Update HttpPushUriTargetsBusy to true.

    Client should first check HttpPushUriTargetsBusy property. When the value is false, change HttpPushUriTargetsBusy property to True, in order to claim the service is occupied for firmware update. Other clients should not update firmware on this server to avoid interference.

    The PATCH body is:

    {
    "HttpPushUriTargetsBusy" : true
    }

  2. If client intends to update BMC (Backup), there is an extra step here to provide HttpPushUriTargets.

    Skip this step if it is not to update BMC (Backup) firmware.

    The PATCH body is:

       "HttpPushUriTargets" : [
    "/redfish/v1/UpdateService/FirmwareInventory/BMC-Backup"
    ]

  3. Push the firmware image to the URL in MultipartHttpPushUri property.

    Sample curl command is below for multipart HTTP push update request for BMC (Backup).

    curl -s -k -u USERID:PASSW0RD -F 'UpdateParameters={ "Targets":[  ],"@Redfish.OperationApplyTime":"OnStartUpdateRequest"};type=application/json' -F 'UpdateFile=@ lnvgy_fw_xcc_usx319b-0.99_anyos_comp.uxz ;type=application/octet-stream' https://192.168.1.216:443/mfwupdate

    The following sample JSON response is returned.

    {
    "@odata.type": "#Task.v1_5_1.Task",
    "@odata.id": "/redfish/v1/TaskService/Tasks/f9c172dc-8d25-41da-8ad1-b59b5e144209",
    "TaskMonitor": "/redfish/v1/TaskService/570dfa36-f60b-4dda-b9db-4435f90c3e20",
    "Messages": [],
    "Description": "This resource represents a task for a Redfish implementation.",
    "StartTime": "2023-01-04T07:48:51+00:00",
    "@odata.etag": "\"1672818531928\"",
    "PercentComplete": 0,
    "HidePayload": true,
    "@odata.context": "/redfish/v1/$metadata#Task.Task",
    "TaskState": "New",
    "Id": "f9c172dc-8d25-41da-8ad1-b59b5e144209",
    "Name": "Task f9c172dc-8d25-41da-8ad1-b59b5e144209"
    }

    In the response body, a new created task resource is included. And a task monitor resource is referenced in TaskMonitor property.

  4. The supported values of property "@ Redfish. OperationApplyTime" are one of "Immediate", "OnReset" and "OnStartUpdateRequest". If request property “@Redfish.OperationApplyTime" is “OnStartUpdateRequest”, client needs to perform StartUpdate action to make firmware update flow proceed.

    Skip this step if “@Redfish.OperationApplyTime" is not OnStartUpdateRequest.

    The POST URL is: /redfish/v1/UpdateService/Actions/UpdateService.StartUpdate

    The POST body is:

    {}
  5. Client needs to periodically check the URI of task for updating progress.

    In the following are sample JSON responses for continuously checking a task resource. (The task Id is f9c172dc-8d25-41da-8ad1-b59b5e144209 )

    Task overall progress 100%. And task state is completed.

    {
    "@odata.type": "#Task.v1_5_1.Task",
    "@odata.id": "/redfish/v1/TaskService/Tasks/f9c172dc-8d25-41da-8ad1-b59b5e144209",
    "EndTime": "2023-01-04T07:51:14+00:00",
    "TaskMonitor": "/redfish/v1/TaskService/570dfa36-f60b-4dda-b9db-4435f90c3e20",
    "Messages": [
    {
    "@odata.type": "#Message.v1_1_2.Message",
    "MessageId": "Update.1.0.OperationTransitionedToJob",
    "MessageSeverity": "OK",
    "Resolution": "Follow the referenced job and monitor the job for further updates.",
    "Message": "The update operation has transitioned to the job at URI '/redfish/v1/JobService/Jobs/JobR000004-Update'.",
    "MessageArgs": [
    "/redfish/v1/JobService/Jobs/JobR000004-Update"
    ]
    }
    ],
    "Description": "This resource represents a task for a Redfish implementation.",
    "@odata.etag": "\"1672818674540\"",
    "StartTime": "2023-01-04T07:48:51+00:00",
    "PercentComplete": 100,
    "TaskStatus": "OK",
    "HidePayload": true,
    "@odata.context": "/redfish/v1/$metadata#Task.Task",
    "Name": "Task f9c172dc-8d25-41da-8ad1-b59b5e144209",
    "Id": "f9c172dc-8d25-41da-8ad1-b59b5e144209",
    "TaskState": "Completed"
    }

    In the response body, a new created Job resource is included.

  6. Client needs to check the job until its state changed to complete or exception. And handle exceptions according to job messages returned.

    A sample job response with complete is below.

    {
    "@odata.type": "#Job.v1_0_7.Job",
    "@odata.id": "/redfish/v1/JobService/Jobs/JobR000004-Update",
    "EndTime": "2023-01-04T07:51:32+00:00",
    "Messages": [
    {
    "@odata.type": "#Message.v1_1_2.Message",
    "MessageId": "Update.1.0.UpdateSuccessful",
    "MessageSeverity": "OK",
    "Resolution": "None.",
    "Message": "Device '/redfish/v1/UpdateService/FirmwareInventory/BMC-Primary' successfully updated with image 'lnvgy_fw_xcc_usx319b-0.99_anyos_comp.uxz'.",
    "MessageArgs": [
    "/redfish/v1/UpdateService/FirmwareInventory/BMC-Primary",
    "lnvgy_fw_xcc_usx319b-0.99_anyos_comp.uxz"
    ]
    }
    ],
    "Description": "This resource is used to represent a job for a Redfish implementation.",
    "StepOrder": [
    "BMC-Primary"
    ],
    "StartTime": "2023-01-04T07:51:14+00:00",
    "Steps": {
    "@odata.id": "/redfish/v1/JobService/Jobs/JobR000004-Update/Steps"
    },
    "@odata.etag": "\"1672818692407\"",
    "PercentComplete": 100,
    "@odata.context": "/redfish/v1/$metadata#Job.Job",
    "JobState": "Completed",
    "Id": "JobR000004-Update",
    "Name": "JobR000004-Update"
    }

  7. If the target is BMC (Backup), there is an extra step here to clear HttpPushUriTargets.

    Skip this step if it is not BMC (Backup) firmware updated.

    The PATCH body is:

    {
    "HttpPushUriTargets" : [ ]
    }

  8. Update HttpPushUriTargetsBusy to false.

    When the firmware update procedure is completed, change HttpPushUriTargetsBusy property to false, in order to release the service to other clients for firmware update.

    The PATCH body is:

    {
    "HttpPushUriTargetsBusy" : false
    }