HCP System Management Help


Example 1: Conditionally retrieving an object

Here's a sample GET request that retrieves an object named mktg/campaign_GoGetEm_expenses.xls in the finance container only if the ETag for the object doesn't match a specified value. In this example, the specified value is the ETag of mktg/campaign_GoGetEm_expenses.xls.

Request with curl command line

curl -v -X GET http://api.hcp.example.com/swift/v1/AUTH_6b6884ebb6f441cfbb7e740f6a927c9e/finance/mktg/campaign_GoGetEm_expenses.xls -H "X-Auth-Token: dc5efec8f546455eac974e7bbfd0dd87" -H "If-None-Match: d41d8cd98f00b204e9800998ecf8427e"

Request headers

GET /swift/v1/AUTH_6b6884ebb6f441cfbb7e740f6a927c9e/finance/mktg/campaign_GoGetEm_expenses.xls HTTP/1.1
X-Auth-Token: dc5efec8f546455eac974e7bbfd0dd87
If-None-Match: d41d8cd98f00b204e9800998ecf8427e

Response headers

HTTP/1.1 304 Not Modified
Date: Fri, 24 Oct 2014 13:03:44 GMT
X-Trans-Id: 854ad794-2a9e-4d02-9012-35e43d3d69ec
Accept-Ranges: bytes
X-Static-Large-Object: false
ETag: "d41d8cd98f00b204e9800998ecf8427e"
Server: HCP V7.1.0.353
Content-Type: text/html;charset=UTF-8
Content-Length: 0
Transfer-Encoding: chunked

© 2017 Hitachi Vantara Corporation. All rights reserved.