If you have a large number of containers or objects, you can use the marker, limit, and end_marker parameters to control how many items are returned in a list and where the list starts or ends.
Assume the following list of container names:
apples
bananas
kiwis
oranges
pears
Use a limit of two:
# curl -i $publicURL/?limit=2 -X GET -H "X-Auth-Token: $token"
apples
bananas
Because two container names are returned, there are more names to list.
Make another request with a marker parameter set to the name of the last item returned:
# curl -i $publicURL/?limit=2&marker=bananas -X GET -H \
“X-Auth-Token: $token"
kiwis
oranges
Again, two items are returned, and there might be more.
Make another request with a marker of the last item returned:
# curl -i $publicURL/?limit=2&marker=oranges -X GET -H \”
X-Auth-Token: $token"
pears
You receive a one-item response, which is fewer than the limit number of names. This indicates that this is the end of the list.
Use the end_marker parameter to limit the result set to object names that are less than the end_marker parameter value:
# curl -i $publicURL/?end_marker=oranges -X GET -H \”
X-Auth-Token: $token"
apples
bananas
kiwis
You receive a result set of all container names before the end-marker value.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.