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
jaryszek
Resident Rockstar
Resident Rockstar

Programatically interact with Power BI

Hi Guys,

 

i want to:

1. Create tables and relationships automatically using API from java

2. Prepare some reports in Power BI (it has to be manually set up ? )

3. Generate PDFs with reports from external code

 

It is possible? Where to read and about what read to get know with these functionalities?

 

Best,
Jacek

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jaryszek,

You can create a report file that parameterized the connecting string with the query parameter and publish it to the power bi service side. (create report steps seem not able to be achieved programmatically)

Then you can change the parameter on the service side to affect the current data source mapping. (notice: these data sources should have the same data structure as the original report defined)

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

After these steps, you can invoke the export to PDF API to export the current report.

REST API:

Datasets - Update Parameters In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs

Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Docs

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
jaryszek
Resident Rockstar
Resident Rockstar

Thank you so much!

Anonymous
Not applicable

Hi @jaryszek,

You can create a report file that parameterized the connecting string with the query parameter and publish it to the power bi service side. (create report steps seem not able to be achieved programmatically)

Then you can change the parameter on the service side to affect the current data source mapping. (notice: these data sources should have the same data structure as the original report defined)

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

After these steps, you can invoke the export to PDF API to export the current report.

REST API:

Datasets - Update Parameters In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs

Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Docs

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.