Adding Pagination to API