Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
jaryszek
Resident Rockstar
Resident Rockstar

How to publish pbix report using REST API 2.0?

Hi Guys,

when publishing to the workspace without folder I was using this API:

 

@groupId = {{getGroups.response.body.$.value[0].id}}

POST https://api.powerbi.com/v1.0/myorg/groups/{{groupId}}/imports?datasetDisplayName={{fileDisplayName}}&nameConflict=CreateOrOverwrite
Authorization: Bearer {{$aadV2Token appOnly}}
Content-Type: multipart/form-data; boundary=MfnBoundry

--MfnBoundry
Content-Disposition: form-data; name="files"; filename="{{filename}}"
Content-Type: application/octet-stream

< ./{{filename}}
--MfnBoundry--

 

Now there is new a way of publish report using rest api 2.0:

https://learn.microsoft.com/en-us/rest/api/power-bi-report/power-bi-reports/upload-power-bi-report 

I am trying with:

@groupId = {{getGroups.response.body.$.value[0].id}}

POST https://api.powerbi.com/v2.0/myorg/groups/{{groupId}}/PowerBIreports(path='/RES-255/Vncm')/Model.Upload
Authorization: Bearer {{$aadV2Token appOnly}}
Content-Type: multipart/form-data; boundary=MfnBoundry

--MfnBoundry
Content-Disposition: form-data; name="files"; filename="{{filename}}"
Content-Type: application/octet-stream

< ./{{filename}}
 --MfnBoundry--

where RES-255 is my folder and "Vncm" is my report name. 

But I am getting 404 expection.
How to make this proper? 
Using Visual Studio Code and REST API extension. 

Best,
Jacek

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Please keep in mind that the new method is uploading the report into a holding area (Azure Blob storage) and not associating it to a workspace yet.

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Please keep in mind that the new method is uploading the report into a holding area (Azure Blob storage) and not associating it to a workspace yet.

thanks! 


Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors