Pagination scripts
Last updated
Last updated
If a standard pagination type can't meet your pagination requirements, you can create a and .
Pagination scripts typically include:
Expected inputs must be inside the payload
key of the data
array. These are summarised below:
An array/object representing the request parts for the current page:
body
A string version of the body.
headers
An array/object containing a key/value map of request headers.
method
The HTTP method.
url
The entire URL used in the request.
An array/object containing the response parts returned from the request:
headers
An array/object containing a key/value map or response headers.
status_code
The HTTP response code.
The content saved as the payload. For example:
If has_next_page
is true, a JSON-encoded array/object should be returned (within the payload
field) with the following:
has_next_page
Whether or not there is another page to be fetched.
url
The URL to use for the next page request.
headers
The headers to use for the next page request.
method
The HTTP method to use for the next page request.
body
The body content to use in the next request.
The sample script below demonstrates link header
functionality.