I would like to know in which case I would use each one for the creation of an API, I would like to know why I have an API and I want pages with it and of those elements I only use the req.body, but I don't know how the others would work, I would like to paginate and do two other things with the API for a school project.
example: draw by user or by students imagining that each student has more than one project
https:api.com/?user=juan
and in case Juan has more than 10 I only take 5 and there are 5 left for when he returns and makes the request the other 5 come out and the first ones do a findAndUpdate to another condition, revised example,
https:api.com/?user=juan&proj=5
Can you explain me the use and how to do it?