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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
roalexan
Employee
Employee

Error when trying to add data via REST API to a dataset/table created via PBI desktop

I have a customer who has created a dataset with two tables using the PBI desktop. The first table contains device data that will be streamed in on an ongoing basis. The second table contains lat/lon data that will be used as reference data to join with the first table, and only infrequently updated. He now wants to programmatically add data to the first table programmatially using the REST API. This fails with the following error:

 

{
  "error": {
    "code": "InvalidRequest",
    "message": "Posting rows to this type of dataset is not currently supported. Please create your dataset by posting it through the API following the instructions on http://dev.powerbi.com."
  }

 

Is he hitting an issue with PBI in that it doesn't support writing data using the REST API to datasets created via the PBI Desktop? Is this going to be fixed (and if so, when), or is there a suitable workaround?

 

Thanks, Robert

3 REPLIES 3
Greg_Deckler
Super User
Super User

Yes, I believe that is exactly what he is hitting. Probably needs to post the PBIX file up to an Azure Power BI collection and then he could add the data programatically.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hello. What do you mean by a "collection"? I just now tried to recreate the customers issue and I think I got it - although the error I got is "400 - Bad Request". Anyway, I created a dataset and table using PBIX and published it to my subscription. Then, I tried to add rows to it programmatically. This is when I get the bad request error. So, do people know if this should actually work - programmatically writing to a dataset/table that was created via PBI Desktop?

Vicky_Song
Impactful Individual
Impactful Individual

@roalexan, I get the same exception as yours when I try using Power BI REST API to add rows to dataset which was created in Power BI Desktop. I have to say that there is a limitation in the API that it is only supported to write data to datasets that were created via API.

 

There is already one feature request about on the Power BI Idea forum, you can vote it: https://ideas.powerbi.com/forums/268152-developer-apis/suggestions/6912162-push-data-via-api-into-an...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors