Hi Karthik Malaiyappan ,
Welcome to Microsoft Q&A platform and thanks for posting your question here
The customer is trying to pass parameters to the request body of an API using REST Linked service inside copy activity in Azure Data Factory (ADF). They are looking for a way to loop dynamically to the request body.
In the REST API linked service, you can create a parameter named 'id' and use the same in the base URL and pass the ID values by iterating through Foreach activity and have copy activity within foreach.
REST API linked service parameterization:
Create the REST API dataset and create a new parameter 'Id' .
Now, create a sql table or csv file having all the ID values that you want to iterate through and use lookup activity to point to the file.
Use foreach activity to loop through the output of look up activity . Use copy activity within foreach and use
@item().Id as the expression for Id value to be passed for source dataset.
You can add the other properties ie.
content-type etc in additional headers .
Hope it helps. Kindly accept the answer by clicking
Accept answer button if it helped. Thankyou