Manage Objects

Following the steps in the current example, you list all buckets that you own, create a bucket, upload an object to it, and add tags to the object.

Procedure

  1. List all buckets owned by the authenticated user.
    GET https://vcloud-object-storage.example.com:8443/api/v1/s3
    The response body contains a list of all buckets that the authenticated user owns.
  2. Create a bucket.
    PUT https://vcloud-object-storage.example.com:8443/api/v1/s3/bucket-name
    The system returns a 200 OK message upon a successful creation of the bucket.
  3. Verify that the bucket is available and accessible.
    HEAD https://vcloud-object-storage.example.com:8443/api/v1/s3/bucket-name
    If the bucket is available and accessible for the authenticated user, the system returns a 200 OK message.
  4. Upload an object.
    PUT https://vcloud-object-storage.example.com:8443/api/v1/s3/bucket-name/object-name
  5. Add tags to the object.
    Object tags are a key-value pairs that help you categorize objects and buckets.
    PUT https://vcloud-object-storage.example.com:8443/api/v1/s3/bucket-name/object-name?tagging
    Following is an example of a valid tagging request body in JSON and XML formats:
    {
      "tagSets": [
        {
          "tags": [
            {
              "key": "string",
              "value": "string"
            }
          ]
        }
      ]
    }
    <Tagging>
      <TagSet>
         <Tag>
           <Key>string</Key>
           <Value>string</Value>
         </Tag>
      </TagSet>
    </Tagging>
    
    The system returns a 200 OK message upon a successful completion of the operation.