Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi team,
It seems there is an issue with the Power BI REST API when attempting to Import a dataflow with an ImportConflictHandlerMode of "CreateOrOverwrite".
Steps:
Create the following request.
curl -X POST \
'https://api.powerbi.com/v1.0/myorg/groups/{{workspaceId}}/imports?datasetDisplayName=model.json&nameConflict=CreateOrOverwrite' \
-H 'Accept: */*' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Authorization: Bearer {{authorizationToken}}' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Length: 1522' \
-H 'Content-Type: application/json' \
-H 'Host: api.powerbi.com' \
-H 'Postman-Token: 98346372-e9c3-4c82-afdd-50050023c55f,ad5ca53d-35bf-4258-b487-b9e328e0baa6' \
-H 'User-Agent: PostmanRuntime/7.15.2' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F =@/{{pathToDataflowJson}}Expected behavior is for the request to successfully:
- create the dataflow if a dataflow with the same name does not exist
- overwrite the dataflow if a dataflow with the same name already exists
However, the received response is 404 Not Found with a body of:
{
"error": {
"code": "DuplicatePackageNotFoundError",
"pbi.error": {
"code": "DuplicatePackageNotFoundError",
"parameters": {},
"details": []
}
}
}Other observed behavior:
1. Creating the dataflow first by hitting
POST https://api.powerbi.com/v1.0/myorg/groups/{{workspaceId}}/imports?datasetDisplayName=model.jsonfirst and then executing
POST https://api.powerbi.com/v1.0/myorg/groups/{{workspaceId}}/imports?datasetDisplayName=model.json&nameConflict=CreateOrOverwriteworks as expected i.e. the dataflow is overwritten.
2. Hitting
POST https://api.powerbi.com/v1.0/myorg/groups/{{workspaceId}}/imports?datasetDisplayName=model.json&nameConflict=Overwritewithout creating the dataflow prior to the request works as expected i.e. the system returns the following error
{
"error": {
"code": "DuplicatePackageNotFoundError",
"pbi.error": {
"code": "DuplicatePackageNotFoundError",
"parameters": {},
"details": []
}
}
}
3. Hitting
POST https://api.powerbi.com/v1.0/myorg/groups/{{workspaceId}}/imports?datasetDisplayName=model.jsonwhile the dataflow exists works as expected i.e. returns:
{
"error": {
"code": "Conflict",
"message": "Dataflow 'OdataDataflow' already exists"
}
}
Could you please look into this?
Thanks,
Laurentiu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.