Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

Use an API Call to Populate Custom Data Connector Settings

I've created a custom connector I've imported into Power BI Desktop. I'm using it to pull in a very large data set, which is too big to pull in completely in a single request. So I want to allow a user to select a certain subset of the data in the connection info (DataSource.Contents) screen. To do this I have a few dropdown menus that allows them to select a subset. These dropdowns are pretty dynamic. Right now if I hardcode my dropdown list in a function and return it in a function it works:

dropdownList = {
[id=""123, "name="example dropdown"],
[id=""124, "name="another example dropdown"]
}

But I want that function call to return the result of an API call to dynamically load this list. I am using the following code which I know works during the actual data retrieval for the custom connector:

content = Web.Contents("https://my-api.com/unprotected/endpoint/returning-json", 
            [
                Headers=[
                    #"Method"="GET",
                    #"Content-Type" = "application/json"
                ]
            ]
        )

This code works when I make it run in the Contents section of my DataSource. Is it possible to get this to run during the data connection settings screen? Is there some async/await type keyword I am missing?

 

And if not, does anyone know of another way to allow a user to define the parameters of the content they need so I can make an API call for the data on a large dataset that will not time out?

1 REPLY 1
diogorod
Regular Visitor

Did you find a way to do this? Also trying...

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.