API connections resources work as the bridges for Logic App to communicate with other services. While most of them are used to connect to cloud resources, a few of them leverage On-premises Data Gateways to connect local data sources to Azure. However, we may find that it is not easy to check which On-premises Data Gateway (OPDG) is used by which API connection resource.
Find out which On-premises Data Gateways are used by which API connection resources.
The most known way to check OPDG used by a connector is by inspecting the Logic App designer.
When creating API connections with OPDG, we can find the OPDG used from the connection list in the Logic App designer.
However, this method seems unhandy as we need to go every Logic App’s designer mode and may cause unwanted change. My preferred way is to check the sourced OPDG from the JSON definition of an API connection resource.
From a Logic App, open the API connection blade, and choose the API connection which is using the OPDG.
From the API connection resource main page, click on “JSON View” on the far right.
In the JSON definition of the API connection, you will find the OPDG’s name, resource ID in the “properties” > “parameterValues” > “gateway”.
One more step:
As we have found out that OPDG information can be extracted from the JSON definition of an API connection resource. We can use a PowerShell script to find out all API connections which is using an OPDG.
An active Azure subscription.
An Azure account, which has the permission to read all resources within the above subscription.