Jul 27, 2026

Publish APIs in Azure API Management

We have seen how to commission and API Management service, Portal and check OOB API. Lets see how we can add our own API to the service and access it as a end user.

I found https://petstore3.swagger.io/api/v3/openapi.json as a good one to try out.

Now I go to API and add as a OpenAPI.


Now I provide the OpenAPI specification which is the above URI of API. Also I gave suffix which is being added to the base url as below.


1. Test within Azure API Management

Now we can see newly added API along with its operations.

In order to test, I selected a operation (i.e Find Pet By Id) and passed 10 as the Id. Once click send I got 200 OK aling with response back. NowI know this is working.

2. Access via Developer Portal

Now go to Products and click Add to create new product. (Alternatively you can add this API to existing Producs to have common subscription. Eveybody subscribed to that product will get access to the new API as well)


Once Add it you will see it in the Product list as a Published Product.


Now browse the Portal and login as a end user. Then you will see this product which end user need to subscribe. Once done, end user will see active entry for this under Profile.


Now user can go to API tab and test the API by clicking the API, select a operation and select Try this Operation and passing any parameters.


2. Discussion

At the time of testing the API in Azure, we could see a url called Request URL as below. (Will call A) This URL has a prefix added by us during configurig the API. 
https://apimrnsume2.azure-api.net/DummyPetstore/pet/{petId}

At the Design tab of the API we could see a url called Backend URL as below. (Will Call B)
https://petstore3.swagger.io/api/v3

If we add correct Parameters (https://apimrnsume2.azure-api.net/DummyPetstore/pet/10) and try browsing A in a new Browser, it will not work. If we modify B the same way (https://petstore3.swagger.io/api/v3/pet/10) and browse it will return values.

This explains that we have added extra security layer to the APIs we publish via Azure API Management service. Backned one was freely browseable since its a public API without security. 

By any chance, we need to make our API to be freely available we can simply go to Settings of the API and clear the Subscription Required flag,


Related Reads:

References: