Adding pagination to API publisher