HCP Tenant Management Help
Here’s a sample HTTP GET request that checks the existence of a range of object versions for an object named Q1_2012.ppt in the quarterly_rpts directory using ingest timestamps. The version ingest timestamp range for the object is @1493911519817–@1493911519820.
Request with curl command line
curl -i -k -H "Authorization: HCP bXl1c2Vy:3f3c6784e97531774380db177774ac8d"
"https://finance.europe.hcp.example.com/rest/quarterly_rpts/Q1_2012.ppt
?version=@1493911519817–@1493911519820" > 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?version=@1493911519817–@1493911519820")
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
GET /rest/quarterly_rpts/Q1_2012.ppt?version=@1493911519817–@1493911519820 HTTP/1.1
Host: finance.europe.hcp.example.com
Authorization: HCP bXl1c2Vy:3f3c6784e97531774380db177774ac8d
Response headers
HTTP/1.1 200 OK
Date: Wed, 03 Jun 2015 16:42:45 GMT
X-HCP-ServicedBySystem: hcp.example.com
X-HCP-Time: 1433349765
X-HCP-SoftwareVersion: 7.2.0.346
X-HCP-LastVersionId: 80232998058819
Content-Length: 678400
Response body
X-HCP-VersionId: 80232998058817
X-HCP-Operation: CREATE
X-HCP-IngestTimeMilliseconds:
X-HCP-Size: 9
The contents of the requested version of the object.
X-HCP-VersionId: 80232998058818
X-HCP-Operation: CREATE
X-HCP-IngestTimeMilliseconds: 1493911519818
X-HCP-Size: 9
The contents of the requested version of the object.
X-HCP-VersionId: 80232998058819
X-HCP-Operation: CREATE
X-HCP-IngestTimeMilliseconds: 1493911519819
X-HCP-Size: 9
The contents of the requested version of the object.
Trademarks and Legal Disclaimer
© 2015, 2019 Hitachi Vantara Corporation. All rights reserved.