ADF copy activity to read post api request

arkiboys 9,386 Reputation points

Hello, Using the copy activity, in source, I created a source dataset to read the api post... In the request method I selected post in the request body I added the parameters the api is expecting I now can read json data. Question: Instead of adding parameter to the Request Body, how is it possible I pass these parameters into the REST source dataset instead? Please note, for my other projects I used GET as request method and I was able to add parameters into the dataset but it seems if the request method is POST then even if you add parameters to the dataset then it gives error and the only way post works seems to be by adding the parameters to the Request Body and NOT the dataset. Can you confirm? Thank you

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

Accepted answer
  1. Richard Swinbank 292 Reputation points MVP

    That’s correct. Passing the parameter in a GET request only happens to be possible because HTTP GET accepts data in the URL query string rather than the request body.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Richard Swinbank 292 Reputation points MVP

    POST requests send data in an HTTP request body by design ( -- that's a feature of the HTTP protocol, not a design choice made by ADF.

    ADF supports choosing between HTTP verbs (e.g. GET vs POST) in the Copy activity itself -- you can't make GET/POST behaviour a parameter of a dataset or linked service, so you can't make the POST request body a parameter either.