Have an odata api endpoint hosted in App Service behind API Management Gateway, but getting concurrency call issues, trying to identify where the problem occurs. We use a standard tier of API gateway. Is there a concurrent call limit? Sorry trying to scan through documentation didn't find one straight answer.
One more question, what is the simplest way to track the request and response the API gateway generates? Thanks
Adding the header Ocp-Apim-Trace: true to a request will return a link to a complete trace of the request and respond. This only works if you are using a subscription key for an administrator user.
Related
Is there a way to capture network traces for azure api management when we make a REST API call?
In my case, it makes a REST API call and the request goes through custom DNS to the destination resource. I wanted to capture the network traffic to analyze in case of any transient failures.
No, this capability does not exist so far, you have to open support ticket and get help from the support team.
I’m going through the wizard to create a custom connector in Power Apps to call a simple Get operation in Azure APIM. I can call the API fine using Postman, Fiddler and CURL. However, when I try to test the connector using the test tab I’m getting a 200 OK but the response body is empty:
It’s worth mentioning that this issue, with empty response body, occurs only for APIs in Azure APIM. If I hit the backend API, hosted in Azure App Service, without going through Azure APIM I’m receiving a response body. I have tested with other public APIs on the internet which works fine as well. The problem with empty response seems to have something to do with the integration between Power Apps and Azure APIM.
Any assistance is highly appreciated.
With the help of Azure Application Insights logs, I discovered that this is ralated to CORS. To resolve the issue, I added the https://flow.microsoft.com to Azure APIM CORS policy to allow calls from the PowerApps test console to come through, like so:
I could front an http REST API with Azure API Manager and call it.
Is there a way to front a JMS queue by an API?
1) To add a request to a JMS queue by calling the Azure proxy API
2) To read the response from another queue and deliver back to the client.
Only if JMSQ has an HTTP API, not sure if it does.
In general it would be really hard to make APIM wait for arbitrary event holding on to a client's request to provide an HTTP response. So I'm inclined to say no.
we have an production issue where the order is submitted twice. Currently we have an API for order and we are exposing this to client using API management and in these we have policies for URL mapping for customer facing to actual .
Now , our actual API got 2 request so we thought customer submitted twice but they have confirmed that they have not submitted twice , so either there is issue with API management which fired 2 request.
How can i Identify the request received by the API management ?
Is there any chance that API management will fire the request twice ?
Appreciate any pointers
The only way to fire request twice in APIM would be by the means of Retry policy or manually using SendRequest. Otherwise it should be a client calling your API two times. Each request in APIM get it's own unique id accessible in policies as context.RequestId, this is the main way to track and identify them. But these ids are produced inside APIM itself thus are useful only if you're tracking a call from APIM and into backend.
Your best option now is to try to identify requests by client ip, method, uri, and time frame. APIM allows you to grab logs for certain periods of time (better if kept short) in JSON or CSV with data I mentioned above. To do that look into byRequest report (https://learn.microsoft.com/en-us/rest/api/apimanagement/reports#ReportByRequest), grab JSON/CSV and try to identify calls of interest,
For future you could look into onboarding your service to azure monitor (https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-use-azure-monitor) or log analytics those provide easier way to traverse logs.
I am trying to develop a chrome extension in which I need to use 3rd party Oauth2 authentication. The third party service I want to use, only supports POST requests. But it seems that the launchWebAuthFlow method in the Chrome Identity API, only supports sending GET requests, as all the query parameters are sent in the URL itself. Is this correct? If yes, how should I do authentication?
UPDATE : The API I want to connect is that of Pocket
Partially you're right about POST requirements. But it is only used to initialize Oauth flow.
According to the documentation:
1) You must make a POST request to obtain a request token from Pocket auth service
2) Redirect user to the auth page: https://getpocket.com/auth/authorize?request_token=YOUR_REQUEST_TOKEN&redirect_uri=YOUR_REDIRECT_URI
Which means that you have to make a simple XHR to retrieve request token and then you can use chrome.identity.launchWebAuthFlow function to begin Oauth flow.
Did you try launchWebAuthFlow? You may find that it works. Once authenticated, you can exercise the API via POST, using XMLHttpRequest. (launchWebAuthFlow only handles the authentication, not the API itself.)