Hm.
I can run the function below and get some JSON in a new browser window...:
Launch( "https://earthquake.usgs.gov/fdsnws/event/1/query?", "format","geojson", "starttime","2019-04-02", "endtime","2019-04-03", "latitude",Location.Latitude, "longitude",Location.Longitude, "maxradiuskm",300, "orderby","magnitude-asc" )
...but I can't collect it...
ClearCollect( colTest, Launch( "https://earthquake.usgs.gov/fdsnws/event/1/query?", "format","geojson", "starttime","2019-04-02", "endtime","2019-04-03", "latitude",Location.Latitude, "longitude",Location.Longitude, "maxradiuskm",300, "orderby","magnitude-asc" ) )
...just results in this Collection...
I would really like to use something like this for public API's rather than have to create a Custom Connector.
Any ideas on how to easily grab the response from this Launch() function?
Thanks!
At this moment you need a custom connector to be able to consume the JSON result that is returned by that API. If you feel that it should be made as part of the PowerApps language itself, please consider creating a feature request in the PowerApps Ideas board.
Hi @ericonline
Perhaps you could try to do this with Flow, rather than Launch?
My initial thought would be to use an HTTP Action, similar to this.
https://flow.microsoft.com/en-us/blog/http-card-tutorial/
You could then use the Respond to PowerApps action to return the result to PowerApps, like @Mr-Dang-MSFT describes here. However, it would be easier than this article because you wouldn't need to translate the SQL output to JSON.
https://powerapps.microsoft.com/en-us/blog/return-an-array-from-flow-to-powerapps-response-method/
If this technique works, you could probably adapt it fix the other issue you mentioned with different parameters returning different schemas by using the 'branching' features of Flow.
Great idea @timl !
My other buddy too is always advocating for the use of Flow rather than Custom Connectors for REST calls.
Some pros of CC's vs. Flow:
Some cons of CC's vs Flow:
Also in Flow, you get a better view into where your call is failing. You can create "breakpoints" of sorts and peek into whats happening at various points in the call/response.
Hm... maybe i'm talking myself into Flow here!!
That's an excellent summary of CCs vs Flow. Thanks @ericonline !
I think you're talking me into Flow too!! The only other points I can think of are:
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
203 | |
98 | |
60 | |
56 | |
52 |
User | Count |
---|---|
257 | |
161 | |
87 | |
79 | |
68 |