HP Insight Control Server Provisioning 7.3 Update 1 Administrator Guide

accomplish this programmatically. This alternate approach is valuable if the appliance user interface
is unresponsive and you need to retrieve a support dump for diagnosing a problem.
Programmatically, one needs to make two REST calls to the Insight Control server provisioning
appliance. The first call creates the support dump and leaves it on the appliance, while the second
call downloads it. Remember also that you need to first set up by making a REST call to log in and
get a token. See “REST call to create the user session and get the authentication token” (page 99)
for details on making the first REST call. When finished, you will need to make a REST call to log
out. See “REST call to logout of the user session” (page 100)
In this discussion we use the open-source cURL utility to make the REST calls. The cURL open-source
project is located at: http://curl.haxx.se/. You can invoke cURL from a command line on either
Linux or Windows.
A list of the components of the REST call to create the support dump is shown in the following table:
DescriptionREST component
https://<appliance-hostname-or-address>/rest/appliance/support-dumps
where you supply <appliance-hostname-or-address>
URL:
POSTMessage Type:
accept: application/jsonHTTP Headers:
content-type: application/json
{"errorCode": "<support-dump-error>”}
where <support-dump-error> is used when generating the support dump file name.
Request Body:
{"type":"DumpDataInfoDto", "dumpFileSize":8087, "uri":
"<support-dump-filename>", "category":null, "eTag":null,
"created":"Tue Jun 19 03:11:25 MDT 2012", "modified":null }
Response Body:
You will use <support-dump-filename> in the subsequent REST call to download the support
dump.
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"
-X POST https://<appliance-hostname-or-address>/rest/appliance/support-dumps
-d `{errorCode: <support-dump-error>}
cURL command on Windows:
curl -i -k -H "accept: application/json" -H "content-type: application/json" -H "accept-language:en-us"
-X POST https://<appliance-hostname-or-address>/rest/appliance/support-dumps
-d {\errorCode\: \<support-dump-error>\}
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
If the request fails, you will be returned an error diagnostic. Common errors are HTTP error 404
not found if the URL is not correct.
104 Advanced topics