Add pagination to endpoint scaffold