GET /osImages/{id}

Use this method to create a downloadable tar.gz file that contains a customized OS-image profile.

The tar.gz file that contains the following files:

You can use the GET /osImages/{file_name} method to download the tar.gz file that is created by this method.

This method starts a job that runs in the background to perform the operation. The job ID is returned using the jobID attribute in the response body. You can use GET /tasks/{job_list} to monitor the status and progress of the job. If a job was not successfully started, refer to the response code and response body for details.

Attention: A successful response indicates that the request was successfully transmitted and accepted by the management server. It does not indicate that the operation that is associated with the job was successful.
Note: This REST API requires Lenovo XClarity Administrator v1.3.0 or later.

Authentication

Authentication with user name and password is required.

Request URL

GET https://{management_server_IP}/osImages/{id}

where {id} is the ID of the customized OS image profile. To obtain the ID, use the GET /osImages method.

Query parameters

Parameters Required / Optional Description
path={path> Optional Full path on the remote file server where the operating-system image is to be downloaded
Note: This attribute is only applicable when serverId is specified.
serverId={id> Optional Profile ID for the remote file server. To obtain the profile ID, use the GET /osImages/remoteFileServers/{id} method
Note: When this query parameter is specified, the customized OS-image profile is exported to a remote file server. If it is not specified, it is exported to the local system.
The following example exports a customized Windows Server 2016 profile to a remote image server.
GET https://192.0.2.0 /osImages/win2016|win2016-x86_64-install-Standard_core?serverId=101
&path=%2F/some%2F/path%2F/to%2F/file

Request body

None

Response codes

Code Description Comments
200 OK The request completed successfully.
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.

For XClarity Administrator advanced functions, ensure that you have active licenses for each managed server that supports the advanced functions.

500 Internal Server Error An internal error occurred. A descriptive error message is returned in the response body.

Response body

Attributes Type Description
filename String Name of the tar.gz file that is generated by the export process. You can download this file from the management server after the job completes successfully.
jobID String Job identifier
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.

messages Array of strings Detailed information about errors that occurred during the exporting process
The following example is returned if the request is successful.
{
   "filename "2016121921921_Custom-2016-datacenter-profile.tar.gz",
   "jobID": "12",
   "result": "success"
   "messages": []
}