Pagination

When requesting list resources, you can set the size of a page by using perPage=#and indicate which page to return with page=#.
So a request to /users/{user_id}/surveys?page=2&perPage=5will return the second page of five surveys.


Any request to a list resource returns the following pagination fields, if available :

Name Description
perPage Number of resources per page
page Indicates which page is being returned
total Number of items available
links.self Resource URL for the current page
links.prev Resource URL for the previous page of results
links.next Resource URL for the subsequent page of results
links.first Resource URL for the first page of results
links.last Resource URL for the last page of results
arrow_rightPagination
application/json

              {  
              "pagination" :{
                                "perPage": 5,
                                "page": 2,
                                "total": 50,
                                "links": {
                                    "self": "https://api.questionpro.com/a/api/v2/users/{user-id}/surveys?page=2&perPage=5&apiKey={{apiKey}}",
                                    "prev": "https://api.questionpro.com/a/api/v2/users/{user-id}/surveys?page=1&perPage=5&apiKey={{apiKey}}",
                                    "next": "https://api.questionpro.com/a/api/v2/users/{user-id}/surveys?page=3&perPage=5&apiKey={{apiKey}}",
                                    "first": "https://api.questionpro.com/a/api/v2/users/{user-id}/surveys?page=1&perPage=5&apiKey={{apiKey}}",
                                    "last": "https://api.questionpro.com/a/api/v2/users/{user-id}/surveys?page=10&perPage=5&apiKey={{apiKey}}"
                          }
             }