POST /files/updateRepositories/firmware/import/validation

Use this POST method to check the file size before importing a firmware update or UpdateXPress System Pack (UXSP) in to the repository to ensure that there is enough file space to store them and reserve part of file space for the import operation.

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/validation

Query parameters

None

Request body

Attributes Required / Optional Type Description
file Required Array  
  index Optional String Array index
  name Required String File name
  size Required Long File size
  type Optional String File type. This can be one of the following values.
  • text
  • binary

Request example

{
    "files": [{
        "index": 0,
        "name": "filename.txt",
        "size": 8192,
        "type": "text/plain"​​
    }]
}​

Response codes

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

Response body

Attributes Type Description
current String  
downloadednum Integer  
downloadedsize Integer  
progress Integer Job progress, where 100 is complete, and less than 100 is in progress
state String This can be one of the following values.
  • success. The request completed successfully.
  • failure. The request failed. A descriptive error message is returned.
total Integer  
totalsize Integer  
updates Array  
errorMsg Array Information about one or more messages
  result String 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.
  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": 0,
    ​"updates": [],
    "errorMsg": {
        "result": "informational",
        "messages": [{
            "id": "FQXHMUP2500I",
            "text": "Repository operation completed successfully."
        }]
    },
}