Forum Discussion
AstridMalanka
Feb 11, 2025Copper Contributor
Rest api call with multiple pages
Hello, I need to migrate an SSIS package that make API calls and return multiple pages. The call goes to https://{{HOSTNAME}}/personnel/v1/person-details, and I can manually do https://{{HOSTNAME}}...
petevern
Feb 13, 2025Brass Contributor
How about using an until activity until the response is empty.
Variables:
- CurrentPage = 1 (starting page)
- ReponseHasData = true
Until Activity
- Condition is ResponseHasData = true
- In the loop:
* Make API call using dynamically generated URL that includes CurrentPage
* Check the response length:
- If the response array is empty set ResponseHasData = false, which exists the loop
- otherwise increment ResponseHasData by 1 and continue looping