POST /managementServer/updates

Use the POST 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 user name and password is required.

Request URL

POST https://<management_server_IP>/managementServer/updates

Query parameters

Parameters Required / Optional Description
action=<action> Required Action 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

Attributes Required / Optional Type Description
mts Required if action=refresh Array of strings For management-server updates, this is always “lxca.”
fixid Required if action=acquire Array of strings UUIDs of one or more update packages, separated by a comma. To obtain the update UUIDs, use the GET /chassis method.
size Optional Long Total size, in bytes, of the file to be imported

Request example

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

Code Description
200 OK. The information was retrieve successfully.
401 Unauthorized. The user could not be authenticated.
403 Forbidden. The server could not authenticate this session.
500 Internal server error. An internal error occurred.

Response body

Attributes Type Description
jobid String Job ID
result String Results 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.
errorMsg Object Information about one or more messages
  messages Array of objects Information about a message
    id String Message identifier of a returned message
    text String Message text associated with the message identifier
  result String Results of the request. This can be one of the following values.
  • informational

  • warning

Response body

{ 
   "jobid": "5", 
   "result": "success", 
   "errorMsg": { 
      "messages": [{ 
         "id": "FQXHMUP2508I", 
         "text": "The operation has started successfully." 
      }],
      "result": "informational"
   } 
}