POST /files/stgupdates/repository/import/validate/SELF
Use this method to verify that Lenovo XClarity Administrator has sufficient disk space to import management-server update files.
If you specify this attribute, this method starts a job that runs in the background to perform the operation. The response body includes the ID of the job that was created to perform this request. Use POST /files/stgupdates/repository/import/SELF?jobid={job_id} to start the import job.. If a job was not successfully started, refer to the response code and response body for details.
Authentication
Authentication with username and password is required.
Request URL
POST https://{management_server_IP}/files/stgupdates/repository/import/validate/SELF
Query parameters
None
Request body
Attributes | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
files | Required | Array of objects | Information about each file to import | ||
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 updates.
{
"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 | |||
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,
"progress": 0,
"state": "success",
"total": 0,
"totalsize": 0,
"updates": [],
"errorMsg": {
"result": "informational",
"messages": [{
"id": "FQXHMUP2500I",
"text": "Repository operation completed successfully."
}]
}
}
Give documentation feedback