Atom feed of this document
 
 
 

 4.1.2.2. Controlling a Large List of Containers

A GET request to the storage account URL returns a list of up to 10,000 container names. You may limit and control this list of results by using the marker and end_marker parameters.

Marker tells Cloud Files where to begin your list of containers and end_marker notes where to end the list. You may use either of them independently, or together, separated by an &. If you use them on their own, your list will display up to 10,000 containers. Note that the marker and end_marker values should be URL-encoded prior to sending the HTTP request.

You may also use the limit parameter to lower the number of returned objects.

 

Example 4.10. List Large Number of Containers

For example, let's use a listing of five container names

  apples
  bananas
  kiwis
  oranges
  pears
                    

We'll use a limit of two to show how things work:

  GET /<api version>/<account>?limit=2
  Host: storage.clouddrive.com
  X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
                    
  apples
  bananas
                    

Since we received two items back, we can assume there are more container names to list, so we make another request with a marker of the last item returned:

  GET /<api version>/<account>?limit=2&marker=bananas
  Host: storage.clouddrive.com
  X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
                    
  kiwis
  oranges
                    

Again, two items are returned; there may be more:

  GET /<api version>/<account>?limit=2&marker=oranges
  Host: storage.clouddrive.com
  X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
                    
  pears
                    

With this one-item response we received less than the limit number of container names, indicating that this is the end of the list.




loading table of contents...