Accessing a namespace with HTTP

HCP supports a RESTful implementation of the HTTP protocol. To access a namespace through this protocol, you can write applications that use any standard HTTP client library, or you can use a command-line tool, such as cURL, that supports HTTP. You can also use a web browser to access the namespace. The namespace configuration determines whether you need to use HTTP with SSL (HTTPS).

Using the HTTP protocol, you can store, view, retrieve, and delete objects. You can specify certain metadata when you store new objects and change the metadata for existing objects. You can add, replace, and delete custom metadata and ACLs and retrieve information about namespaces.

HCP is compliant with HTTP/1.1, as specified by RFC 2616.

For you to access a namespace through HTTP, this protocol must be enabled in the namespace configuration. If you cannot use the HTTP protocol to access the namespace, contact your tenant administrator.

This chapter explains how to use HTTP to access and perform operations in namespaces.

The HTTP examples in this book use cURL and Python with PycURL, a Python and Java® interface that uses the libcurl library. cURL and PycURL are both freely available open-source software. You can download them from http://curl.haxx.se.

Note: In version 7.12.1 of PycURL, the PUT method was deprecated and replaced with UPLOAD. The Python examples in this book show UPLOAD but work equally well with PUT.

For a condensed reference of the HTTP methods you use and responses you get when accessing a namespace, see HTTP reference.

© 2015, 2020 Hitachi Vantara LLC. All rights reserved.