I’m defining Cursor Pagination for one of my strea...
# ask-ai
a
I’m defining Cursor Pagination for one of my streams. However the response returns a ‘__next’ property containing the URL to fetch more elements, with the cursor already filled in. Do I need to provide the UID of the next cursor object or can I just use this URL?
u
Based on the information provided in the knowledge sources, you can use the full URL returned in the '__next' property for Cursor Pagination in Airbyte. This approach is supported and can be implemented using the CursorPagination strategy. Here's how you can set it up: 1. Use the CursorPagination strategy in your paginator configuration. 2. Set the
cursor_value
to extract the full URL from the response. 3. Configure the
page_token_option
to use the
RequestPath
type. Here's an example of how you can configure this in your YAML file:
Copy code
yaml paginator:   type: "DefaultPaginator"   pagination_strategy:     type: "CursorPagination"     cursor_value: "{{ response.__next }}"   page_token_option:     type: "RequestPath"
This configuration tells Airbyte to use the full URL returned in the
__next
property of the response for the next request. The
RequestPath
type in the
page_token_option
ensures that the entire URL is used for the subsequent request, rather than just appending a parameter to the existing URL. This approach is particularly useful for APIs that return a full URL for the next page, as mentioned in the [Airbyte documentation on Cursor Pagination](https://docs.airbyte.com/connector-development/connector-builder-ui/pagination#cursor-pagination): "For cursor pagination, if
path
is selected as the
Inject into
option, then the entire request URL for the subsequent request will be replaced by the cursor value. This can be useful for APIs that return a full URL that should be requested for the next page of results, such as the GitHub API." By using this configuration, you don't need to extract or provide the UID of the next cursor object separately. The full URL returned by the API will be used directly for the next request.