adding pagination to api calls
adding test cases
Merge remote-tracking branch 'brah/add_pagination_to_api'