With ADF Pagination Rules, how do I add query parameters properly to subsequent calls?

Angelo Mariano 25 Reputation points
2025-01-24T18:11:27.0333333+00:00

I am running calls on an API, where my base URL specifies a query parameter "limit=500" to return a max of 500 records in the response. I have an AbsoluteURL pagination rule set up to follow a next-page URL provided in the response. When the subsequent call runs, the response returns up to 30 records, which is the default limit (instead of 500).

How can I add this limit to subsequent calls?

Here is how I've attempted so far, and the error it provides:

User's image

User's image

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

1 answer

Sort by: Most helpful
  1. Chandra Boorla 7,260 Reputation points Microsoft Vendor
    2025-01-24T20:55:21.5566667+00:00

    Hi @Angelo Mariano

    Greetings & Welcome to Microsoft Q&A forum! Thanks for posting your query!

    The error occurs because the QueryParameters pagination rule was incorrectly defined or conflicts with the API's structure. Specifically, the value &limit=500 as a QueryParameters rule is invalid in this context. The correct way to define pagination rules for APIs like involves dynamically updating the offset query parameter without appending raw query strings.

    I tried to replicate the scenario and able to pass the query parameter values. I took the following API

    API link: https://pokeapi.co/api/v2/pokemon?limit=100&offset=0

    Base URL: https://pokeapi.co/api/v2/pokemon?limit=100&offset={offset}

    Here I have created a variable called offset in the URL and need to pass the values. User's image User's image

    For more details, please refer:REST

    Output:

    User's image

    I hope this information helps. Please do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


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.