< Previous | Contents | Next >

Working with objects


With the HS3 API, you can perform operations on individual objects. For each object 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


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 6: Working with objects 125

Storing an object


 

Storing an objectETagsEnsuring object integrityObject encryptionSaving network bandwidthRequest headersResponse headersHTTP status codesExamplesExample 1: Storing an objectExample 2: Storing an object with custom metadata and an ACLCreating a folderRequest lineRequest headersResponse headersHTTP status codesExample: Creating a folderChecking the existence of an object or folderObject informationConditionally checking the existence of an object, object version, or folderRequest headersResponse headersHTTP status codesExamplesExample 1: Checking the existence of an objectExample 2: Retrieving custom metadata for an object versionExample 3: Checking whether an object has been modifiedExample 4: Checking the existence of a folderAdding an ACL to an objectRequest lineRequest headersResponse headersHTTP status codesExamplesExample 1: Adding an ACL to an object by using a canned ACLExample 2: Adding an ACL to an object by using an ACL request bodyRetrieving the ACL for an objectRequest lineRequest headersResponse headersHTTP status codesExample: Retrieving an object ACLCopying an objectCopying an object to itselfConditionally copying an objectRequest headersResponse headersResponse bodyHTTP status codesExamplesExample 1: Conditionally copying an object from one bucket to anotherExample 2: Recovering an old version of an objectExample 3: Replacing custom metadata for an existing objectRetrieving an objectRetrieving part of an objectConditionally retrieving an objectOverriding response headersRequest headersResponse headersHTTP status codesExamplesExample 1: Conditionally retrieving an objectExample 2: Retrieving an old version of an objectExample 3: Retrieving part of an objectDeleting an object or folderRequest lineRequest headersResponse headersHTTP status codesExamplesExample 1: Deleting an objectExample 2: Deleting a folder