API Management - how to automatically refresh API definition

Greg Yvkoff 151 Reputation points
2020-07-21T19:35:17.073+00:00

When I add a new http method to my app service and deploy it, how do I get API Management to automatically reflect the change?

For example, I create a new HTTP GET method, and delete a different existing HTTP GET method. When I deploy the app service, the changes do not reflect in API Management. I have to manually import the json/swagger document for the change to show up in API Management.

  • API app is using swagger documentation
  • At App Service side, I tried linking API Management and/or API definition file to the API app, but that did not update API Management
  • At API Management side, I tried linking the App Service to the API, but I got errors
  • I am using Terraform to deploy changes for App Service and API Management (if it matters)

I am not using swagger versioning as this is all for internal use, I just want to refresh/replace the documentation and not append to it as it gets really cluttered.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,751 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,879 questions
{count} votes

Accepted answer
  1. Pramod Valavala 20,591 Reputation points Microsoft Employee
    2020-07-22T07:42:29.347+00:00

    While there is no built-in auto-synchronization of API Definitions, there is an Official DevOps Resource Kit that provides guidance on automating such a task. The recommendation is to have a set of ARM Templates for APIM that are maintained alongside the API Service code.

    Another approach would be to leverage APIM's ARM REST API and implement a service that monitors the API Definition, updating the APIM API in an automated manner. The downside of this approach would be that policies, if any, would have to still be defined somewhere.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Aswin Raaj 1 Reputation point
    2022-02-24T12:24:55.607+00:00