DEV Community

Discussion on: Pagination in an API: page number vs start index

Collapse
 
alainvanhout profile image
Alain Van Hout

Either is fine, I'd say. The key thing is to be consistent.

If I wanted to maximize convenience, I'd perhaps add both, with one being the actually used one and the other being automatically converted to that primary one.

Collapse
 
joaofbantunes profile image
João Antunes

Yeah, consistency is key.

Never thought of supporting both for the same endpoint, but that's not a bad idea, allows the client to use what's easier for a given scenario.