Needed this in a pinch today. We wanted to add a Logic App to a Power App and for that you need to create a custom connector. This requires the Logic App as an OpenAPI definition. Turns out the Azure REST API supports this. You have to do a POST request to:
1 |
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger?api-version=2016-06-01 |
Do this via the Az command:
1 |
az rest -m post -u https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger?api-version=2016-06-01 |
Or PowerShell (notice the Url doesn’t include the base):
1 |
Invoke-AzRestMethod -Method POST -Path "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger?api-version=2016-06-01" |