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?
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.
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.
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.
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:
Find your favorite faces from the community presenting at the Power Platform Community Conference!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.
Features releasing from October 2020 through March 2021