How do I enter Get Parameters for a Rest API

Ryan James 36 Reputation points
2021-01-06T01:57:19.6+00:00

My REST API supports adding parameters such as Pagesize, Updated Dates and other filterable columns. How do I build these into the Data Factory copy activity?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
0 comments No comments
{count} votes

Answer accepted by question author
  1. MartinJaffer-MSFT 26,161 Reputation points
    2021-01-06T20:09:23.027+00:00

    Hello @Ryan James and welcome to Microsoft Q&A.

    Typically, message body is not used in REST GET requests. The parameters are either encoded in the URI or added as headers. When in the URI it might look something like this:

    https://myRestSite.net/api/tablename?filter=date&pagesize=200  
    

    where the parameters are filter, and pagesize.

    To build this we need to take advantage of the dataset base URL and relative URL. We also need to parameterize the dataset.

    First go to the dataset and add some parameters:
    54026-image.png
    Second, concatenate the parameters together in the relative URL

    @concat(dataset().tablename,'?',dataset().param1,'&',dataset().param2)  
    

    54060-image.png
    Third, pass in values through the copy activity to the dataset.
    53840-image.png

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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