ListCallbackUrl via REST

If you want to deploy an API Management Service with one or more operations that have a Logic App as their backend service and you want to use an ARM template for deployment, you probably will want to use the listCallbackUrl statement, like below:

listCallbackUrl(resourceId(parameters(‘backendResourceGroupName’), ‘Microsoft.Logic/workflows/triggers’, parameters(‘backendLogicAppName’), ‘manual’), ‘2017-07-01’)

But what if you want to check which value is returned. In that case you can go to the site below:

This site enables you to make a REST call to ListCallbackUrl (and many other interesting calls) into Azure. First you will have to log in using your Azure Account. Then you will need to specify resource group name, logic app name and trigger name. When you click [Run] you will get the following information:

“value”: “[logicAppId]/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=[sigvalue]”,
“method”: “POST”,
basePath“: “[logicAppId]/triggers/manual/paths/invoke”,
“queries”: {
“api-version”: “2016-06-01”,
“sp”: “/triggers/manual/run”,
“sv”: “1.0”,
sig“: “[sigvalue]”

From the base path, you can extract the url of the logic app backend:[logicAppId]/triggers/

In your ARM template you will see:

"url": "[substring(listCallbackUrl(resourceId(parameters('backendResourceGroupName'), 'Microsoft.Logic/workflows/triggers', parameters('backendLogicAppName'), 'manual'), '2017-07-01').basePath,0,add(10,indexOf(listCallbackUrl(resourceId(parameters('backendResourceGroupName'), 'Microsoft.Logic/workflows/triggers', parameters('backendLogicAppName'), 'manual'), '2017-07-01').basePath,'/triggers/')))]"

The signature value is typically used in a rewrite uri policy. The xml snippet below is a policy statement that you can find in the API Management designer in the Azure Portal.

<rewrite-uri id="apim-generated-policy" template="/manual/paths/invoke/?api-version=2016-06-01&amp;sp=/triggers/manual/run&amp;sv=1.0&amp;sig={{service-v1-dev_operatie}}" />

The named value is filled using the following ARM template statement:

[listCallbackUrl(resourceId(parameters('backendResourceGroupName'), 'Microsoft.Logic/workflows/triggers', parameters('backendLogicAppName'), 'manual'), '2017-07-01').queries.sig]