Forum Discussion

dnwork's avatar
dnwork
Regular Visitor
2 years ago

Call rest API through on-premise gateway

I am trying to GET data from an on-premise rest API via the OPDG. 

 

-The API works on the server (simple GET with response body in json).

-I have installed the on-premise data gateway on the server (gateway appears in fabric). 

 

When I configure the copy data activity in the pipeline (with a suitable connection specifing rest connection type and selecting the gateway and adding in the URL), the test connection/run pipeline fails.

 

What could be the issue? Supposely this is possible as per REST connector overview - Microsoft Fabric | Microsoft Learn


-Testing with URL 127.0.0.1 or localhost gives a similar error. 10.0.0.4 is the IP as per ipconfig.
-Testing with Dataflow Gen 2 with Web API activity gives the error "An exception occurred: Unable to connect to the remote server"

 

6 Replies

  • dnwork's avatar
    dnwork
    Regular Visitor

    lbendlin I want to land the api response into a lakehouse (files). I don't see how it helps me as it seems to be a custom connector for power BI desktop (?)

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi dnwork 

     

    Thank you very much lbendlin for your prompt reply.

     

    Can you tell me if your problem is solved? If yes, please accept it as solution.

     

    Regards,

    Nono Chen

    • dnwork's avatar
      dnwork
      Regular Visitor

      hi Anonymous  no. I have added the connector to the OPDG and created the connection in fabric but it does not appear in the copy data activity or dataflow gen 2. 

      Creating the connection also doesnt have a URL option which doesn't seem right.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi dnwork 

     

    Here are some ways to try:

     

    Ensure that the firewall on the server hosting the API allows incoming connections to the ports used by the API.

     

    Double check that the local data gateway is properly configured and running. Make sure it is connected to the network and can communicate with the server hosting the API. Ensure that the gateway is properly registered in Microsoft Fabric and that it is selected in connection Settings.

     

    Ensure that the REST connectors in the pipeline are configured correctly and have the appropriate urls, headers, and necessary authentication details.

     

    The error message "Unable to connect to remote server" indicates a connection problem. Check the detailed error logs in the gateway and pipeline run history for more specific information.

     

    If your network uses proxies, make sure the proxy Settings are configured correctly in the gateway. You may need to add the address of the API server to the proxy allowed list.

     

    You can review the following links to try the connection again:

     

    How to create a REST connection - Microsoft Fabric | Microsoft Learn

     

    Configure REST in a copy activity - Microsoft Fabric | Microsoft Learn

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.