HCP System Management Help
Here’s a sample HTTP HEAD request that checks the existence of an object named Q1_2012.ppt in the quarterly_rpts directory.
Request with curl command line
curl -iI -k -H "Authorization: HCP bXl1c2Vy:3f3c6784e97531774380db177774ac8d"
"https://finance.europe.hcp.example.com/rest/quarterly_rpts/Q1_2012.ppt"
Request in Python using PycURL
import pycurl
import StringIO
cin = StringIO.StringIO()
curl = pycurl.Curl()
curl.setopt(pycurl.HTTPHEADER, ["Authorization: HCP
bXl1c2Vy:3f3c6784e97531774380db177774ac8d"])
curl.setopt(pycurl.URL, "https://finance.europe.hcp.example.com/ \
rest/quarterly_rpts/Q1_2012.ppt")
curl.setopt(pycurl.SSL_VERIFYPEER, 0)
curl.setopt(pycurl.SSL_VERIFYHOST, 0)
curl.setopt(pycurl.HEADER, 1)
curl.setopt(pycurl.NOBODY, 1)
curl.setopt(pycurl.WRITEFUNCTION, cin.write)
curl.perform()
print curl.getinfo(pycurl.RESPONSE_CODE)
print cin.getvalue()
curl.close()
Request headers
HEAD /rest/quarterly_rpts/Q1_2012.ppt HTTP/1.1
Host: finance.europe.hcp.example.com
Authorization: HCP bXl1c2Vy:3f3c6784e97531774380db177774ac8d
Response headers
HTTP/1.1 200 OK
X-HCP-CurrentStorageNode: 172.20.27.21
X-HCP-Time: 1336490468
X-HCP-SoftwareVersion: 7.0.0.16
ETag: "8d604138ffb0f308a8552a3752e5a1be"
Content-Type: application/vnd.ms-powerpoint
Content-Length: 679116
X-HCP-ServicedBySystem: hcp.example.com
X-HCP-Type: object
X-HCP-Size: 679116
X-HCP-Hash: SHA-256 36728BA190BC4C377FE4C1A57AEF9B6AFDA98720422960...
X-HCP-VersionId: 80111794065921
X-HCP-IngestTime: 1334340948
X-HCP-RetentionClass: (SEC17a, A+7y)
X-HCP-RetentionString: 2018-04-19T09:51:47-0400
X-HCP-Retention: 1524131507
X-HCP-IngestProtocol: HTTP
X-HCP-RetentionHold: false
X-HCP-Shred: false
X-HCP-DPL: 2
X-HCP-Index: true
X-HCP-Custom-Metadata: false
X-HCP-ACL: false
X-HCP-Owner: lgreen
X-HCP-Domain:
X-HCP-UID:
X-HCP-GID:
X-HCP-Replicated: false
X-HCP-ReplicationCollision: false
X-HCP-ChangeTimeMilliseconds: 1335347627362.00
X-HCP-ChangeTimeString: 2012-04-25T05:53:47-0400
Last-Modified: Wed, 25 Apr 2012 09:53:47 GMT
Trademarks and Legal Disclaimer
© 2017 Hitachi Vantara Corporation. All rights reserved.