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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
jaryszek
Post Patron
Post Patron

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
jaryszek
Post Patron
Post Patron

Thank you so much!

v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.