Dhiraj
Dhiraj

Reputation: 3696

Where to specify REST API parameter for GET method in ADF Web Activity

Lets say we have the following URL

https://management.someurl.com?api-version=2020-06-01

Now I have a list of parameters for the REST API call. The method I am trying to call using the web activity is GET -- so there is no body section there. So where do I exactly specify these parameters? Header is clearly not meant for this purpose as these are specific application level API parameters. In case of POST calls I could successfully specify the parameters in the body section of the web activity.

Upvotes: 0

Views: 6498

Answers (2)

Joseph  Xu
Joseph Xu

Reputation: 6043

Add to @Raunak Jhawar's answer. You can define some variables previously, as follows: enter image description here

Then you can add dynamic content to the URL field.

@concat(variables('BaseUrl'),concat(variables('Path'),concat('?productId=',variables('QueryParam'))))

enter image description here

The input shows:

enter image description here

Upvotes: 2

Raunak Jhawar
Raunak Jhawar

Reputation: 1651

You should create dataset parameters.

In this case, create a base URL parameter which will have the base URL (i.e. the management.someURL.com URL)

Create a relative URL parameter which will have details of the query parameters. Use dynamic expressions in dataset configuration to create this query string.

Alternatively, you can follow this blog to understand the design process.

Upvotes: 1

Related Questions