HP Insight Control Server Provisioning 7.3 Update 1 Administrator Guide
REST call to export customer content
Currently there is no GUI available to export OS Build Plans. You can use REST calls to the IC
server provisioning appliance to export OS Build Plans. You can only export/import Build Plans
that you created. You can't export the HP-provided Build Plans. Exported OS Build Plans are
presented as a compressed package in .zip format. The archive will contain only customer’s
content.
Before making a REST call to export the content, you will have to make a REST call to obtain an
authentication token. See “REST call to create the user session and get the authentication token”
(page 99) for information on how to get an authentication token. When finished, you will need to
make a REST call to log out. See “REST call to logout of the user session” (page 100).
NOTE: You can export Scripts and Configuration Files, as well as Build Plans.
DescriptionREST component
https://
<appliance-hostname-or-address>/osd-services/rest/os-deployment-settings/exportContent
URL
where you supply <appliance-hostname-or-address>
GETMessage Type:
accept: application/zipHTTP Headers:
content-type: application/zip
auth: <user-authorization-token>
where you supply <user-authorization-token>
cURL command on Linux or Windows:
curl -i -k -X GET -H "auth: <user-authorization-token>" -H "content-type:application/zip"
-H "accept:application/zip"
https://<appliance-hostname-or-address>/osd-services/rest/os-deployment-settings/exportContent
-o "osbp_export.zip"
On success, you should see an archived .zip file in the directory where you invoked cURL. Once
the archived files are extracted, you should see the content in the ‘blob’ directory. The .zip files
are intended to be used for import into another appliance “as is” (that is, with no changes).
REST call to import customer content
The customer content exported from one appliance as a .zip file can be imported on another
appliance. Appliance versions of both the appliances should be same for import to work correctly.
If the versions don’t match an error message will be returned. The import includes build plans,
scripts, packages, configuration files in the provided zip file. If an object with the same name exists
on the appliance then it will be overwritten by the object in the zip.
Before making a REST call to import the content, you will have to make a REST call to obtain an
authentication token. See “REST call to create the user session and get the authentication token”
(page 99) for information on how to get authentication token. When finished, you will need to
make a REST call to log out. See “REST call to logout of the user session” (page 100).
DescriptionREST component
https://
<appliance-hostname-or-address>/osd-services/rest/os-deployment-settings/importContent
URL
where you supply <appliance-hostname-or-address>
POSTMessage Type:
108 Advanced topics