Updated pagination to work with RAPI