cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

JSON SCHEMA: Which is correct?

I'm working through some Custom Connector challenges and came across something interesting. Instead of continuing to try the Custom Connector, my friend suggested trying the API call in Flow then calling the Flow from PowerApps.

Here is what the Flow looks like:

customConnectorFlow.png

It worked without issue which is just incredible seeing how much time I spent on it vs. the Custom Connector today!
customConnectorFlow7.png

With the problematic Custom Connector I mentioned earlier, the Schema I "Imported from Example" was from a successful call using the (excellent) Azure Map API Docs:

customConnectorFlow1.png

Imports just fine... (notice the Body parameters)

customConnectorFlow2.png

API Tests and Responds just fine...

 

customConnectorFlow3.png

...BUT when used in a PowerApp with the function:

ClearCollect(colAzureTimezone,
    azureMapTimezone.AzureMaps("1.0","json",{query: Label1.Text})
)
// Also tried Location.Latitude & "," & Location.Longitude in lieu of "Label1.Text" above. Label1 holds the same function.

, the Custom Connector returns a blank Collection in the App...
customConnectorFlow4.png

Since the Flow works just fine, I decided to paste its schema into the Custom Connector. LOOK AT HOW DIFFERENT THE BODY PARAMETERS ARE!

customConnectorFlow5.png

Yet the Test is successful as well...

customConnectorFlow6.png

Yes the darn Connector returns a (different) blank Collection...

customConnectorFlow8.png

 

  • I've defined the schema two ways
    • One of them works great with Flow when called by the PowerApp
    • Both of them Test successful in the Custom Connector "Test" area
    • Neither of them work with the Custom Connector when called by the PowerApp. 

Am I losing it or do you all see this as crazy too!?!

3 REPLIES 3
Highlighted
Super User
Super User

Re: JSON SCHEMA: Which is correct?

Hi @ericonline

I suspect your problem might be caused by a combination of authentication and an incorrect definition of the API response.
I created a custom connector and with my implementation, I was able to return data into my collection with the following formula.

ClearCollect(colAzureTimezone,
             AzureMap.GetTime("EnterYourAPIKeyHere...rbhBxfleNR6BSlBp", "1.509865, -0.118092", "1.0")
)


colAzure.JPG
I've uploaded my OpenAPI definition here - perhaps you could use this to create a new custom connector? If it works, we could maybe work back from this to answer your question more specifically.

 

 

Highlighted
Super User
Super User

Re: JSON SCHEMA: Which is correct?

Hi @timl. Thank you for looking into my madness here.

The API Key is in the URL, just not visible in the PowerApp function. This is done by setting the visibility to "Internal" in the Custom Connector itself. I'm using this exact call in my personal Azure/PowerApps instances. The issues reported have all been in my enterprise Azure/PowerApps world.

Here is the call (personal):

2018-12-14-07-09-36.png

Here is the successful Collection (personal):

2018-12-14-07-09-59.png

Here is the subscription-key parameter set to "Internal" so that it doesn't need to be specified in the PowerApp Function. (NOTE: API Key was cut from the Default field before taking this screenshot)

2018-12-14-07-11-31.png

I literally exported this functioning Custom Connector from personal world, imported it into enterprise world, changed the API key, tests great in the Custom Connector "Test" area, brings back blank Collection in the actual app...

Highlighted
Frequent Visitor

Re: JSON SCHEMA: Which is correct?

im having the same issue here in 2020..

 

cant get power apps to consume the custom connector REST API???

 

making me crazy!

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,856)