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
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.
|
The following example check the file size before importing.
{
"files": [{
"index": 0,
"name": "filename.txt",
"size": 8192,
"type": "text/plain"
}]
}
Response codes
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
400 | Bad Request | A 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. |
403 | Forbidden | The 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. |
409 | Conflict | There is a conflict with the current state of the resource. A descriptive error message is returned in the response body. |
500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response body
Attributes | Type | Description | ||
---|---|---|---|---|
current | String | |||
downloadednum | Integer | |||
downloadedsize | Integer | |||
jobid | Integer | Job ID | ||
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.
| ||
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.
| ||
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 |
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."
}]
}
}
Give documentation feedback