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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
jaryszek
Impactful Individual
Impactful Individual

Using REST API to generate pdfs

Hi Guys,

i want to do 2 things using power BI premium per user license (only 1 user and 1 license).

I want to connect with REST API from java and:

1) change programatically data source for specific report/dahsboard
2) generate specific reports into pdf for specific customer.

Can anybody say how to do this?

1 ACCEPTED SOLUTION

@jaryszek

1) change programatically data source for specific report/dahsboard - Do you have a Power BI report or a Paginated Report? 

For Power BI report you can change the data source of the dataset using this API:

https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources-in-group

For Paginated report you have this API for changing the data source:

https://docs.microsoft.com/en-us/rest/api/power-bi/reports/update-datasources-in-group

 

2) generate specific reports into pdf for specific customer.

The REST API for exporting to PDF requires Premium/Embedded capacity (unless you're exporting a paginated report)

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@jaryszek

1) change programatically data source for specific report/dahsboard - Do you have a Power BI report or a Paginated Report? 

For Power BI report you can change the data source of the dataset using this API:

https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources-in-group

For Paginated report you have this API for changing the data source:

https://docs.microsoft.com/en-us/rest/api/power-bi/reports/update-datasources-in-group

 

2) generate specific reports into pdf for specific customer.

The REST API for exporting to PDF requires Premium/Embedded capacity (unless you're exporting a paginated report)

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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