Skip to main content

POST /files/updateRepositories/firmware/import/validate

Use this 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.

Authentication

Authentication with username and password is required.

Request URL

POST https://{management_server_IP}/files/updateRepositories/firmware/import/validate

Query parameters

None

Request body

AttributesRequired / OptionalTypeDescription
fileRequiredArray 
 indexOptionalStringArray index
 nameRequiredStringFile name
 sizeRequiredLongFile size
 typeOptionalStringFile type. This can be one of the following values.
  • text
  • binary
The following example check the file size before importing.
{
"files": [{
"index": 0,
"name": "filename.txt",
"size": 8192,
"type": "text/plain"​​
}]
}

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.
403ForbiddenThe orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request.
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

AttributesTypeDescription
currentString 
downloadednumInteger 
downloadedsizeInteger 
jobidIntegerJob ID
progressIntegerJob progress, where 100 is complete, and less than 100 is in progress
stateStringThis can be one of the following values.
  • success. The request completed successfully.
  • failure. The request failed. A descriptive error message is returned.
totalInteger 
totalsizeInteger 
updatesArray 
errorMsgArrayInformation about one or more messages
 resultStringResults 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.
 messagesArrayInformation about one or more messages
  idStringMessage identifier of a returned message
  textStringMessage text that is associated with the message identifier
The following example is returned if the request is successful.
{
"current": "",
"downloadednum": 0,
"downloadedsize": 0,
"jobid": 96,
"progress": 0,
"state": "success",
"total": 0,
"totalsize": 0,
"updates": [],
"errorMsg": {
"result": "informational",
"messages": [{
"id": "FQXHMUP2500I",
"text": "Repository operation completed successfully."
}]
}
}