Reply
Regular Visitor
Posts: 16
Registered: ‎12-15-2015

REST API and Power BI Desktop

[ Edited ]

Hello

 

I have successfully used the REST API to create a new dataset, table and have added rows to the table.

 

If I create exactly the same dataset in the Desktop tool (i.e. same dataset name, same table name, same column names in the table and same column data types), then publish that to Power BI Online, then try to use the REST API to add rows to that table, I get HTTP 400 "Bad Request".  Should this be possible?

 

I asked the above question via the online "chat" feature and, after a delay while the chat-agent checked with an engineer, was told this is possible now, but not supported (though I haven't been able to get it to work at all).

 

Is it possible to add rows to datasets/tables created in the Desktop tool?  Do I have to create the model in a certain way in the desktop tool?  

 

If not, how can measures be used with data inserted via the REST API? - since (other than basic COUNT, SUM), these can only be created in the Desktop tool.

 

If measures can't be used with data inserted via the REST API, this seems like a huge limitation for real-time dashboards and will significantly limit the usefulness of the REST API...

 

Thanks

 

Chris

fso Regular Visitor
Regular Visitor
Posts: 23
Registered: ‎10-03-2015

Re: REST API and Power BI Desktop

I have found the same limitations (no DAX measures + can only write to datasets that were created via API). As a workaround I have pushed the data to Google Drive instead and PBI is grabbing the data from there. But as you mentioned, this does not support real-time updates, which is a shame.

Regular Visitor
Posts: 48
Registered: ‎04-08-2016

Re: REST API and Power BI Desktop

Yes, I think this feature is so elementary.  I don't understand why it is not available in Power BI.

@fso The way you use with google drive, do you have such kind of regulary updates? I mean a real time update?

fso Regular Visitor
Regular Visitor
Posts: 23
Registered: ‎10-03-2015

Re: REST API and Power BI Desktop

@MbPro yes you do, kind of.
Google Apps Script allows you to set triggers (every minute, hour, etc.) which work just like cron jobs.
But there is a limitation on the PowerBI-Side how often you can refresh per day.

So you can schedule refreshs but to get "real time" you would probably have to use the PowerBI API instead.

Highlighted
RKB Frequent Visitor
Frequent Visitor
Posts: 2
Registered: ‎09-18-2016

Re: REST API and Power BI Desktop

If the various fragments of documentation littered around the place had at least mentioned that "no, you can't use RESTAPI-pushed data with Power BI Desktop," it would have saved us so much time and frustration.

 

Instead, they're all "Yeah, you can push data! Here's how you do that thing, which is not at all going to do what you think it does, but you won't figure that out until you've wasted far too much time, ha ha!"