HP Insight Control Server Provisioning 7.3 Update 1 Administrator Guide

DescriptionREST component
Content-Type: multipart/form-dataHTTP Headers:
auth: <user-authorization-token>
where you supply <user-authorization-token>
<full-path-of-exported-file>Request Parameter
where you supply the full path to the file you exported.
Request Body:
Text showing output of import content.Response Body:
Invoke cURL as follows:
cURL command on Linux:
curl -i -k -X POST https://<appliance-hostname-or-address>/osd-services/rest/os-deployment-settings/importContent
-H "Content-Type: multipart/form-data" -H "auth: <user-authorization-token>"
-F file=@<full-path-of-exported-file>
cURL command on windows (using Cygwin):
curl -i k -3 -X POST
https://<appliance-hostname-or-address>/osd-services/rest/os-deployment-settings/importContent
-H "Content-Type: multipart/form-data" -H "auth: <user-authorization-token>" -F
file=@<full-path-of-exported-file>
The output of curl call is the output of command line tool run to import content. It is in text format.
On terminal window it shows up as an unformatted long string. To see the formatted output, copy
the output of rest call to a variable and echo the variable with option e.
Output=`curl -i -k -X POST
https://<appliance-hostname-or-address>/osd-services/rest/os-deployment-settings/importContent
-H "Content-Type: multipart/form-data" -H "auth: <user-authorization-token>" -F
file=@<full-path-of-exported-file>`
echo e output
REST call to list jobs in job history
You can use REST calls to extract all the job and log data retained on the appliance (job history).
Programmatically, you will need to make three REST calls to the IC server provisioning appliance.
The first call is used to obtain an authentication token or session ID. Then, using this session ID,
you make the REST call to list the jobs. Finally, the third call logs out of the session.
See “REST call to create the user session and get the authentication token” (page 99) for details
on making the first REST call to create the user session.
The second REST call is to list the jobs. In this REST call you will need to provide the
<user-authentication-token> you received from the login REST call.
Finally, see “REST call to logout of the user session (page 100) for details on making the third REST
call to logout of the user session.
DescriptionREST component
https://<appliance-hostname-or-address>/rest/os-deployment-jobsURL:
where you supply <appliance-hostname-or-address>
GETMessage Type:
accept: application/jsonHTTP Headers:
accept-language: en-us (optional)
auth: <user-authorization-token>
where you supply <user-authorization-token>
REST call to list jobs in job history 109