Azure API Apps and API Management

Azure API Apps is a service that facilitates the development, hosting, and consumption of APIs in the cloud or on-premises. It offers enterprise-grade security, easy access control, automatic SDK generation, and seamless integration with Logic Apps. This enables you to build workflows that interact with various systems easily.

Features of Azure API Apps

  1. Bring Your Own API:
    • You can host existing APIs developed in any supported language or framework, such as C#, Java, PHP, Node.js, etc.
  2. Easy Consumption:
    • Integrated support for Swagger (OpenAPI) allows for easier consumption of APIs and enhances visibility for developers.
  3. Simple Access Control:
    • Protect your API from unauthenticated access without modifying your existing code.
  4. Visual Studio Integration:
    • Direct integration with Visual Studio allows for streamlined development and deployment.
  5. Integration with Logic Apps:
    • Azure API Apps can easily integrate with Logic Apps, facilitating the interaction of various services within workflows.

Azure API Management

Overview

Azure API Management is focused on managing APIs. It allows you to monitor usage, throttle requests, manipulate input and output, and consolidate several APIs into one endpoint. API Management can manage APIs hosted anywhere, including Azure API Apps.

How API Management Works

  1. Request Handling:
    • When an HTTP(S) request is received, it is routed through API Management, which determines the API’s location (Azure API Apps or on-premises) and forwards the request accordingly. This process allows for monitoring, throttling, and manipulation of requests and responses.

API Management Portals

  • Developer Portal:
    • This portal is where developers can learn about APIs, view operations, and subscribe to products. The content is managed through the Publisher Portal accessible from the Azure portal.
  • Customizable Dashboard:
    • The dashboard can be customized with branded content, styles, and additional information for developers.

Key Concepts in API Management

  1. APIs and Operations:
    • Each API represents a set of actions available to developers (e.g., CRUD operations).
  2. Products:
    • Products are how APIs are presented to developers and can include multiple APIs.
  3. Groups:
    • Groups manage the visibility of APIs, including:
      • Administrator Group: Manages API instances and creates APIs, operations, and products.
      • Developer Group: Authenticated members building applications using APIs.
      • Guest Group: Unauthenticated users exploring APIs to assess fit for their needs.
  4. Policies:
    • Policies allow publishers to modify API behavior through configuration, such as controlling throughput.

Creating an API Using Azure Portal

  1. Create Resource:
    • Click on Create a resource, type in API Apps, and click on Create.
  2. Assign Details:
    • Assign a name to your API app, select the resource group, and choose the service architecture according to your requirements.
  3. Create the API App:
    • Click on Create to finalize the creation of your API app.
  4. Completion:
    • Your API app will be successfully created.

Publishing an API Using Visual Studio

  1. Create New Project:
    • In Visual Studio, create a new web app project.
  2. Publish:
    • Click on Publish, select Existing, and then click on Publish.
  3. Success:
    • Your web app will be successfully published to the Azure portal.