API Pagination - "page" via expression

Ryan Abbey 1,186 Reputation points
2021-11-02T02:55:57.627+00:00

We have an API that, rather than returning a "next page" link, gives us the current offset and current row count, like below

"count": 20,
"offset": 0,
"total": 702,

So to put in my next request, I need count + offset (and stop when exceeding total), is there any way to pass that in to the Copy Activity "pagination" options of an API call?

My alternative is going via a Web activity and looping... however, the Web Activity doesn't seem to support API key authentication (except when hard coded), have I missed something there?

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

1 answer

Sort by: Most helpful
  1. svijay-MSFT 5,256 Reputation points Microsoft Employee Moderator
    2021-11-05T12:42:12.657+00:00

    Hello @Ryan Abbey ,

    Thanks for getting back to me.

    So, I could - have a Web Activity to get the keys from the Key Vault and Set in the Variable.

    146780-image.png

    WEB Activity URL : https://<your-keyvalut-name>.vault.azure.net/secrets/<your-secret-name>

    You could access the output of the web Activity using : @activity('Web1').output.value & Store in a variable.

    You can reference this variable as the API KEY for the subsequent Web Activity (mentioned above workaround)


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.