cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Custom Connector with Dynamic Base URL

Hello, 
I'm trying to set up a custom connector but the problem I'm running into is that the base URL contains some of the query information needed to return a JSON from an API. For example the query looks like:

 

"www.example.api/base/{query1}/state/{query2}/city/{query3}?api_key"

 

I have not found a way to send these as a variable when using the custom connector. Any ideas or are there new features that have been created recently that I'm not currently aware of? Any help would be much appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Ovidiu,

 

I managed to get this sort of connection to work through the use of flow and a button within the powerapp itself.

 

The result looked a little something like this

tempsnip.png

 

I followed a guide at https://powerapps.microsoft.com/en-us/blog/return-an-array-from-flow-to-powerapps-response-method/ to get the response to work within the app. Hope this helps anyone else with similar problems

 

Michael

View solution in original post

3 REPLIES 3
a-ovbord
Community Support
Community Support

Hi @Anonymous,

 

Did you manage to setup the custom connector?

Did you follow this guide here?

 

Can you show me where you are trying to set that URL?

 

Thank you,

Ovidiu

Anonymous
Not applicable

Ovidiu,

 

I managed to get this sort of connection to work through the use of flow and a button within the powerapp itself.

 

The result looked a little something like this

tempsnip.png

 

I followed a guide at https://powerapps.microsoft.com/en-us/blog/return-an-array-from-flow-to-powerapps-response-method/ to get the response to work within the app. Hope this helps anyone else with similar problems

 

Michael

View solution in original post

micah-bittitan
Regular Visitor

Try this:

 

  1. Create a new custom connector
  2. Set the Host to api.gsa.gov
  3. Leave the Base URL as / 
  4. Click Security ->
  5. Set Authentication Type to API Key
    1. Parameter Label = apiKey
    2. Parameter Name = apiKey
    3. Parameter Location = Query
  6. Click Definition ->
  7. Add a new action
    1. Fill out the Summary, Description, and Operation ID (this is the method name you'll call from PowerApps)
    2. Under Request, click Import from Sample
      1. Set the Method
      2. Set the URL to https://api.gsa.gov/travel/perdiem/v2/rates/city/{cityName}/state/{stateName}/year/{year}
      3. Click Import

You should see cityName, stateName, and year in the Path section under the URL. Save your connector, then go to the Test tab and select your operation. To the right, you should see three textboxes you can enter the values in. When you call the method from your PowerApp, it's ConnectorName.OperationID("chicago","IL",2020).

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,067)