Here’s a sample GET request that retrieves the log download status. The request is made using a system-level user account that includes the administrator role.
Request with cURL command line
curl -k -i -H "Authorization: HCP YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382" https://admin.hcp.example.com:9090/mapi/logs
Request in Python using PycURL
import pycurl
curl = pycurl.Curl()
curl.setopt(pycurl.VERBOSE, True)
curl.setopt(pycurl.CUSTOMREQUEST, "GET")
curl.setopt(pycurl.HTTPHEADER, ["Accept: application/xml", \
"Authorization: HCP \
YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382"])
curl.setopt(pycurl.URL, "https://admin.hcp.example.com:9090/mapi/logs?prettyprint")
curl.setopt(pycurl.SSL_VERIFYPEER, False)
curl.setopt(pycurl.SSL_VERIFYHOST, False)
curl.perform()
curl.close()
Request headers
GET /mapi/logs HTTP/1.1
User-Agent: curl/7.27.0
Host: admin.hcp.example.com:9090
Accept: */*
Authorization: HCP YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382
Response headers
HTTP/1.1 200 OK
Content-Type: application/xml
X-HCP-SoftwareVersion: 7.2.0.589
Content-Length: 282
Response body in XML
<?xml version=1.0" encoding="UTF-8" standalone="yes"?>
<logDownloadStatus>
<readyForStreaming>true</readyForStreaming>
<streamingInProgress>false</streamingInProgress>
<started>true</started>
<error>false</error>
<content>SERVICE</content>
</logDownloadStatus>
© 2015 Hitachi Data Systems Corporation. All rights reserved.