azureazure-logic-appsazure-management-api

Interrogate capabilities of a Logic App connector (actions, triggers)


I found how to get a list of Logic App connectors (Microsoft.Web locations/managedApis). Which gives back some JSON like below (for Gmail for example). Is there a way to understand the capabilities of a given connector? Which actions does it have, triggers, etc.?

I notice there are references to runtime URLs which appear to be Azure API Management URLs (in which I am not an expert). Maybe something there?

{
  "properties": {
    "name": "gmail",
    "connectionParameters": {
      "token": {
        "type": "oauthSetting",
        "oAuthSettings": {
          "identityProvider": "Google",
          "clientId": "972489997876-8op8gd42ke0d43bompbilqqn9oh06r4u.apps.googleusercontent.com",
          "scopes": [
            "https://mail.google.com/"
          ],
          "redirectMode": "GlobalPerConnector",
          "redirectUrl": "https://global.consent.azure-apim.net/redirect/gmail",
          "properties": {
            "IsFirstParty": "False",
            "IsOnbehalfofLoginSupported": false
          }
        },
        "uiDefinition": {
          "displayName": "Sign in with Google credentials",
          "description": "Sign in with Google credentials",
          "tooltip": "Provide Google credentials",
          "constraints": {
            "required": "true"
          }
        }
      }
    },
    "connectionParameterSets": {
      "uiDefinition": {
        "displayName": "Authentication Type",
        "description": "Type of authentication to be used."
      },
      "values": [
        {
          "name": "shared-application",
          "uiDefinition": {
            "displayName": "Use default shared application",
            "description": "Sign in using the standard Google app."
          },
          "parameters": {
            "token": {
              "type": "oauthSetting",
              "oAuthSettings": {
                "identityProvider": "Google",
                "clientId": "972489997876-8op8gd42ke0d43bompbilqqn9oh06r4u.apps.googleusercontent.com",
                "scopes": [
                  "https://mail.google.com/"
                ],
                "redirectMode": "GlobalPerConnector",
                "redirectUrl": "https://global.consent.azure-apim.net/redirect/gmail",
                "properties": {
                  "IsFirstParty": "False",
                  "IsOnbehalfofLoginSupported": false
                }
              },
              "uiDefinition": {
                "displayName": "Sign in with Google credentials",
                "description": "Sign in with Google credentials",
                "tooltip": "Provide Google credentials",
                "constraints": {
                  "required": "true"
                }
              }
            }
          },
          "metadata": {
            "allowSharing": false
          }
        },
        {
          "name": "byoa",
          "uiDefinition": {
            "displayName": "Bring your own application",
            "description": "Sign in using your own Google app. For more details see https://docs.microsoft.com/connectors/gmail/#authentication-and-bring-your-own-application."
          },
          "parameters": {
            "token-byoa": {
              "type": "oauthSetting",
              "oAuthSettings": {
                "identityProvider": "Google",
                "scopes": [
                  "https://mail.google.com/"
                ],
                "redirectMode": "GlobalPerConnector",
                "redirectUrl": "https://global.consent.azure-apim.net/redirect/gmail",
                "properties": {
                  "IsFirstParty": "False",
                  "IsOnbehalfofLoginSupported": false
                }
              },
              "uiDefinition": {
                "displayName": "Sign in with Google credentials",
                "description": "Sign in with Google credentials",
                "tooltip": "Provide Google credentials",
                "constraints": {
                  "required": "true"
                }
              }
            },
            "token-byoa:clientId": {
              "type": "string",
              "uiDefinition": {
                "displayName": "Client ID",
                "description": "Client (or Application) ID of your Google application",
                "constraints": {
                  "required": "true",
                  "hidden": "false"
                }
              }
            },
            "token-byoa:clientSecret": {
              "type": "securestring",
              "uiDefinition": {
                "displayName": "Client Secret",
                "description": "Client secret of your Google application",
                "constraints": {
                  "required": "true",
                  "hidden": "False"
                }
              }
            }
          },
          "metadata": {
            "allowSharing": false
          }
        }
      ]
    },
    "metadata": {
      "source": "marketplace",
      "brandColor": "#20427f",
      "useNewApimVersion": true
    },
    "runtimeUrls": [
      "https://logic-apis-eastus.azure-apim.net/apim/gmail"
    ],
    "generalInformation": {
      "iconUrl": "https://connectoricons-prod.azureedge.net/u/laborbol/releases/ase-v3/1.0.1622.3202/gmail/icon.png",
      "displayName": "Gmail",
      "description": "Gmail is a web-based email service from Google. With the Gmail connector, you can perform actions such as send or receive e-mail messages, and trigger flows on new e-mails.",
      "termsOfUseUrl": "https://az818438.vo.msecnd.net/tos/gmail/tos.html",
      "releaseTag": "Production",
      "tier": "Standard"
    },
    "capabilities": [
      "actions"
    ],
    "isExportSupported": false
  },
  "id": "/subscriptions/xxx/providers/Microsoft.Web/locations/eastus/managedApis/gmail",
  "name": "gmail",
  "type": "Microsoft.Web/locations/managedApis",
  "location": "eastus"
}

Solution

  • You should be able to query the mgmt service to do this below is an example of a request that pulls that info for the PowerBI connector. Just porvide your sub and location.

    https://management.azure.com/subscriptions/{yoursub}/providers/Microsoft.Web/locations/{yourlocation}/managedApis/powerbi/apiOperations?api-version=2018-07-01-preview&$filter=properties/trigger eq null