Automatically create a Power App from a REST API
You’ve deployed a REST API for your new service, and you’ve created a custom connector so that the Power Platform can work with it. Now what?
We are excited to announce a new Power Platform CLI command that will create a fully functional canvas Power App that can be used to explore and validate your service with Power Apps. All the controls and Power Fx formulas needed to run the app are generated automatically. This means that for fusion teams, the app can then be handed off to a low-code maker for further customizations in Studio. Along with the recently announced features that facilitate the creation of apps from an image file or a Figma design, this is yet another way that we are making it easier than ever to get started with Power Apps.
The generated app will feature a screen for each POST and GET action defined in the custom connector and will have controls on each screen that are appropriate to the types of input and output that are defined by the actions. For example, if the custom connector’s action specifies a list of valid input values, this will be represented by a dropdown control in the app. As another example, if the input type is defined as an array of strings, the appropriate controls will be generated to let the user populate the elements of the array. Underlying each screen will be auto-generated Power Fx formulas that handle the interaction with the custom connector.
This feature is surfaced to users as the Power Platform CLI command canvas create.
To get started, download and install the Power Platform CLI. You’ll need at least version 1.17.4. More information is available in the Microsoft Power Platform CLI documentation.
Using the canvas create command, specify a custom connector within a solution and an output path for the new .msapp file on your local machine:
Once imported into Studio, here is what the app generated from the above custom connector looks like. This app has several GET and POST actions, each of which are represented by a screen. You can navigate to one of the actions and interact directly with the API. This example shows the output returned from a basic GET request, displayed in a data table within the app:
We’d love to hear your feedback on this feature and to learn about how you plan to use it. As always, your input will directly influence the direction of this feature in future releases. Join the Power Apps Community forum to share your thoughts and feedback.