Import a Logic App as an API
This article shows how to import a Logic App as an API and test the imported API.
In this article, you learn how to:
- Import a Logic App as an API
- Test the API in the Azure portal
- Complete the following quickstart: Create an Azure API Management instance
- Make sure there is a Logic App in your subscription that exposes an HTTP endpoint. For more information, Trigger workflows with HTTP endpoints
Go to your API Management instance
In the Azure portal, search for and select API Management services.
On the API Management services page, select your API Management instance.
Navigate to your API Management service in the Azure portal and select APIs from the menu.
Select Logic App from the Add a new API list.
Press Browse to see the list of Logic Apps with HTTP trigger in your subscription.
- Logic apps without HTTP trigger will not appear in the list.
Select the logic app.
API Management finds the swagger associated with the selected app, fetches it, and imports it.
Add an API URL suffix.
- The suffix uniquely identifies this specific API in this API Management instance.
If you want the API to be published and available to developers, Switch to the Full view and associate it with a Product. We use the "Unlimited" product in this example.
- You can add your API to a product either during creation or later via the Settings tab.
Products are associations of one or more APIs offered to developers through the developer portal. First, developers must subscribe to a product to get access to the API. Once subscribed, they get a subscription key for any API in that product. As creator of the API Management instance, you are an administrator and are subscribed to every product by default.
Each API Management instance comes with two default sample products:
Enter other API settings.
- You can set these values during creation or later by going to the Settings tab. The settings are explained in the Import and publish your first API tutorial.
Test the API in the Azure portal
Operations can be called directly from the Azure portal, which provides a convenient way to view and test the operations of an API.
Select the API you created in the previous step.
Press the Test tab.
Select the operation you want to test.
- The page displays fields for query parameters and headers.
- One of the headers is "Ocp-Apim-Subscription-Key", for the product subscription key associated with this API.
- As creator of the API Management instance, you are an administrator already, so the key is filled in automatically.
- When the test succeeds, the backend responds with 200 OK and data.
Append other APIs
You can compose an API of APIs exposed by different services, including:
- The OpenAPI Specification
- A SOAP API
- A Web App hosted in Azure App Service
- Azure Function App
- Azure Logic Apps
- Azure Service Fabric
Append a different API to your existing API using the following steps.
When you import another API, the operations are appended to your current API.
Go to your Azure API Management instance in the Azure portal.
Select APIs on the Overview page or from the menu on the left.
Click ... next to the API that you want to append another API to.
Select Import from the drop-down menu.
Select a service from which to import an API.
Every Logic App has manual-invoke operation. To comprise your API of multiple logic apps and avoid collision, you need to rename the function.
- API import limitations
- Import an OpenAPI specification
- Import a SOAP API
- Import a SOAP API and convert to REST
- Import an App Service API
- Import a WebSocket API (preview)
- Import an Azure Function App
- Import an Azure Logic App
- Import a Service Fabric service
- Edit an API