Example 2: Creating a container with an ACL example (data permission only)

Here's a sample PUT request that creates a container named human-resources and adds an ACL to the container. The ACL grants read permission to all users and write permission to the Keystone users with usernames mwhite and pdgrey.

Request with cURL command line

curl -X PUT http://api.hcp.example.com/swift/v1/AUTH_6b6884ebb6f441cfbb7e740f6a927c9e/human-resources -i -H "X-Auth-Token: dc5efec8f546455eac974e7bbfd0dd87" -H "X-Container-Read: *" -H "X-Container-Write: mwhite, pdgrey"

Request headers

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

Response headers

HTTP/1.1 202 Created
Date: Fri, 31 Oct 2014 12:48:13 GMT
Server: HCP V7.1.0.353
Content-Length: 0
X-Trans-Id: tx78cf0d46829f49529ed1a-0053fccad0

Trademarks and Legal Disclaimer

© 2017 Hitachi Data Systems Corporation. All rights reserved.