简体   繁体   中英

How to achieve pagination in swift stack objects storage (openstack swift)

I used the query parameters 'limit', 'marker', and 'end_marker'. The parameter limit with marker works well(url?limit=10&marker=xyz). But How to achieve pagination using limit. Example I want fetch first 10 records and second request another 10 records. I referred this , but there is no range in limit option.

You should use the last record from the previous request as a marker.

First request

GET /v1/ACCOUNT/CONTAINER?limit=2

object1
object2

Second request

GET /v1/ACCOUNT/CONTAINER?limit=2&marker=object2

object3
object4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM