Azure Data Factory: How to call REST API?

Web Activity is the easiest way to call any REST API endpoints within a Data Factory Pipeline. In today’s post, we will discuss the basic settings of Web activity.

To create a new web activity, search for ‘web’ in the activities pane. Alternatively, it can be located under the General group in the activities pane.  

As seen in the screenshot below, the main settings for the web activity are as follows:

Azure Data Factory: Web Activity
  1. URL: This is the REST API endpoint address that we would like to access/invoke. The real benefit of using data factory web activity is that this address can be dynamically generated based on parameters, variables or references to predecessor activity outputs.
  2. Method: REST API method for the endpoint e.g. GET, POST, PUT etc.
  3. Headers:  Custom headers can be set using this option.
  4. Datasets:  Datasets that we would like to pass to the REST API. Optional.
  5. Linked Services: Linked services that we would like to pass to the REST API. Optional.
  6. Authentication: Perhaps one of the most important settings, there are six options to choose from:
Azure Data Factory: Web Activity Authentication Options
  • None: No authentication (this is used when the authentication details are embedded in the URL or headers)
  • Basic: This is based on user id and pass
  • System Assigned Managed Identity: Azure based managed identity of the data factory.
  • Client Certificate: For authentication based on encoded client certificate.
  • Service Principal: Service Principal of the data factory.
  • User Assigned Managed Identity: User managed identity of the data factory.

 For a detailed list of settings and sample JSON code, please visit the Microsoft Docs reference link below:

Reference: https://docs.microsoft.com/en-us/azure/data-factory/control-flow-web-activity

Leave a comment