How to Import an ASP.NET Web API into Azure APIM?
Asked by
CuriousCoder92
I'm looking for a straightforward way to import an ASP.NET Web API into Azure API Management (APIM). The developer mentioned that they can't enable Swagger, which complicates things for me. Has anyone dealt with this before?
Answers
Do they at least have some kind of API specification? Without that, APIM has no clue how to interact with the API. If it's in the Azure environment, you can create a backend using an existing resource like a function app, but you might miss out on operational details since APIM can't deduce request URIs on its own.
Reply to this answer
If the developer can't enable Swagger, that's a bit of a problem! They should really be providing an OpenAPI specification; it's pretty essential for APIM to function properly. It would give you a clear understanding of how the API is structured.
APIWhiz4: Yeah, I get that. But just a heads up, you don't necessarily want Swagger to be active in production. It's often generated in your pipelines, so you can still pass it along without enabling it publicly.
Reply to this answer
Check out this Microsoft documentation on importing an API from an OpenAPI specification. It might help you figure out some steps to take: https://learn.microsoft.com/en-us/azure/api-management/import-api-from-oas?tabs=powershell
Reply to this answer
Add your answer
Answers are reviewed before publication.
DataDude21: For sure! The API is hosted on an Azure VM and is publicly accessible. I could try to set up the APIM manually, but I lack the information on endpoint names and operations. Our DevOps team isn't particularly helpful, so I'm left figuring this out myself.