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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Import API help

Hello all,

 

I'm trying to make use of the PBI Import in Group API but I'm having a hard time understanding how to get it to work.

 

If I'm importing a .pbix, what are the steps that I need to take to make use of the API? Do I need to encode the file? Does it have to be stored in a certain place?

 

I'm not finding any useful documentation on this, any help would be appreciated.

 

Chris

3 REPLIES 3
lbendlin
Super User
Super User

I thought the documentation is pretty straightforward.  Where are you stuck?

 

https://docs.microsoft.com/en-us/rest/api/power-bi/imports

 

Anonymous
Not applicable

@lbendlin How do I call the file that I want to import? That's the part that I'm stuck on. Where does the file need to be stored? How do I call it in the body? Does it need to be encoded? How do I encode it if it does?

Assuming your pbix file is under 1GB:

 

To import a file, request Headers should include Content-Type: multipart/form-data with the file encoded as form data in the request body.

 

https://www.w3.org/TR/html401/interact/forms.html

 

For larger files yes, you need to prepare the temporary location first.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.