Example: Storing an object

Here's a sample PUT request that stores an object named Q4_2012.ppt in the finance container.

Request with curl command line

curl -k -i -X PUT http://api.hcp.example.com/swift/v1/AUTH_6b6884ebb6f441cfbb7e740f6a927c9e/finance/Q4_2012.ppt -H "X-Auth-Token: dc5efec8f546455eac974e7bbfd0dd87" -H "Content-Length: 63" -H "Etag: 61d952ad1d4bdb14aa221d046a6289de"

Request headers

PUT /swift/v1/AUTH_6b6884ebb6f441cfbb7e740f6a927c9e/finance/Q4_2012.ppt HTTP/1.1
X-Auth-Token: dc5efec8f546455eac974e7bbfd0dd87

Response headers

HTTP/1.1 201 Created
Date: Mon, 20 Oct 2014 20:48:36 GMT
Server: HCP V7.1.0.353
ETag: "1774af03f76ef80fa0c08b9dbd8d19f9"
X-Trans-Id: txfe5244ce53a142288ef97-00541b3b32
Content-Type: application/octet-stream
Content-Length: 0

 

Trademarks and Legal Disclaimer

© 2016 Hitachi Data Systems Corporation. All rights reserved.