HP Insight Control Server Provisioning 7.2 Administrator Guide

you can also accomplish this programmatically. This alternate approach is valuable if the appliance
user interface is unresponsive and you need to enable HP Support access for diagnosing a problem.
Programmatically, one needs to make three REST calls to the Insight Control server provisioning
appliance. The first call sets up a user session, while the second call enables or disables support
access to the appliance. Finally, the third call logs out of the session
See “REST call to create the user session and get the authentication token (page 34) for details
on making the first REST call.
The second REST call is to either enable or disable support access to the appliance. In this REST
call you will need to provide the <user-authentication-token> you received from the first
login REST call, and you will need to pass either true or false to indicate whether you want
to enable services access.
Finally, see “REST call to logout of the user session (page 35) for details on making the third REST
call to logout of the user session.
A list of the components of the REST call is shown below:
DescriptionREST component
https://<appliance-hostname-or-address>/rest/appliance/settings/enableServiceAccess
where you supply <appliance-hostname-or-address>
URL:
PUTMessage Type:
accept: application/jsonHTTP Headers:
content-type: application/json
accept-language: en-us (optional)
auth: <user-authorization-token>
where you supply <user-authorization-token>
<true/false>
specifying whether you want support access enabled
Request Body:
“true
if services access was successfully enabled or disabled
Response Body:
You invoke cURL as follows and will see the associated response shown below:
cURL command on Linux:
curl -i -k -H "accept: application/json" -H "content-type: application/json"
-H "accept-language:en-us"
-H "auth: <user-authorization-token>" -X PUT
https://<appliance-hostname-or-address>/rest/appliance/settings/enableServiceAccess
-d "true/false"
cURL command on Windows:
curl -i -k -H "accept: application/json" -H "content-type: application/json"
-H "accept-language:en-us"
-H "auth: <user-authorization-token>" -X PUT
https://<appliance-hostname-or-address>/rest/appliance/settings/enableServiceAccess
-d \"<true/false>\
Response on success:
HTTP/1.1 200 OK
Date: Fri, 08 Feb 2013 20:46:13 GMT
Content-Type: application/json
Via: 1.1 cic.dns.hp
cache-control: no-cache
Transfer-Encoding: chunked
36 Advanced topics