How to replace Open api spec in Azure Api Management service - azure

I have a rest api with its specification written in OAS 3.x version.
This api spec yaml file has been uploaded into Azure Api Management service
Now I have added additional endpoints to this OpenAPI spec and I need to upload it again into Azure Api Management service
Now when I login to Azure >> API Management service >> I can see a list of api .
Next to my api ( whose spec I want to upload can see three dots )
When I click on it I get multiple options one being :import IMport open api spec :
This is where I am confused .. which option should I be selecting ?
I simply need to update existing api specification with the new one ( with additional new endpoints )
I think I should be selecting Update but not quite sure ...

If you are facing issues with update, there is an alternate way. Go to your API and select 'All Operations' there you have an Open API specification editor. You can just replace your code there (copy/paste).

Related

Migrating from Mulesoft to Azure APIM

There is possibly an option to export the Mulesoft assets into OAS / RAML file, which can then be imported into Azure APIM.
But is it even possible to extract all the relevant API specifications like API, Operations, Policies etc. that is needed by Azure APIM to create APIs using the OAS file / url import ??
I'm trying to find a way to migrate from Mulesoft APIs to Azure APIM based administration, but didn't come across a proper way of doing it end to end yet.
Any directions would help.
OAS (OpenAPI Specification) can be included to Azure API Management by importing the definition file by downloading it from Mulesoft.
While migrating the API we need to make sure about API URL Suffix to our desired API Path.
Below are few steps from Azure APIM to add the OAS:
After creation of APIM, we can Add API.
We will be displayed with multiple options in adding the API like App Service, Function App, Logic App.
Refer to the blog for details steps in achieving the task of transforming API to Azure APIM.

Update swagger definition of an api in azure api management using github actions

I'm building a CI/CD pipeline to automatically deploy my application to azure. This include a webapp, and 2 REST API, running in 3 different App Services. This is working ok so far.
The only thing remaining in my solution is that I have an API management with my 2 REST API added. Those APIs are built in C#.
What I need to do, is to automatically update the swagger definition in Azure API gateway once the APIs are deployed.
I'm currently using this action https://github.com/solidify/github-action-update-azapim
But for some reason this is throwing an error in my json (the swagger file). which is incorrect, because the swagger is actually working.
Does anyone have another github action suggestion to perform this task?

Swagger connected to Azure ..now what?

I connected my swagger PetStore api to Azure using swagger Azure API Management integration.
Now that it made it in azure; Where do I implement the actual logic of querying my azure database etc?
Using swagger if I generate a Node server stub I get the following generated. But these are not available if I use API management integration.
In the Backend section I only see Logic Apps and endpoint options. I tried the Logic App stuff but it seems I need 50 logic apps if I have api that large...Am I missing something?
Maybe you need to use SwaggerHub.
The Swagger UI you are currently using belongs to the community version and should not support direct integration. Assuming there are 100 api interfaces, you need to add 100 times in azure apim.

How to automate the update of Web Service URL in Azure API management

How to automate the update of Web Service URL in Azure API management when CI/CD pipeline executes resulting in change of external IP.
You need to use the Open API specs from your APIs and use REST API / Powershell to update or add routes in API Management. There's also an extension but I am not sure if it's updated or not. You can read more about in here:
https://github.com/Azure/azure-api-management-devops-resource-kit

CI/CD / Rebuild a Azure APIM developer portal content

In the Azure APIM, is it possible to manage the content in a programmatic way -let's say the REST API or SDK- when I have some changes in Developer Portal content?
I saw there are some articles mentioned to use the iFrame but it is still required to have manual change in portal. For CI/CD, the requirement is make everything as code. So when writer updated / create / rebuild content in the APIM platform, we can use the Jenkins or another tools to make it change.
Currently it is not possible to natively manage developer's portal content programmatically, with the exception of data generated by API Management (e.g., API descriptions or API operations are fetched live and API Management's API call response is mapped to UI).
However, there are plans to allow for more control and automation with regards to developer portal content, customizations and deployments.

Resources