curl commands for unified file and object access related user tasks

The following are the curl commands for performing user tasks related to unified file and object access.

For the following commands, it is assumed that:

  1. Create a container named unified_access with unified file and object access storage policy using curl as follows.

    curl -v -i -H "X-Auth-Token: $auth_token" 
    -X PUT http://specscaleswift.example.com:8080/v1/AUTH_cd1a29013b6842939a959dbda95835df/unified_access/ 
    -H "X-Storage-Policy: SwiftOnFileFS"

    In this command, http://specscaleswift.example.com:8080/v1/AUTH_cd1a29013b6842939a959dbda95835df/ is the endpoint URL for a project (tenant) using which a container unified_access is created with SwiftOnFileFS as the storage policy.

  2. Upload an object in the container associated with the unified file and object access storage policy using curl as follows.

    curl -v -i -H "X-Auth-Token: $auth_token" 
    -X PUT http://specscaleswift.example.com:8080/v1/AUTH_cd1a29013b6842939a959dbda95835df
    /unified_access/object1 
    --data-binary @imageA.jpg
  3. Download object residing in the unified file and object access container using curl as follows.

    curl -v -i -H "X-Auth-Token: $auth_token" 
    -X GET http://specscaleswift.example.com:8080/v1/AUTH_cd1a29013b6842939a959dbda95835df
    /unified_access/samplefile.txt
  4. List the contents of the unified file and object access container using curl as follows.

    curl -v -i -H "X-Auth-Token: $auth_token" 
    -X GET http://specscaleswift.example.com:8080/v1/AUTH_cd1a29013b6842939a959dbda95835df
    /unified_access/