Skip to main content

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

AttributesRequired / OptionalTypeDescription
filesRequiredArray of objectsInformation about each file to import
 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 updates.
{
"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 
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,
"progress": 0,
"state": "success",
"total": 0,
"totalsize": 0,
"updates": [],
"errorMsg": {
"result": "informational",
"messages": [{
"id": "FQXHMUP2500I",
"text": "Repository operation completed successfully."
}]
}
}