Use the Web activity to call REST APIs in pipelines

Web Activity can be used to call a custom REST endpoint from an Azure Data Factory or Synapse pipeline. You can pass datasets and linked services to be consumed and accessed by the activity.

Note

The maximum supported output response payload size is 4 MB.

Prerequisites

To get started, you must complete the following prerequisites:

Add a Web activity to a pipeline with UI

To use a Web activity in a pipeline, complete the following steps:

Create the activity

  1. Create a new pipeline in your workspace.

  2. Search for Web in the pipeline Activities pane, and select it to add it to the pipeline canvas.

    Screenshot of the Fabric UI with the Activities pane and Web activity highlighted.

  3. Select the new Web activity on the canvas if it isn't already selected.

    Screenshot showing the General settings tab of the Web activity.

    Note

    The web activity may simply appear as an icon on the toolbar as shown in the previous image, if the screen resolution doesn't allow its name to be fully spelled out.

Refer to the General settings guidance to configure the General settings tab.

Web activity settings

  1. Select the Settings tab, select an existing connection from the Connection dropdown, or use the + New button to create a new connection, and specify its configuration details.

    Screenshot showing the Lookup activity settings tab highlighting the tab, and where to choose a new connection.

  2. When you choose + New to create a new connection, you see the connection creation dialog where you can provide the base URL and credentials to connect.

    Screenshot showing the new connection dialog for the Web activity.

Note

The Connection name can be max 80 characters long.

  1. After choosing or creating your connection, complete the remaining required fields, add any required headers, or set any advanced settings. The Web activity supports GET, POST, PUT, DELETE, and PATCH methods.

Save and run or schedule the pipeline

Typically, you use the output of the Web activity with other activities, but once configured, it can be run directly without other activities, too. If you're running it to invoke a REST API that performs some action and don't require any output from the activity, your pipeline might contain only the Web activity, too. To run the activity, switch to the Home tab at the top of the pipeline editor, and select the save button to save your pipeline. Select Run to run it directly, or Schedule to schedule it. You can also view the run history here or configure other settings.

Screenshot showing the Home tab in the pipeline editor with the tab name, Save, Run, and Schedule buttons highlighted.