The system will return a maximum of 10,000 object names per request. To retrieve subsequent object names, another request must be made with a 'marker' parameter. The marker indicates where the last list left off and the system will return object names greater than this marker, up to 10,000 again. Note that the ‘marker’ value should be URL encoded prior to sending the HTTP request.
If 10,000 is larger than desired, a 'limit' parameter may be given.
If the number of object names returned equals the limit given (or 10,000 if no limit is given), it can be assumed there are more object names to be listed. If the container name list is exactly divisible by the limit, the last request will simply have no content.
Example 3.18. List Large Number of Objects
For an example, let's use a listing of five object names:
gala
grannysmith
honeycrisp
jonagold
reddelicious
We'll use a limit of two to show how things work:
GET /<api version>/<account>/<container>?limit=2
Host: storage.swiftdrive.com
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
gala
grannysmith
Since we received two items back, we can assume there are more object names to list. So, we make another request with a marker of the last item returned:
GET /<api version>/<account>/<container>?limit=2&marker=grannysmith
Host: storage.swiftdrive.com
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
honeycrisp
jonagold
Again we have two items returned; there may be more:
GET /<api version>/<account>/<container>?limit=2&marker=oranges
Host: storage.swiftdrive.com
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
reddelicious
Now we received less than the limit number of container names, indicating that we have the complete list.
