WIP restful: addition of pagination

why not directly `data_to_return = data` ?