Azure Data factory Copy From REST API to Sink

Anonymous
2023-02-16T06:50:17.6066667+00:00

Hi,

I am pulling API data. I have a copy activity with the source as REST and sink as JSON to store in ADLS. The link service test for the REST is successful. Also I'm able to "preview data" on source in Copy activity But during the debug run following error throws up-

ErrorCode=HttpFileFailedToRead,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to read data from http server. Check the error from http server:The remote server returned an error: (403) Forbidden.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Net.WebException,Message=The remote server returned an error: (403) Forbidden.,Source=System,'

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

3 answers

Sort by: Most helpful
  1. Anonymous
    2023-02-16T11:43:18.5566667+00:00

    Sally Dabbah Thanks for your answer, the container is behind firewall therefore it is causing the issue

    1 person found this answer helpful.
    0 comments No comments

  2. Sally Dabbah 5 Reputation points Microsoft Employee
    2023-02-16T09:26:43.0733333+00:00

    Hello Dubey, Can you please provide more information regarding the response that you get from your restAPI, is it a Json structured or CSV?

    0 comments No comments

  3. Sally Dabbah 5 Reputation points Microsoft Employee
    2023-02-16T10:04:02.8366667+00:00

    i think you should change your source and sink configuration in the Copy activity.
    Here is a simple POC that i did:

    added a Copy activity to a pipeline.

    in Source:

    User's image

    Source Dataset: i added only the catfact URL.
    User's image

    Sink:

    A Json in ADLS account
    User's image

    Sink Dataset:

    User's image

    so the sink dataset is a Json file linked to my ADLS account.

    Output in ADLS:
    a Json file containing the result from the API.

    User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.