I'm calling a back-end API from Azure API Management (APIM) and I need to provide the JSON schema for my custom connector in Logic Apps/Flow.
Depending on the content of the response I'm getting, I need to perform additional calls in order to provide an enumeration/drop down.
Consider a response from the back-end API, like this:
{
"member1": {
"prop": "content"
},
"member2": {
"prop": "content",
"datasource": "http://someurl.com/api/member2/content"
},
"member3": {
"prop": "content"
},
"member4": {
"prop": "content"
"datasource": "http://someurl.com/api/memberfour/content"
}
}
I need to perform additional calls to the URLs in the "datasource" members in order to provide additional data, but these are obviously dynamic, depending on the call I'm performing. I'm a bit stuck since I can't seem to perform a send-request policy for a dynamic number of calls and URLs. How would I best approach this?
If I understand the scenario correctly, I don't think you want to use APIM to make the calls to the datasource URLs because then you wouldn't be able to get those results back to logic apps. I think what you are looking for is the x-ms-dynamic-values
which is documented here
You can use this extension to describe both the primary operation which will provide your content and some secondary operations that will return the lists used to fill the drop downs for the Logic Apps UI. You will probably need to create additional APIM operations to surface those lists.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With