Rest API pagination help in Azure Data Factory.

Sandeep 21 Reputation points
2022-10-25T15:14:54.977+00:00

Hi Team,

We have a use case where we need to fetch the data from an API using pagination and write it to ADLS.
I went through multiple blogs and did some poc's but pagination didn't work. Can someone please help me here

Below is the Poc that am trying

  1. Call token URL with ClientID and Secret to fetch TOKEN
  2. Call session URL with TOKEN as Bearer and fetch the Session ID
  3. Call the API with Session ID as authorization in header to fetch the data.
  4. If the API response body has nextPage details, then it needs to append the nextPage URI in the response body with base URL and call the API for next page response.
  5. This should repeat till the nextPage flag is empty in the response body.
  6. Once the nextPage is empty all the response should be merged and written to a single file in ADLS

Thanks in advance

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,625 questions
{count} votes

Accepted answer
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2022-10-27T12:12:19.81+00:00

    Hi @Sandeep ,

    Thank you for posting query in Microsoft Q&A Platform.

    I would encourage you to check below link where different ways of pagination explained with detailed steps. Kindly choose any approach from there which better fits for you.

    Hope this helps. If not, feel free to share your implementation details along with screenshots and configurations so that we can spot issue better and help.

    -------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.