Adding pagination back to api