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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
UmeshGoti
Regular Visitor

Generate Power BI Report from Rest API including Visual part

Hi all Currently i have requirement to generate Power BI report(including visual part) through it's rest APIs.
for that currently i am following below steps
1. Creating power bi template without any datasource in power bi desktop(empty bar chart)
2. uploading that pbix file on power bi service(POST: https://api.powerbi.com/v1.0/myorg/groups/{groupID}/imports?datasetDisplayName=FirstTemplate
3. Create new Dataset on Power BI Service (https://api.powerbi.com/v1.0/myorg/groups/{groupID}/datasets
4. insert data in dataset (created in previous step)
5. Binding Dataset(of previous step) to Report(uploaded in step-2) (POST : https://api.powerbi.com/v1.0/myorg/groups/{groupID}/reports/{reportId}/Rebind)
Request Body : 

{
  "datasetId": "123-345-68-890"
}

Ref : https://learn.microsoft.com/en-us/rest/api/power-bi/

using above steps i am able to upload pbix file, create dataset, insert data into dataset, bind dataset with pbix report
but visual is not showing
can someone help me to solve above issue to dynamically sepecify which columns of dataset i can use as x-axis and y-axis on visual part
or let me know correct way to achieve this 

Thanks everyone in advance!!

 

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @UmeshGoti ,

Base on my research, there is no REST API to configure the visual fields directly. You can open the report in Power BI Desktop or Power BI Service and manually adjust the visuals to ensure they correctly reflect the new dataset's schema.

vyiruanmsft_0-1728458580913.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.