-4

In power apps, I'm using custom connector. If the input is Fuji Apples or Indian mango, the URL becomes http://Api.supermarket.com/ (http://Api.supermarket.com/)v1/groceries/fruits/fresh/ apple?userkey=123 Or /Fruits/fresh/mango?

Or If the input is washington apple it becomes /Fruits/ fresh/ mango? Or if the input is organic potato it becomes /vegetables/fresh/potato? Like this based on input two parts in the url are changing. How to give input in import sample request dialog box to meet this need…

Right now, user_key is the parameter that would be used as input. Could you please help… ?

Harini R
  • 1
  • 1

1 Answers1

0

Its challenging to decipher what you're asking for, but I think you're looking for a way to pass parameters within the URL to the API call. This is known as path templating.

Here is how I accomplish this:

  • You will need Postman for this solution (its free)
  • In Postman, create a new Request with URL as follows: http://api.supermarket.com/v1/:groceries/:fruits/apple?userkey=123
    • Notice the : in front of the areas you wish to templatize
    • These will become variables in the Custom Connector
  • Export the Postman Collection as V1 deprecated
  • Import the Postman Collection into PowerApps as a new Custom Connector

You'll now be able to pass parameters to the URL in your PowerApps Custom Connector

Cheers!

Original solution in PowerApps Community

SeaDude
  • 1,647
  • 9
  • 31