Swagger connected to Azure ..now what? - azure

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.

Related

Deploying an WebAPI project (including swagger) into Azure Function

I know that the Azure function supports HTTP trigger and we can write a function that can be exposed like an API. I'm looking for an option to host a complete C# WebAPI project (multiple Rest endpoints including swagger definition) into a single Azure function.
Is this feasible? and supported? I see this scenario is completely supported in AWS Lambda. Where we can deploy a whole WebAPI project into a single lambda. Here is the demo of
the same.
I have watched the provided Video and I observed the same functionality is also available in Azure Functions.
As Direct way is not available like publishing the Web API to the Functions but migration of Web API to Functions is possible if the Web API is authenticated with any option like Open API, etc and using the APIM Service we can manage all the operations in it.
And as per the Microsoft Update, Startup.csand program.cs is unified to the program.cs file. So, I have added the required swagger configuration code in the file program.cs and tested it, working successful locally.
Another approach is you can call the Web APIs from Azure Functions securely, here is one of my approaches along with few other ways to do it.
Refer to #VovaBilyachat alternative solution on publishing .NET Core Web API to Azure that provides the glimpse of using Containers instead Functions.

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?

Does Azure APIM support GraphQL?

We have microservices setup with Azure APIM as gateway and routers to all the services in the back. Is there anyway I can introduce GrpahQl before APIM or within APIM ?
To answer your immediate question, there is no support for GraphQL via Azure APIM to date.
Its one of these feature this has been upvoted by me and many others on Azure uservoice # GraphQL introspective support within API Management / feedback forums.
Also see What additional services should Azure provide?
UPDATED MAY 2022
Preview Features
Synthetic GraphQL allows you to easily create a GraphQL API based on your existing HTTP (SOAP or REST) APIs. This allows you to quickly upgrade your API to support modern client application development without affecting your existing infrastructure.
With this availability, you can:
Change your existing APIs into GraphQL to support modern client application development. Build a GraphQL API from existing SOAP, REST, and other HTTP APIs.
Augment your existing GraphQL API with third party APIs such as Microsoft Graph, Dynamics, Shopify, and Zendesk.
Announcement: https://azure.microsoft.com/services/api-management/#overview
Documentation: https://azure.microsoft.com/updates/public-preview-synthetic-graphql/
Assuming your backend APIs are written to support GraphQL, importing GraphQL APIs is now available (in preview, at the time of writing this response) by Azure API Management: https://learn.microsoft.com/en-us/azure/api-management/graphql-api
GraphQL validation policies are also available (in preview): https://learn.microsoft.com/en-us/azure/api-management/graphql-validation-policies

Deploying multiple Azure API App Versioning

I have a requirement to deploy multiple version of the same API app where the client older application use the existing and the new clients use the new api app which is got more functionality.
Is there a way to achieve this with Azure API Apps?
I have an article that shows how to do Transparent Versioning using API Management in front of API Apps.
The basic idea is that you have a version parameter in a URL and then use the set-backend-service to change which version of the API to access.

How to use my own API instead of using mobile API in Azure

is there any way to publish my API in azure mobile service API instead of using its own. I want just to know it, because assume I have a backup server in amazon and as you know I don't have access to azure sdk in there and it means technically I cant use the API anywhere outside the azure.
Azure mobile services is actually based on the .Net web api in their C# flavor and on node.js on the Javascript side. You could surely write an API using those technology and have the same behavior. You will gain the fact of being more portable, however you will lose some of the preconfigured stuff from Mobile services.
If you are using .NET, please check this to see how to build a Web api! http://www.asp.net/web-api.
If you are using Javascript, here is where you should start : https://nodejs.org/
Both tech are quite easy to learn and super powerfull, have fun! When your API is built, you could just publish them as an azure Web APP (http://azure.microsoft.com/en-us/services/app-service/web/) or an Azure API (https://azure.microsoft.com/en-us/services/app-service/api/) instead of the mobile App
Hope it helps, if you have more questions, please ask!
You can create and publish your own custom APIs in azure mobile service. You could even access in via azure mobile service sdk in client by using "InvokeApiAsync<>()" method.
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn614130.aspx
If you want to access the api via fidder/httpclient than AZM SDK, pass the mobile service key in HTTP header as Name:'x-zumo-application' value:'application key from portal'

Resources