< Previous | Contents | Next >

Preface xi

Intended audience xi

Product version xii

Syntax notation xii

Related documents xiii

Getting help xv

Comments xvi

1 Introduction to Hitachi Content Platform 1

About Hitachi Content Platform 2

Object-based storage 2

Buckets and tenants 3

HCP nodes 3

Replication 4

About the HCP HS3 API 5

Other bucket access methods 6

Namespace access protocols 6

HCP Namespace Browser 7

HCP metadata query API 7

HCP Search Console 8

HCP Data Migrator 9

User accounts 10

Data access permissions 11

Examples in this book 13

2 Bucket and object properties 15

Bucket names 16

Object names 16

Forward slashes in object names 17

Object naming considerations 18

Retention 20

Custom metadata 20

Storing custom metadata with HS3 20

Retrieving custom metadata with HS3 22

Custom metadata usage considerations 22

Bucket owners 24

Object owners 24

Access control lists 25

ACL permissions 26

ACL grantees 27

Canned ACLs 27

Specifying ACLs 28

Specifying an ACL with headers 28

Specifying an ACL in the request body 30

Removing an ACL 34

Versioning 34

Allocated space 36

Search 36

Data access permission masks 37

Replication collisions 38

Object content collisions 38

Custom metadata collisions 39

Access control list collisions 40

3 Access and authentication 43

URLs for access to HCP 44

Using an IP address in a URL 45

Using a hosts file 46

URL considerations 47

AWS authentication 48

Authorization header 48

Presigned URLs 49

Signatures 50

Anonymous access 50

Invalid credentials 50

Changing your password 51

4 Requests and responses 53

Requests 54

Request line 54

Common request headers 55

iv Contents

Responses 57

Response status line 57

Common response headers 58

Error response body 59

Error codes 59

5 Working with buckets 65

Creating a bucket 66

Request line 66

Request headers 67

Response headers 68

HTTP status codes 68

Examples 70

Example 1: Creating a bucket 70

Example 2: Creating a bucket with an ACL 70

Listing the buckets you own 71

Request line 71

Request headers 72

Response headers 72

Response body 73

HTTP status codes 74

Example: Listing the buckets you own 75

Checking the existence of a bucket 76

Request line 76

Request headers 77

Response headers 77

HTTP status codes 77

Example: Checking the existence of a bucket 78

Adding an ACL to a bucket 79

Request line 80

Request headers 80

Response headers 81

HTTP status codes 82

Examples 83

Example 1: Adding an ACL to a bucket by specifying individual grants . . 83 Example 2: Adding an ACL to a bucket by using an ACL request body . . 84 Retrieving the ACL for a bucket 85

Request line 85

Request headers 86

Response headers 86

HTTP status codes 87

Example: Retrieving a bucket ACL 87

Enabling or disabling versioning for a bucket 89

Contents v

Request body 90

Request line 91

Request headers 91

Response headers 91

HTTP status codes 92

Example: Enabling versioning for a bucket 93

Checking the versioning status of a bucket 93

Request line 94

Request headers 94

Response headers 95

HTTP status codes 95

Example: Checking the versioning status of a bucket 96

Listing bucket contents 97

Limiting the bucket listing 98

Limiting a listing of current items 98

Limiting a version listing 100

Request line 102

Request headers 105

Response headers 105

Response body 106

Response body for a listing of current items 106

Response body for a version listing 107

Response body elements 108

HTTP status codes 112

Examples 113

Example 1: Listing the items in a folder 113

Example 2: Listing items a few at a time 115

Example 3: Listing the versions of an individual object 119

Deleting a bucket 121

Request line 121

Request headers 121

Response headers 122

HTTP status codes 122

Example: Deleting a bucket 123

6 Working with objects 125

Storing an object 126

Request line 127

Request headers 128

Response headers 129

HTTP status codes 130

Examples 131

Example 1: Storing an object 131

Example 2: Storing an object with custom metadata and an ACL 132

vi Contents

Creating a folder 133

Request line 134

Request headers 134

Response headers 135

HTTP status codes 135

Example: Creating a folder 136

Checking the existence of an object or folder 137

Request line 138

Request headers 139

Response headers 141

HTTP status codes 143

Examples 144

Example 1: Checking the existence of an object 144

Example 2: Retrieving custom metadata for an object version 145

Example 3: Checking whether an object has been modified 146

Example 4: Checking the existence of a folder 147

Adding an ACL to an object 147

Request line 148

Request headers 148

Response headers 150

HTTP status codes 150

Examples 152

Example 1: Adding an ACL to an object by using a canned ACL 152

Example 2: Adding an ACL to an object by using an ACL request body . 153 Retrieving the ACL for an object 154

Request line 154

Request headers 155

Response headers 155

HTTP status codes 156

Example: Retrieving an object ACL 156

Copying an object 158

Request line 160

Request headers 161

Response headers 166

Response body 167

HTTP status codes 168

Examples 169

Example 1: Conditionally copying an object from one bucket to another 170 Example 2: Recovering an old version of an object 171

Example 3: Replacing custom metadata for an existing object 172

Retrieving an object 173

Request line 176

Request headers 177

Contents vii

Response headers 180

HTTP status codes 181

Examples 183

Example 1: Conditionally retrieving an object 183

Example 2: Retrieving an old version of an object 183

Example 3: Retrieving part of an object 184

Deleting an object or folder 185

Request line 185

Request headers 186

Response headers 186

HTTP status codes 186

Examples 187

Example 1: Deleting an object 188

Example 2: Deleting a folder 188

7 Usage considerations 191

Hostname and IP address considerations 192

Folder structures 192

Concurrent writes of the same object 193

Failed PUT requests to store objects. 193

Empty objects 194

Deleting objects under repair 194

Multithreading 194

Persistent connections 195

Connection failure handling 196

A Quick reference 197

B Alternative authentication method 209

URLs with HCP authentication 210

HCP authentication 211

C Using third-party tools with HS3 213

General setup information for third-party tools 214

s3curl setup 214

Specifying an access key and secret key 214

Specifying a tenant 215

D Sample Java application. 217

Assumptions 217

What the application does 217

viii Contents

Required libraries 218

Java application 219

E HCP HS3 XML schema 225

Glossary 241

Index 253


Contents ix


x Chapter 1: Contents

image