Pagination
The first part of the JSON response indicates how the response is paginated, based on the URL parameters passed in the request. For example:
"pageNumber": 1,
"pageSize": 1000, "firstPage": "/v1/Inspections?projectId=47145&pageNumber=1&pageSize=1000",
"lastPage": "/v1/Inspections?projectId=47145&pageNumber=2&pageSize=1000",
"totalPages": 2,
"totalRecords": 1013,
"nextPage": "/v1/Inspections?projectId=47145&pageNumber=2&pageSize=1000",
"previousPage": null,
The preceding JSON sample specifies a response that is paginated as follows:
pageNumber: This is the first page of data in the response.
pageSize: The response has 1000 providers on each page.
firstPage: The URL from which to retrieve the first page of data.
lastPage: The URL from which to retrieve the last page of data.
totalPages: The response has 2 pages of data.
totalRecords: The response has the data for 1013 providers.
nextPage: The URL from which to retrieve the next page of data. In this example, this is the same as the URL as lastPage because there are only two pages.
previousPage: The URL from which to retrieve the previous page of data. In this example, this is null because the current page is the first page.
Note: You typically use pageNumber and pageSize as query string parameters in subsequent API requests to iterate over the results until nextPage is null, indicating that you have reached the end of the results.