Azure APIM custom connector returns empty body response in Power Apps - azure-api-management

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:

Related

Azure Integration account AS2 sync MDN issue

I am performing a POC using Azure Integration account AS2. I have an issue with sending the sync MDN Message back.
I am using Mendelson to perform the testing
Sending a signed and encrypted message to Azure Logic App works
Decoding the message and validation works
Sending the sync MDN back is giving an error in Mendelson Issue
Message send back by Logic App
Found the issue:
Response Body should be:
"body": "#base64ToString(body('Decode_AS2_message')?['OutgoingMdn']?['Content'])"

Trigger for status update to send a patch method in Azure DevOps

Have been working on the integration between Azure DevOps Services and ServiceNow. Our goal is to send Change Requests from ServiceNow to Azure DevOps, where they would become Features or User Stories. Whenever there is some update on Azure DevOps, that update should be sent to ServiceNow, and vice versa.
The idea is to work with REST API.
From our investigation, we have found that it is possible to send updates to other applications through Web Hooks. We are still not sure if this will suite our needs and if we are able to work with this. The problem is that the webhooks only support the HTTP method POST while Service Now requests PATCH to update on it’s side. Is this correct is there any way of creating webhooks with PATCH method?
Other way that we can integrate is to create some software that will send response needed. However, we cannot seem to find a way to automate this response. As I understood, it will generate response only when the script run, not when work item is updated. Is there any way to trigger the sending of a json file with all information within the work item whenever the work item state is updated?
As a workaround, you can try to create a custom service hook. Here is the document you can refer to .
Marketplace provides an extension(Azure DevOps Service Hooks DSL) . This extension framework is designed to ease the development of your own REST Web Hook web site to do this type of integration. It does this by providing a MVC WebAPI endpoint and a collection of helper methods, implemented as an extensible Domain Specific Language (DSL), for common processing steps and API operations such as calling back to the TFS/VSTS server that called the endpoint or accessing SMTP services.
Is there any way to trigger the sending of a json file with all
information within the work item whenever the work item state is
updated?
I am not sure if it is possible to trigger that.
But there is a ServiceNow DevOps extension for the integration between Azure Devops and Snow. You may use that.

Azure API gateway and app service, concurrency limitation?

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.

How to upload application to Cloud Foundry using API (not CLI)?

I'm trying to develop a simple NodeJS web app that can more or less replace the Cloud Foundry (CF) CLI. I'm following the API documentation to send the application.zip to the CF Service, however I get an error response Unsupported Media Type.
For the application part of the body I'm sending the application.zip file that is uploaded from the browser.
For the resources part of the body I'm sending an empty Json array. My understanding is that as there is nothing uploaded initially there are no pre-uploaded resources that I want to specify, hence the array is empty.
With the Unsupported Media Type response, I suspect you send invalid request headers to the API. There is a CloudFoundry API client written in node.js and you may read the source code to see how they upload the app code.
If that does not help you, please refine your question and add some code that you have.

How to get mosync app to use RESTful APi and json payload

I have written a mosync application that interacts with a REST we service. I am using the AMDownload package. Wat is the right way to send the json payload required by the REST API?
The HTTP 400 Bad Request perhaps happens because the MoSync Android runtime messes up the URL, causing the server to return this error. Alternatively, perhaps the MoSync Android runtime considers the URL to be wrong, and sends back the HTTP 400 Bad Request.
Is it possible for you to test on an Android device? To see if the result is the same.
Also, is it possible to find the exact URL/data sent to the server? Perhaps using some network monitor software. If you have access to the server, can you see the request it receives? If you would enter the same request in a client like the Firefox RESTClient, do you get the same response?