Forum Discussion
Power BI API Dataflow Import Operation
- 7 years ago
import is a bit trickey to get right
here is a sample:
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/imports?datasetDisplayName=model.json HTTP/1.1
accept: application/json, text/plain, */*
cache-control: no-cache
Authorization: Bearer eyJ0eXAiOi...nQ
User-Agent: PostmanRuntime/7.3.0
accept-encoding: gzip, deflate
content-type: multipart/form-data; boundary=--------------------------613655670645709167014348
content-length: ...
Connection: close
< BODY>
----------------------------613655670645709167014348
Content-Disposition: form-data; name=""; filename="model.json"
Content-Type: application/json
{
"name": "my model",
"version": "1.0",
...
}
----------------------------613655670645709167014348--
Hi Anonymous, amos_ortal
I am able to create dataflow using import API in postman tool. In which, I manually fetched authorization token from the browser dev tools.
Now I need to do it through powershell script.
Could you please tell me how did you get Authorization token in your code?
I am basically trying to create a powershell script which asks for certain input parameters and then execute post API to create dataflow.
Thanks.
Hi,
Did you manage to find a solution for this. I am wanting to do exactly what you are looking at but have been un-successful.
Thanks