Data Factory - Rest API Sink issues in Copy Activity

Edwin 1 Reputation point
2021-06-27T14:47:39.94+00:00

Hello, I need help in ADF-Rest API connectivity. My task is 'to pass data from sql table to rest API using post method'.
I'm getting the error(attached below)'Rest call was not successful'. In the linked service, I tried basic and anonymous authentication,getting same error for both.

But I can call the same API using Web task and it works fine. Don't know why the behavior is different in Web activity vs copy activity for Rest Sink.
Can anyone help me in fixing this?109644-restapi-sink-issues.png

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,196 questions
{count} votes

1 answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,386 Reputation points Microsoft Employee
    2021-06-28T19:12:11.573+00:00

    Hello @Edwin ,
    Thanks for the ask and using the Microsoft Q&A platform .

    In your case if the web activity is working fine that means that linked service is setup correctly . You should try to have the same setup for copy activity also .

    One more thing since you are using POST , I am confident that the you are passing the payload as JSON .In case of the copy activity are you converting the data as JSON ? if not you can use the JSON AUTO option in the select clause and make it happen .
    If you are still facing issues please share the pipeline snapshots , that will help us a lot.

    Please do let me know how it goes .
    Thanks
    Himanshu
    Please do consider clicking on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

    0 comments No comments