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.