Path-Style and Virtual Hosted-Style Requests

Starting with VMware Cloud Director Object Storage Extension 1.5, you can use both path-style and virtual hosted-style URIs to access your VMware Cloud Director Object Storage Extension resources.

Path-Style Requests

To access your resources using path-style request, enter the VMware Cloud Director Object Storage Extension hostname, for example https://cloud-object-storage.example.com, followed by the /api/v1/s3 parse in the middle, and bucket name and optionally the object name in the end, for example /test-bucket and /object-1.

Following is an example of a path-style request that returns the content of a bucket:
GET https://cloud-object-storage.example.com/api/v1/s3/test-bucket
To retrieve an object using a path-style request, you issue an API request of the following form:
GET https://cloud-object-storage.example.com/api/v1/s3/test-bucket/object-1

Virtual Hosted-Style Requests

To access your resources using virtual hosted-style requests, enter the protocol prefix, for example https://, followed by the bucket name, then enter the mandatory s3 prefix, and add the VMware Cloud Director Object Storage Extension hostname, and append the bucket name and optionally the object name in the end.

To retrieve a list of all buckets owned by the authenticated user, issue a virtual hosted-style request of the following form:
GET https://s3.cloud-object-storage.example.com
Following is an example of a virtual hosted-style request that returns the content of a bucket:
GET https://test-bucket.s3.cloud-object-storage.example.com
To retrieve an object using a virtual hosted-style request, you issue an API request of the following form:
GET https://test-bucket.s3.cloud-object-storage.example.com/object-1

Virtual Hosted-Style Requests and Domain Name System Configuration

With virtual hosted-style URIs, you enter bucket names as part of the domain name. As a result, multiple domain names must be routed through the Domain Name System (DNS) server to a single instance of VMware Cloud Director Object Storage Extension.

To avoid routing issues, create a DNS rule that routes all domain names to the VMware Cloud Director Object Storage Extension instance. For example, route all requests from (*)s3.cloud-object-storage.example.com to the IP address of the VMware Cloud Director Object Storage Extension instance.