Table of contents

Official Content

This document explains details about the deployment to Azure API Management (APIM).

You can deploy to APIM when deploying Azure Http functions and when deploying mobile (angular) app services. In both cases, deploying to APIM is optional, although it is recommended.

Before going on with this document, read Azure Http-triggered functions.

  • When deploying mobile app services to an Azure Serverless architecture, you use the "Microsoft Azure Serverless (backend services)" deployment target of the Application Deployment tool.
    First, note that you have to set the Generate OpenAPI interface property to Yes and OpenAPI version property to either 2.0 or 3.0, and do a rebuild all in the model, previous to deploying to Azure Serverless.
    The following error is shown if the property is no set:
    "Error: All the objects of the Deployment unit must have Generate OpenAPI Interface property set to Yes.  Alternatevely, set to Yes the property at the generator level, and do a rebuild all."
  • When deploying KB services (Rest services, API Objects) you use the "Microsoft Azure Functions" deployment target.

APIM deployment properties

To deploy to APIM, you need to configure the following deployment properties at the API Management Settings of the deploy dialog inside GeneXus:

APIM service name

Name of the API Management service instance.

APIM resource group

Azure API Management resource group.

API Identification

API revision identifier. It must be unique in the current API Management service instance.

API display name

Display name of this API.

API backend service URL

Absolute URL of the backend service implementing this API. 

It corresponds to the URL given for the Azure function app.

E.g: https://MyFunctionApp.azurewebsites.net

image_202212212918_1_png

API path

Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance.

E.g: travel

API subscription required

If true, the API requires a subscription key on requests. The recommended value for services being called from mobile clients is False.

Example

Consider the following deployment configuration:

image_202212212138_1_png

With the above settings, the API can be seen as follows in the Azure portal (going through the API Management service):

image_2022122121529_1_png

To run the app and use the services just deployed, configure the Services URL property as follows:

Warning: You must set Services URL Mode property to "Absolute" value.

image_2022122121731_1_png

Note that the URL is the Gateway URL shown in the Azure portal for the APIM service, followed by the API path you configured on deployment.

Then, at runtime, the /rest suffix in the URL is added automatically by the mobile clients to make the calls, as shown in the figure:

image_202212212338_1_png

GatewayURLAPIM

See also

For angular front end applications which use Azure serverless for deploying their backend, see HowTo: Deploy Angular Frontend applications using serverless backend

Interesting links

How to tackle the cold start problem of Azure Function serverless app.


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant