Skip to main content

POST /managementServer/updates

Use this method to manage management-server updates in the updates repository.

When the action=import query parameter is specified, this method creates a job that can be used to import a management-server update package into the updates repository. The method returns the job ID, which you can then use with the POST /files/managementServer/updates?action=import&jobid={job_id} method.

To import a management-server update package into the updates repository, follow these steps:

  1. Start a job to import the update using POST /managementServer/updates?action=import.

  2. Import the update using POST /files/managementServer/updates?action=import&jobid={job_id} method, where the job ID is the ID that was returned in step 1.

  3. Monitor the status of the import job using GET /tasks/{job_list}, where the job ID is the ID that was returned in step 1. You can also cancel the import job using this method.

Authentication

Authentication with username and password is required.

Request URL

POST https://{management_server_IP}/managementServer/updates

Query parameters

ParametersRequired / OptionalDescription
action={action}RequiredAction to take. This can be one of the following values.
  • acquire. Downloads the specified management-server update packages from the Lenovo XClarity Support website.

  • import. Creates a job to import one or more management-server updates.

  • refresh. Retrieves information (metadata) about the latest available management-server updates from the Lenovo XClarity Support website.

The following example downloads management-server update packages to the management-server updates repository
POST https://192.0.2.0/managementServer/updates?action=acquire
The following example import management-server updates from the local system.
POST https://192.0.2.0/managementServer/updates?action=import

Request body

AttributesRequired / OptionalTypeDescription
mtsRequired if action=refreshArray of stringsFor management-server updates, this is always “lxca.”
fixidRequired if action=acquireArray of stringsUUIDs of one or more update packages, separated by a comma. To obtain the update UUIDs, use the GET /chassis method.
sizeOptionalLongTotal size, in bytes, of the file to be imported
The following example downloads a management-server update package from the web when action=refresh.
{
"mts": ["lxca"],
}
The following example downloads multiple updates to the management server when action=acquire.
{
"fixids": ["lnvgy_sw_lxca_222-1.2.0_anyos_noarch,
lnvgy_sw_lxca_cmmswitchrepo1-1.2.0_anyos_noarch"]
}
The following example imports a 1234567-byte update package when action=import.
{
"size": 1234567
}

Response codes

CodeDescriptionComments
200OKThe request completed successfully.
401UnauthorizedThe user cannot be authenticated. Authentication has not been provided or has failed. 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.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

AttributesTypeDescription
jobidStringJob ID
resultStringResults of the request. This can be one of the following values.
  • success. The request completed successfully.
  • failed. The request failed. A descriptive error message was returned.
errorMsgObjectInformation about one or more messages
 messagesArray of objectsInformation about a message
  idStringMessage identifier of a returned message
  textStringMessage text associated with the message identifier
 resultStringResults of the request. This can be one of the following values.
  • informational

  • warning

The following example is returned if the request is successful.
{ 
"jobid": "5",
"result": "success",
"errorMsg": {
"messages": [{
"id": "FQXHMUP2508I",
"text": "The operation has started successfully."
}],
"result": "informational"
}
}