POST /files/updateRepositories/firmware/import

Use this POST method to ​import a firmware update or UpdateXPress System Pack (UXSP) to 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

POST https://<management_server_IP>​/files/updateRepositories/firmware/import

Query parameters

None

Request body

Use the "multipart/form-data" media type to import the update package. Use the attributes in the following table as the multipart name in the body. For more information about the multipart/form-data media type, see Returning Values from Forms: multipart/form-data webpage.

Request example

HTTP Header
Content-Type: multipart/form-data; boundary=AaB03x
Request body
--AaB03x
   Content-Disposition: form-data; name="uploadedfiles[]"; filename="fwfiles2018103122275762.zip"
   Content-Type: application/x-zip-compressed

--AaB03x
   Content-Disposition: form-data; name="uploadedfiles[]"; filename="fwfiles2018102523335745.zip"
   Content-Type: application/x-zip-compressed

--AaB03x--

Response codes

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

Response body

Attributes Type Description
current String  
downloadedsize Integer  
downloadednum Integer  
progress Integer Job progress, where 100 is complete, and less than 100 is in progress
state String State of the import process. This can be one of the following values.
  • success. The request completed successfully.
  • error. The request failed. A descriptive error message is returned.
total Integer  
totalsize Integer  
updates Array  
popMsg Array Indicates that some files are not applicable for virtual-appliance updates repository
  result String Result of the request. This can be one of the following values.
  • warning
  messages Object Information about one or more messages
    id String Message identifier of a returned message
    explanation String  
    recovery Array  
      text String  
    text String Message text that is associated with the message identifier
errorMsg Array Information about one or more messages
  result String Result of the request. This can be one of the following values.
  • informational. The request completed successfully.
  messages Array Information about one or more messages
    id String Message identifier of a returned message
    text String Message text that is associated with the message identifier

Response example

{
   "current": "",
   "downloadednum": 0
   "downloadedsize": 0,
   "progress": 0,
   "state": "success",
   "total": 0,
   "totalsize": 1,
   "updates": [],
   "popMsg": {
      "result": "warning",
      "messages": [{
         "id": "FQXHMUP2512F",
         "text": "Import complete",
         "explanation": "The following files are not applicable to the updates 
                         process; they have been discarded: newFile.txt.",
         "recovery": {
            "text": "Discarded packages are not referenced by any .xml file 
                     currently in Firmware Updates Repository. Ensure your 
                     uploaded files include the correct .xml file."
         }
      }]
   },
   "errorMsg": {
      "result": "informational",
      "messages": [{
         "id": "FQXHMUP2500I",
         "text": "Repository operation completed successfully."
      }]
   },
}