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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
gheeler
New Member

Creating reports with web data source type programmatically

I am trying to create reports programmatically.

 

The first step is to clone an existing report that I'll use as a template. This works as expected.

 

Next I need to change the dataset I think... Can I create a new dataset from the existing one but with a different data source?

 

I've tried creating a data source through the API but I can't get a gateway public key to encrypt the credentials because I don't use gateways. I'm assuming that a Web data source uses a VNet gateway but I'm not sure about that.

I have existing reports working with these web data sources but an API call to 'Get Gateways' returns an empty array.

 

Are there public keys associated with VNet gateways?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @gheeler,

In my opinion, I think you can consider parameterizing the data source connection string with query parameters. It should be simple than using REST API to do custom with the gateway keys and settings.

Deep Dive into Query Parameters and Power BI Templates | Microsoft Power BI Blog | Microsoft Power B...

Using the Power BI Service Parameters to change connection strings (To possibly change between Dev 

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

HI @gheeler,

In my opinion, I think you can consider parameterizing the data source connection string with query parameters. It should be simple than using REST API to do custom with the gateway keys and settings.

Deep Dive into Query Parameters and Power BI Templates | Microsoft Power BI Blog | Microsoft Power B...

Using the Power BI Service Parameters to change connection strings (To possibly change between Dev 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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