You can use pagination to split the requested content into separate pages.
The standard names of the pagination fields are provided. However, some APIs might use other names to refer to the fields. Make sure that you review the API documentation that is provided by the application vendor to ensure that you enter the correct field names.
No pagination. The request returns all the data.
Limit/Offset. The limit and offset fields define the starting point for retrieving records and the number of records that are to be returned. The limit is set to 100, and the offset increment is 100. For example, when n is 0, the offset will be 0, which means that the query will start at the 1st result and return 100 results. Similarly, when n is 1, the offset is 100, which means the query will start at 101 and return 100 results.
Other names for the limit field are: page_size, page[size]. Other names for the offset field are: page_number, page[after].
Limit/Page. The page and limit fields are used to specify a specific page to retrieve and the number of resources to retrieve in a page. The limit is set to 100, and the page increment is n + 1. For example, when n is 0, the page is 1, starting at the first page and returning 100 results. When n is 1, the page is 2, starting at the second page and returning 100 results.
Other names for the limit field are page_size and page[size].
Cursor. Uses a cursor which acts as a pointer to the last item on the current page as the starting point for retrieving more records.
In the example response provided below, the cursor field name is cursor and the cursor field path is pagination.cursor.
{
"suggestions": [ ],
"pagination": {
"total_records": 200,
"total_pages": 10,
"page_size": 20,
"page": 1,
"cursor": "eyJzb3J0IjoiIiwidmFsIjoyNjMsImxhc3RfaWQiOjIzMTUyMjJ9"
}
} In cursor-based pagination, a set of records are retrieved one page at a time, and the order of retrieval is always forward. Unlike limit/offset pagination, it is not possible to jump to a certain offset or move backward.
Other names for cursor field: offset, after. Other names for cursor path: next_page.offset, meta.after_cursor, paging.next.after.
Advanced. Use Advanced to define custom pagination rules. For example, you might want to use:
- Keyset API Pagination
- Seek API Pagination
- Time-Based API Pagination.
- Offset API Pagination.
- Page Based Pagination
This example illustrates offset pagination using the Oomnitza API, which returns 1 record starting from the second dataset. In the Oomnitza API, the offset field is referred to as the skip field.
You also can use the iteration variable in advanced mode. The iteration variable can be used to automate the incrementation process instead of having to enter a value each time.
Homepage/Documentation URL. Retrieve the logo for the vendor application.
Comments
0 comments
Please sign in to leave a comment.