Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3619

What pagination method is better for rest api's (page, size) or (limit, offset)

$
0
0

I searched many stack overflow answers,articles and could't get an concrete idea about this and that is why i'm asking this question,

References : 10 Best Practices for Better RESTful API

I am just wondering what should we need to use when we do pagination in rest apis,In spring framework they are providing (page,size) by default to implement paging in apis and i think using (page, size) is more human readable and make sense rather than (limit, offset), Is there any reason why spring is providing (page,size) by default rather than limit,offset and many answers are to justify that (limit,offset) is better than (page,size).

https://somewhere.com/results?page=1&size=20

https://somewhere.com/results?limit=20&offset=0


Viewing all articles
Browse latest Browse all 3619

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>