Skip to main content

PUT /updateRepositories/firmware

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

Authentication

Authentication with username and password is required.

Request URL

PUT https://{management_server_IP}/updateRepositories/firmware

Query parameters

ParametersRequired / OptionalDescription
action={action}RequiredAction to take. This can be one of the following values.
  • 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.
  • cleanup. Delete all firmware update package that are not in use.
    Important
    You must specify the cleanUpIf request attribute.
  • 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.
  • 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.
  • refreshThenAcquire. Retrieves information about latest available firmware updates from the Lenovo XClarity Support website, stores the information to the updates repository, and downloads the updates that are not already downloaded.
    Important
    You must specify the mt and os request attributes.

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}OptionalWhen 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}OptionalScope of the action. This can be one of the following values.
  • all. (default)
    • 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= refreshThenAcquire query parameter is specified, this query parameter retrieves information about all versions of all firmware updates for the specified machine types, then downloads the firmware updates that are not already downloaded

    • 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= refreshThenAcquire query parameter is specified, this query parameter retrieves information about the most current version of all firmware updates for the specified machine types, then downloads the updates that are not already downloaded.

    • 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 fix IDs into ZIP file. You must specify the fixids request attribute.

The following example retrieves information about the latest available firmware updates and downloads the updates that are not already downloaded.
PUT https://192.0.2.0/updateRepositories/firmware?action=refreshThenAcquire&with=latest
The following example downloads information about the latest version of each firmware update.
PUT https://192.0.2.0/updateRepositories/firmware?action=refresh&with=latest
The following example downloads the specified firmware-update files.
PUT 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.
PUT 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.
PUT https://192.0.2.0/updateRepositories/firmware?action=delete&filetypes=all

Request body

AttributesRequired / OptionalTypeDescription
cleanUpIfRequired if action is cleanupStringIndicates which files to deleted. This can be one of the following values.
  • notInUseNotLatest, Deletes all files that are not in use, excluding the latest version.
  • notInUse. Deletes all files that are not in use, including the latest version.
fixidsRequired if action is acquire, export, or deleteArray of stringsList of firmware-update IDs to be downloaded or deleted
mtRequired if action is refresh, refreshThenAcquire, or acquireArray of stringsList of machine types for which firmware updates are to be refreshed or downloaded.
osRequired if action is refresh or refresh,StringOperating system to be refreshed. For firmware updates, this value must be empty (for example, "os":"").
typeRequired if action is refresh or acquireStringIf action=refresh, this value must be catalog.

If action=acquire, set this value to latest.

The following example retrieves information about and downloads the latest available firmware updates that are applicable to ThinkSystem SR530 servers when ?action=refreshThenAcquire&with=latest is specified.
{
"mt": ["7X07,7X08"],
"os": "",
}
The following examples retrieves information about the latest available firmware updates for ThinkSystem SR530 servers when ?action=refresh&with=latest is specified.
{
"mt": ["7X07,7X08"],
"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"]
}
The following examples deletes all unused firmware-update packages, including the latest version, when ?action=cleaup is specified.
{
"cleanUpIf": "notInUse"
}

Response codes

CodeDescriptionComments
200OKThe request completed successfully.
400Bad RequestA query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body.
409ConflictThere is a conflict with the current state of the resource. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

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

AttributesTypeDescription
jobidStringJob ID
taskidStringSubtask ID
tasktypeStringAction that was performed. This can be one of the following values.
  • ACQUIRECATALOG. The type of refresh action.

  • ACQUIREPAYLOAD. The type of acquire action.

  • DELETEPAYLOAD. The type of delete action.

  • EXPORTREPOSITORY. The type of export action.

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

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

errorMsgArray of objectsInformation about one or more messages
 messagesArray of objectsInformation about a specific message
  idStringMessage identifier of a returned message
  textStringMessage identifier of a returned message
 resultStringThe 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

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."
}]
}
}