In this article, I would brief about on-boarding APIs to Azure APIM (API Management).
Lets now, create a Azure APIM from Azure Portal, Click on new and the choose API Management, as shown.
Provide the APIM Name and create/use existing resource group. It would take minimum 10 mintues to create the APIM portal. Using Publisher Portal APIs are on-boarding APIs manually or through Swagger file and through Developer Portal consumers subscribe for the specify APIs.
Open the publisher portal and lets on-board our Product API in order to do so APIs should be part of a product. Lets create a Product called "LearnerAPI" from Products available in left pan. Then publish the product and you can set the visibility as shown.
New Group can be created from Group, here we have created Learner Group
Now lets on-board the API under LearnerAPI product from API option as shown, product WebAPI Name and service url and other options as shown
Click on the ProductAPI and then from operations tab we can add operations and provide sample request and response samples for different content-type
Here is the configuration of Get Operation with a URI parameter.
Now lets, test these operations from Developer Portal, Click on APIs page to view the list of APIs.
Lets test the GetAllProducts operation and response is rendered from API hosted in App Service, which is available in response tab.
Similarly, we here is the test execution of GetProductByID. Trace tab, provides us with log information which can be used for troubleshooting.
Lets on-board the API using Swagger.
Using Swagger Editor, lets align the Product API and download its as a Json.
Go back to the Publisher Portal and using Import option in API, import the Swagger file and provide appropriate name
Once the API is on-boarded and it can be verified from the developer portal shown we did in our earlier case.
Lets explore on policies in next article.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.