Top Azure APIM Interview Questions (2021) | CodeUsingJava
















Most frequently Asked Azure APIM Interview Questions


  1. What is Azure API?
  2. What are API-Centric Applications?
  3. What is API Management?
  4. What are the features of APIM?
  5. What are the components used in APIM?
  6. What are Groups in APIM?
  7. How do we Create an instance in APIM?
  8. How can we manage my API Management instance programmatically?
  9. How can we use Azure API Management as a passthrough?
  10. How can we run SignalR hub through Azure API Management?
  11. How can we prevent direct access to API hosted in Azure app service?

What is Azure API?

Azure API is used in providing a central interface for creating, provisioning, and managing API for Cloud and Web Application and Services. It also enables applications for communicating with each other. By using Azure API, users can monitor the health of APIs, identifying errors, configuring throttling, rating limits, etc.

What are API-Centric Applications?

API Centric Application uses APIs for exchanging data with all the other applications. It also enables front-end and back-end for communicating. In building API-Centric Applications all developers can design functions and classes for operating with elements and can be implemented in a variety of languages.

What is API Management?

Azure API Management(APIM) helps us in creating consistent and modern API Gateways in existing Back-end Services.It helps in publishing APIs for external, partner and internal developers for unlocking the potential of its Data and Services.API Management also provides core competencies for ensuring an API Program by developer engagement, business insights, analytics, security, and protection.

API Management


What are the features of APIM?

  • Managing APIs across On-premises and Clouds - helps in deploying API Gateway side-by-side by the APIs hosted in azure.
  • Protecting our resources - helps in controlling data and services which are exposed to employees, partners, and customers.
  • Accelerating Business - used for building apps and delivering immediate value to our customers by API first approaches.
  • Improving API discoverability - helps in creating a customizable developer portal for all our APIs.

What are the components used in APIM?


API Management

Components used in APIM are:
  • API Gateway - helps in accepting API Calls and Routes.
  • Azure Portal - helps in defining or importing API Schema.
  • Developer Portal - helps in reading API Documentation.

What are Groups in APIM?

Groups in APIM are used in managing the visibility of products to the developers. There are 3 types of groups:
Administrators - used for managing APIM Services instances, by creating APIs Operations and products which are used by Developers.
Developers - they are customers that helps in building application using our APIs.
Guests - help by granting read-only access like the ability for viewing APIs.

How do we Create an instance in APIM?

We can create an instance by using:
Azure CLI
Azure Portal
Azure PowerShell
Visual Studio Code
ARM Template

How can we manage my API Management instance programmatically?

Yes, we can manage API Management Programmatically by using APIM REST API, Azure APIM Service Management library SDK, Windows Deployment Services.

How can we use Azure API Management as a passthrough?

We can use Azure API Management as a passthrough by using the following command:
<policies>
    <inbound>
        <base />
        <set-variable name="baseUrlSearch" value="https://mysearchapi.com/" />
        <set-variable name="matchSearch" value="proxy/search" />
        <set-variable name="isRoutingComplete" value="false" />
        <set-variable name="apiVersionDefaultSearch" value="1.0" />
        <choose>
            <when condition="@{return context.Request.Url.Path.Contains(context.Variables.GetValueOrDefault<string>("matchSearch"));}">
                <set-backend-service base-url="@(context.Variables.GetValueOrDefault<string>("baseUrlSearch"))" />
                <rewrite-uri template="@(context.Request.Url.Path.Replace(context.Variables.GetValueOrDefault<string>("matchSearch"), ""))" />
                <set-header name="Api-Version" exists-action="skip">
                    <value>@(context.Variables.GetValueOrDefault<string>("apiVersionDefaultSearch"))</value>
                </set-header>
                <set-variable name="isRoutingComplete" value="true" />
            </when>
            <when condition="@(!context.Variables.GetValueOrDefault<bool>("isRoutingComplete"))">
                <return-response>
                    <set-status code="400" reason="Bad Request Through Proxy" />
                </return-response>
            </when>
        </choose>
    </inbound>
    <outbound>
        <base />
    </outbound>
</policies>


How can we run SignalR hub through Azure API Management?

We can used Azure SignalR Service for negotiating the endpoint.

API Management


How can we prevent direct access to API hosted in Azure app service?

We can prevent the direct access by using the following steps:
Shared Secret helps in a certain value in APIM and in checking the value at our backend.
Managed Identity helps in enabling managed identity in APIM Services and in sending the token to our backend.
IP Filter helps in checking APIM IP as source at the backend.
VNet helps in putting our backend in the same VNet and in blocking access from the backend.