Is it possible to paginate an API URI endpoint that doesn't accept query strings?

I am using this API https://reqres.in/api/users?page=2 which returns dummy data. I am using jQuery for my AJAX calls and have it set up so the ‘page’ variable is dynamic. Although this works fine and returns only 3 entries per page, I have a few concerns regarding URI endpoints that don’t accept query strings.

For example, this endpoint right here: https://jsonplaceholder.typicode.com/posts

How am I supposed to paginate or limit the returned posts to 15 or 30 with this endpoint?

How am I supposed to paginate or limit the returned posts to 15 or 30 with this endpoint?

If the server doesn’t accept a parameter that tells it how it should paginate, then you can’t force it to give you paginated results.

If you want to make it easier on the user you can store all the data in the clients memory and paginate on the client side and just never call the endpoint for new data.

I see, thanks. I assumed it was impossible and thanks to your reply I now am confident with my assumption.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.