HP Insight Control Server Provisioning 7.3 Update 1 Administrator Guide

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 adds a server via iLO. In this REST call you will need to provide the
<user-authentication-token> you received from the login REST call, and you will need to
pass the IP address of the iLO as well as the iLO administrator user/password.
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.
There are two REST calls that can be used to add a server via its iLO: one is used to add the server
and boot it into a maintenance mode, the other is used to add the server and not boot into a
maintenance mode. If optional request parameter “addstyle” is specified, the server will be added
without putting the server into a maintenance mode. If this parameter is not present, the server will
be booted into a maintenance mode.
REST call to add a server via iLO and server will boot into a maintenance mode:
A list of the components of the REST call is shown in the following table:
DescriptionREST component
https://<appliance-hostname-or-address>/rest/os-deployment-ilos
where you supply <appliance-hostname-or-address>
URL:
POSTMessage Type:
accept: application/jsonHTTP Headers:
content-type: application/json
accept-language: en-us (optional)
auth: <user-authorization-token>
where you supply <user-authorization-token>
{"type":"OSDIlo","username":”<iLO-administrator-user>,"password":
"<iLO-administrator-password>","port":<port>,"ipAddress":"<iLO-IP-address>"}
Request Body:
Type is the resource name.
You supply the <iLO-administrator-user>, <iLO-administrator-password>,
the port to use in connecting to iLO and the IPv4 <iLO-IP-address>
{"uri":"/rest/os-deployment-jobs/JobID"}
will return URI with Job ID.
Response Body:
You can invoke cURL with the following associated responses:
cURL command on Linux:
curl -i -k -X POST -H "auth: <user-authorization-token>" -H "content-type:application/json"
-H "accept:application/json" -H "accept-language:en-us"
https://<appliance-hostname-or-address>/rest/os-deployment-ilos
-d {"type":"OSDIlo","username":"<iLO-administrator-user>,
password:<iLO-administrator-password>,
port:443,ipAddress:<iLO-IP-address>}
cURL command on Windows:
curl -i -k -X POST -H "auth: <user-authorization-token>" -H "content-type:application/json"
-H "accept:application/json" -H "accept-language:en-us"
https://<appliance-hostname-or-address>/rest/os-deployment-ilos
-d {\"type\":\"OSDIlo\",\"username\":\"<iLO-administrator-use>r\,
\password\:\<iLO-administrator-password>\,
\port\:443,\ipAddress\:\<iLO-IP-address>\}
Response on success:
HTTP/1.1 202 Accepted
Date: Wed, 20 Feb 2013 17:33:30 GMT
REST call to add a server via iLO 101