< Previous | Contents | Next >

Working with buckets


With the HS3 API, you can perform operations on individual buckets. You can also list all the buckets you own.


For each bucket operation you can request, this chapter:


Describes the operation


Shows the request line for the operation


Describes the request headers for the operation


Describes the response headers returned for a successful execution of the requested operation


Shows the format of the request or response body, where applicable


Explains the HTTP status codes that can be returned in response to requests for the operation


Presents one or more examples of requests for the operation


For general information about HS3 requests and HCP responses to those requests, see Chapter 4, “Requests and responses,” on page 53.


For information about the examples in this chapter, see “Examples in this book” on page 13.


Chapter 5: Working with buckets 65

Creating a bucket


 

Creating a bucketRequest lineRequest headersResponse headersHTTP status codesExamplesExample 1: Creating a bucketExample 2: Creating a bucket with an ACLListing the buckets you ownRequest lineRequest headersResponse headersResponse bodyHTTP status codesExample: Listing the buckets you ownChecking the existence of a bucketRequest lineRequest headersResponse headersHTTP status codesExample: Checking the existence of a bucketAdding an ACL to a bucketRequest lineRequest headersResponse headersHTTP status codesExamplesExample 1: Adding an ACL to a bucket by specifying individual grantsExample 2: Adding an ACL to a bucket by using an ACL request bodyRetrieving the ACL for a bucketRequest lineRequest headersResponse headersHTTP status codesExample: Retrieving a bucket ACLEnabling or disabling versioning for a bucketRequest bodyRequest lineRequest headersResponse headersHTTP status codesExample: Enabling versioning for a bucketChecking the versioning status of a bucketRequest lineRequest headersResponse headersHTTP status codesExample: Checking the versioning status of a bucketListing bucket contentsLimiting the bucket listingLimiting a listing of current itemsLimiting a version listingRequest lineRequest headersResponse headersResponse bodyResponse body for a listing of current itemsResponse body for a version listingResponse body elementsHTTP status codesExamplesExample 1: Listing the items in a folderExample 2: Listing items a few at a timeExample 3: Listing the versions of an individual objectDeleting a bucketRequest lineRequest headersResponse headersHTTP status codesExample: Deleting a bucket