I want to publish a Power BI report by using a Rest API and I am getting an error
RequestedFileIsEncryptedOrCorrupted error
These are the steps I followed
Request Data
POST /v1.0/myorg/groups/{groupId}/imports/createTemporaryUploadLocation HTTP/1.1
Host: api.powerbi.com
Authorization: Bearer {token}
User-Agent: PostmanRuntime/7.20.1
Accept: */*
Cache-Control: no-cache
Host: api.powerbi.com
Accept-Encoding: gzip, deflate
Content-Length: 0
Connection: keep-alive
cache-control: no-cache
Return
{
"@odata.context": "",
"url": "",
"expirationTime": ""
}
The URL sends the following Request
PUT {url from step 1} HTTP/1.1
Host: wabieus2bppbiv2.blob.core.windows.net
x-ms-blob-type: BlockBlob
User-Agent: PostmanRuntime/7.20.1
Accept: */*
Cache-Control: no-cache
Host: wabieus2bppbiv2.blob.core.windows.net
Content-Type: multipart/form-data;
Accept-Encoding: gzip, deflate
Content-Length: 2057012
Connection: keep-alive
cache-control: no-cache
Content-Disposition: form-data; name="file"; filename="{local pbix file path here}
Request responds 201
and I send publish report call
POST /v1.0/myorg/groups/{groupId}/imports?datasetDisplayName={name}& nameConflict=CreateOrOverwrite& skipReport=False HTTP/1.1
Host: api.powerbi.com
Content-Type: multipart/form-data;
cache-control: no-cache
Content-Disposition: form-data; name="fileUrl"
and here I am getting an error
{
"error": {
"code": "RequestedFileIsEncryptedOrCorrupted",
"pbi.error": {
"code": "RequestedFileIsEncryptedOrCorrupted",
"parameters": {},
"details": [],
"exceptionCulprit": 1
}
}
}