Add support for pagination parameters

Signed-off-by: Sam Xiao <sam.xs.xiao@gmail.com>