![]() ![]() Web apps do not require a APIM in front, which is why we cannot blindly use the Microsoft reference architecture. This is the key difference to a web app, the presence of Azure APIM. I will implement the API as a ASP.Net Core app for this post but the concept will apply to function apps in consumption tier.Ī highly recommended way and adopted by most enterprises is to expose your APIs through an Azure API Management (APIM) Gateway.Ī typical API architecture will look like: Often the examples shown don’t take into account the security aspects in conjunction with HA.ĪPI apps in Azure App Service can be deployed as an ASP.Net Core application or as a function app. Web applications but my focus is on API apps which is different. Microsoft has a published reference architecture for The deployments to Azure can be done from the Azure portal, I have used Azure Cli wherever possible. My code examples will be in C#/.Net core as that is the language I am most familiar with. We can expend it in a JSON editor to more easily read it.In this post I will delve into designing and building Highly Available APIs hosted on Azure App Service.Īpp Service is a very popular PAAS service in Azure that is used to host web applications, REST APIs and mobile backends on either Windows or Linux based server environments.Īpp Service is ultra developer friendly and at the same time offers very robust scalability and security features suitable even for large Enterprises. This is a JSON payload with all the tracing. The value of that header is a URL pointing to a blob in some blob storage. If we send that request now, we should receive a very similar response, except we now have an header Ocp-Apim-Trace-Location in the response: Let’s add an header on the request with key Ocp-Apim-Trace and value true. We can’t know which policy was fired and how they transformed the request. Activating the TracingĪlthough the call was successful, there is no way to see what happened inside API Management. Nothing very exciting, but the request was a success (i.e. We can see what API Management responded. If we then select the Headers in the response: If we click send, Postman is going to send the HTTPS request to Azure API Management. This is how we pass the subscription key to a request. ![]() We will add an header with the key Ocp-Apim-Subscription-Key and the value of the subscription key we just copied. We will paste the URL we picked in the last section (in our case ). …) on the right to the first product ( Starter) and select Show/hide keys. For that, let’s go to the Subscriptions pane, select the ellipse (i.e. Fiddler, or custom applications.įirst, we’ll need a subscription key in order to use the API. This can easily be done with other tools, e.g. ![]() Calling the API from postman (or any client) This is what we want to replicate outside the Portal. If we then select the Trace tab, we should see the traces we are after. We should quickly see the result coming by. If we press the Send button, the Portal will initiate a test request. the first GET Retrieve resource) and the Test tab. Let’s open the APIs pane, select the Echo API api, the one-before-the-last-one operation (i.e. This API comes with any API-M sku.įor the purpose of this article, we can simply create a Developer SKU API-M. This article is an extension to the online article about API debugging. In this article, we’ll see how we can use tracing to see exactly what we would see in the Portal experience. Maybe you did put authentication logic in and the client fails to pass, but you do not know which policy is failing and why. Postman) and it fails? You have no visibility into what failed. What happen when you test it from another client platform (e.g. It is quite easy to create an API in API-M, connect it to a back-end API and test it in the portal. Menu Tracing request in Azure API Management SolutionĪzure API Management (API-M) is an API Gateway solution. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |