< Previous | Contents | Next >

Version 2.0 (Revision 26)

February 2015


image


Table of Contents

1 Introduction 5

1.1 Summary 5

1.2 Intended Audience 5

1.3 Required Materials 5

1.4 Recommended Reading 5

2 Getting Started with REST 6

2.1 Creating an Object 7

2.1.1 Using a HCP Namespace 7

2.1.2 Interpreting Responses 11

2.2 Retrieving an Object 11

2.2.1 Using a Namespace 11

2.2.2 Interpreting Responses 13

2.3 Deleting an Object 15

2.3.1 Using a Namespace 15

2.3.2 Interpreting Responses 16

2.4 Working with Conditionals 16

2.4.1 Conditionals 16

2.4.2 Available Headers 17

2.4.3 Put operation with condition 18

2.5 Working with System Metadata 19

2.5.1 Available Properties 19

2.5.2 Overriding Defaults 19

2.5.3 Adjusting Values 21

2.5.4 Interpreting Responses 23

2.6 Working with Custom Metadata 23

2.6.1 Valid Formats 23

2.6.2 Creating Custom Metadata 23

2.6.3 Retrieving Custom Metadata 25

2.6.4 Deleting Custom Metadata 26

3 Planning Your Application 27

3.1 Addressing Objects 27

3.1.1 Load Balancing 27

3.1.2 Fault Tolerance 29

3.1.3 Disaster Recovery 29

3.2 Managing Objects 30

3.2.1 Region Management 30

3.2.2 Directory Layout 31

3.3 Protecting Objects 32

3.3.1 Authenticity and Checksums 32

3.3.2 Reliability 33

3.4 Retaining Objects 33

3.4.1 Retention 33

3.4.2 Retention Classes 34

3.4.3 Compliance Modes 35

3.4.4 Legal Holds 36

3.5 Securing Objects 36

3.5.1 HTTPS 36

3.5.2 Access Control 36

3.5.3 Data Encryption 36

3.5.4 Data Shredding 37

4 Advanced Topics 38

4.1 Handling Errors 38

4.1.1 Retrying Transactions 38

4.1.2 Dealing with Failed Writes 38

4.2 Performance Programming 38

4.2.1 Concurrent Access 38

4.2.2 Persistent Connections 39

4.3 Alternative I/O 39

4.3.1 Chunked Transfers 39

4.3.2 Partial Content Transfers 39

4.4 Versioning 41

4.4.1 Creating Versions 41

4.4.2 Retrieving Versions 41

4.4.3 Deleting Versions 41

4.4.4 Listing Versions 42

4.5 Retrieving Status Information 43

4.5.1 Getting Object Information 43

4.5.2 Listing Directory Contents 44

4.5.3 Getting HCP Namespace Information 45

5 Conclusions 48

6 Appendix 49

6.1 Supporting Libraries 49

6.1.1 Apache HTTP client 49

6.2 REST API Quick Reference 49

6.2.1 Request Methods 49

6.2.2 Request Headers 50

6.2.3 Response Codes 51

6.2.4 Response Headers 52

6.2.5 Retention Syntax 53

6.2.6 XML Documents 54

1 Introduction