Brandon
05/18/2023, 2:56 PMdef next_page_token(self, response: requests.Response) -> Optional[Mapping[str, Any]]:
return response.json().get("@odata.nextLink")
kapa.ai
05/18/2023, 2:56 PMkapa.ai
05/18/2023, 2:57 PMnext_page_token
function, you should extract the next page "token" from the latest response. The token can be an ID, a page number, a partial URL, etc. The CDK will continue making requests as long as the next_page_token
function returns non-None
results. You can then use this token in the request_params
and other methods in HttpStream
to page through API responses [source](https://docs.airbyte.com/connector-development/cdk-python/http-streams). For more advanced pagination scenarios, you can use custom parameter injection and jinja expressions with available variables [source](https://docs.airbyte.com/connector-development/connector-builder-ui/pagination). If you're still having issues, I recommend reviewing the Airbyte documentation on [connector development](https://docs.airbyte.com/connector-development/) and [pagination](https://docs.airbyte.com/connector-development/connector-builder-ui/pagination) for more guidance.