Forum Discussion
younghoon_kim
1 year agoRegular Visitor
REST API connection pagination inside Copy Activity Source, AbsoluteUrl points to wrong URL.
Hi. I've set up Copy Activity to pull data from an API, and having a hard time to paginate. API looks like this : https://serviceportal.telenorconnexion.com/iot/api/subscriptions/details?{some para...
- 1 year ago
can't apply your suggestion.
@concat('/iot/api/subscriptions', json(activity('copyFromAPIToLakehouseBronzePagination').output)['next'])The output of activity 'copyFromAPIToLakehouseBronzePagination' can't be referenced since it is either not an ancestor to the current activity or does not exist
v-sdhruv
1 year agoCommunity Support
Hi younghoon_kim ,
If your API can be configured to return the full URL in "next" like:
Then you can use:
"paginationRules": {
"absoluteUrl": "$.next"
}
If the API only returns a root-relative path like
/details?q=CO~~~"
then you cannot use absolute url directly. Instead, Use python to resolve the relative "next" using url join:
from urllib.parse import urljoin
base = "https://serviceportal.telenorconnexion.com/iot/api/subscriptions/"
Hope this helps!