PUT /updateRepositories/firmware

Use the PUT method to modify information about firmware updates in the updates repository.

Note: This API requires Lenovo XClarity Administrator v2.3.0 or later.

Authentication

Authentication with user name and password is required.

Request URL

PUT https://<management_server_IP>/updateRepositories/firmware

Query parameters

Parameters Required / Optional Description
action=<action> Required Action to take. This can be one of the following values.
  • read. Reloads the repository files. The clears the update information in cache and reads the update file again from the repository.
  • refresh. Retrieves information about firmware updates from the Lenovo XClarity Support website, and stores the information to the updates repository. You must specify the mt, os, and type request attributes.
  • acquire. Downloads the specified firmware updates from Lenovo XClarity Support website, and stores the updates to the updates repository. You must specify the fixids, mt, and type request attributes.
  • delete. Deletes the specified firmware updates from the updates repository. You must specify the fixids request attribute.
  • export. Compresses the specified firmware updates from the updates repository into a ZIP file, and downloads the ZIP file to your local system.

A job is created to export files into the .zip file. Use the GET /updateRepositories/firmware/status?taskid=<task_id> method (where <task_id> is the subtask ID) to retrieve the subtask status and file name, or use GET /tasks/<job_id> (where <job_id> is the job ID) to retrieve the overall job status. If a job was not successfully started, refer to the response code and response body for details.

filetypes=<type> Optional When action=delete is specified, this query parameter is used. You can specify one of the following values.
  • all. Deletes selected update-package files (payload, change history, readme, and metadata files)

  • payloads. Deletes only the selected payload (image) files

with=<scope> Optional Scope of the action. This can be one of the following values.
  • all.
    • When action=refresh query parameter is specified, this query parameter returns information about all versions of all firmware updates that are available for all supported devices.

    • When action=export query parameter is specified, it compresses all firmware updates into a .zip file

  • latest.
    • When action=refresh query parameter is specified, this query parameter returns information about the most current version of all firmware updates for all supported devices.

    • When action=export query parameter is specified, it compresses latest firmware based on list of machine types into ZIP file. You must specify the mt request attribute

  • payloads.
    • When action=acquire query parameter is specified, this query parameter returns information about specific firmware updates.

    • When action=export query parameter is specified , it compresses firmware updates based on list of fixids into ZIP file. You must specify the fixids request attribute

The following example downloads information about the latest version of each firmware update.
GET https://192.0.2.0/updateRepositories/firmware?action=refresh&with=latest
The following example downloads the specified firmware-update files.
GET https://192.0.2.0/updateRepositories/firmware?action=acquire&with=payload
The following example deletes the payload (image files) from the updates repository for the specified firmware update.
GET https://192.0.2.0/updateRepositories/firmware?action=delete&filetypes=payloads
The following example deletes the payload (image), change history, readme, and metadata files from the updates repository for the specified firmware update.
GET https://192.0.2.0/updateRepositories/firmware?action=delete&filetypes=all

Request body

Attributes Required / Optional Type Description
fixids Required if action is "acquire", "export", or "delete" Array of strings List of firmware-update IDs to be downloaded or deleted
mt Required if action is "refresh" or "acquire" Array of strings List of machine types for which firmware updates are to be refreshed or downloaded.
os Required if action is "refresh" String Operating system to be refreshed. For firmware updates, this value must be empty (for example, "os":"").
type Required if action is "refresh" or "acquire" String If action=refresh, this value must be "catalog."

If action=acquire, set this value to "latest."

Request example

The following examples retrieves information about the latest available firmware updates for Flex System x440 Type 7167 compute nodes when ?action=refresh&with=latest is specified.
{
   "mt": ["7167"],
   "os": "",
   "type": "catalog"
}
The following examples downloads the latest firmware updates for specific fixes when ?action=acquire&with=payloads is specified.
{
   "fixids": [
      "brcd_fw_bcsw_nos5.0.1_anyos_noarch",
      "brcd_fw_cna_3.2.4.0_linux_32-64",
      "brcd_fw_cna_3.2.3.0_linux_32-64",
      "lenovo_fw_dsa_dsyte2f-9.61_anyos_32-64"
   ],
   "mt": ["0000"],
   "type": "latest"
}
The following examples deletes a specific firmware-update package when ?action=delete is specified.
{
   "fixids":["nvgy_utl_lxce_ux01h_2.3.0_windows_i386"]
}

Response codes

Code Description
200 OK
400 Bad request
403 Forbidden
409 Conflict
500 Internal server error

Response body

A subset of the following attributes are returned, depending on the specified query parameters.

Attributes Type Description
jobid String Job ID
taskid String Subtask ID
tasktype String Action that was performed. This can be one of the following values.
  • EXPORTREPOSITORY. The type of export action.

  • ACQUIRECATALOG. The type of refresh action.

  • ACQUIREPAYLOAD. The type of acquire action.

  • DELETEPAYLOAD. The type of delete action.

status String This can be one of the following values when the action query parameter is "export.".
  • success. The request completed successfully. Started to compress repository successfully.

  • error. The request failed. A descriptive error message is returned.

result String This can be one of the following values when the action query parameter is "read," "refresh," "acquire."
  • success. The request completed successfully.

  • failed. The request failed. A descriptive error message is returned.

errorMsg Array of objects Information about one or more messages
  messages Array of objects Information about a specific message
    id String Message identifier of a returned message
    text String Message identifier of a returned message
  result String The results of the request. This can be one of the following values.
  • success. The request completed successfully.

  • failure. The request failed. A descriptive error message is returned.

  • informational

Response example

The following example returns the job and task ID of read action when ?action=read is specified.
{
   "jobid": "515",
   "taskid": "14",
   "result": "success",
   "errorMsg": {
      "result": "informational",
      "messages": [{
         "id": "FQXHMUP2508I",
         "text": "The repository operation has started successfully."
      }]
   }
}
The following example returns the task of export action and job ID when ?action=export is specified.
{
   "tasktype": "EXPORTREPOSITORY",
   "taskid": "11",
   "status": "success",
   "errorMsg": {
      "result": "informational",
      "messages": [{
         "id": "FQXHMUP2500I",
         "text": "Repository operation completed successfully."
      }]
   }
}