Forum Discussion
Upload a JSON file using Power BI API
Hi FelixC
I think you can try Post Import or Post Import in Group Rest API to import Json File in your My Workspace or App Workspaces.
For reference:
Imports - Post Import In Group
To use this Rest API, you need Dataset.ReadWrite.All permission. You can select it in API Permission in Azure portal.
You can use "Try it" to have a test from Link. If you configure your APP correctly, you should succeed.
I suggest you to check your Authorization Bear token. I can get access token by API in Postman then copy this bear token into Authorization pane instead of adding it in Header pane.
For reference: Power BI REST API using postman - generate embed token.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
how in the "Try it" I can upload my json file?
Thanks for your help
- Anonymous4 years agoNot applicable
Hi FelixC
According to the blog, Power BI supports us to create a dataflow from a model.json file.
- To import a file, specify the content type multipart/form-data in the request headers and encode the file as form data in the request body.
- To create a dataflow from a model.json file, set
datasetDisplayNameto model.json, as described in URI parameters.
We can use dataflow as the datasource to create a dataset.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- FelixC4 years agoNew Member
Yes, but here
I can't add my file and I don't know how to encode the file as form data in this form.
In postman there is a section for "form data" file and it works for pbix file but not for json.
Félix- Anonymous4 years agoNot applicable
Hi FelixC
I find a post with similar requirement like yours. I hope it could help you.
For reference: Power BI API Dataflow Import Operation
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.