Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 3.48 KB

2 - Import APIs.md

File metadata and controls

59 lines (40 loc) · 3.48 KB

Exercise 2: Import serverless APIs in Azure API Management

In this exercise we will import just-created Function Apps into API Management to set the ground for the remaining exercises. After importing the APIs, we will test them end-to-end with interactive console in the Azure portal.

View API

Why use API Management

Azure API Management is a globally available cloud service, which lets you simplify management and publishing of your APIs. In our workshop, we will explore its benefits and use it to:

  • Abstract our APIs from their implementation
  • Aggregate them in a single location for easier governance
  • Expose them under a common domain or a static IP address
  • Publish them to external consumers or application developers
  • Control their lifecycle - from design phase to introduction of new versions with breaking changes
  • Observe their usage and behavior
  • Execute API-specific logic on requests and responses (for example, caching, throttling, JWT token validation, and more)

Learn more about the benefits of API Management in serverless architectures.

Steps

Import APIs

Perform the following steps for both Function Apps you provisioned in the previous exercise in order to import them into your API Management service. The official Azure Functions tutorial describes similar steps in more detail.

  1. Navigate to your Function App in the Azure portal.

  2. Select API Management section from the menu on the left.

  3. If you're performing this step for the first Function App, select Create new service. Otherwise, pick your API Management service name from the dropdown. If you're creating a new service, make sure it's in the same resource group and its location is set to East US. Provide organization name and administrator email and set the tier to Consumption.

  4. Leave the default Create new API option in the API dropdown.

  5. Select the option Enable Application Insights.

  6. Select the Link API button.

  7. Make sure all the Functions are selected and confirm the action with the Select button.

  8. Specify the Display name, Name, Descriptions, and API URL suffix. [Learn more about these settings in the official Azure documentation.

  9. Select Create.

    Create API

Test APIs

Perform the following steps to make sure your API has been imported correctly. Refer to the official Azure documentation for more verbose instructions.

  1. Navigate to your API Management service in the Azure portal.

  2. Go to APIs and select an API and a GET operation.

  3. Select the Test tab.

  4. Click on the Send button.

  5. You should see a 200 OK response.

    Test API

Related resources

Next steps

Package APIs with Products