Forum Discussion
Anonymous
6 years agoNot 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 ta...
lbendlin
6 years agoSuper User
I thought the documentation is pretty straightforward. Where are you stuck?
https://docs.microsoft.com/en-us/rest/api/power-bi/imports
- Anonymous6 years agoNot 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?
- lbendlin6 years agoSuper User
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.