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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jd_alation
Regular Visitor

Unable to fetch JSON from power BI rest APIs

 

I have created some datasets from the Power BI desktop application.

Now i am trying to access these datasets on https://powerbi.docs.apiary.io/#reference/datasets/datasets-collection/list-all-datasets?console=1 listTables.png

After clicking on the Call Resource button i get the following error message

 

listTablesErrorMsg.png

It seems , the datasets created through desktop application are not accessible from the rest APIs . But if we create a dataset from the rest API itself , such datasets are accessible . Below is a screenshot of getTables call on one such dataset

listTablesSuccessful.png

 

 

 

 

 

2 ACCEPTED SOLUTIONS
v-ljerr-msft
Employee
Employee

Hi @jd_alation,

 

Currently, Power BI REST APIs can only manipulate the datasets and tables also created via REST APIs. Here is the idea shared on Power BI Ideas forum. You can vote it up and add you comments there to improve Power BI on this feature. Smiley Happy

 

Regards

View solution in original post

yoavo
Employee
Employee

Hi,

Datasets which were created on PowerBI Desktop and imported to PowerBi, are accessible via many Rest APIs, but not via Push APIs (such as the call you do).

The process to may such a dataset accessible via Push APIs is complicated (see below), and not guaranteed to work. So you’de better create the datasets via the rest API to begin with (which is what you describe in your post…), and perhaps create/edit the report with PowerBI portal UI, which gives you editing capabilities comparable to those of PowerBi desktop.

 

For accessing such a dataset ‘DatasetA’ with report ‘ReportA’ via Push APIs you will need to go back to the desktop PBIX, extract the model into Json, save the template, unzip into a schema, then use existing rest API to create a pushable dataset, say ‘DatasetPushableA’, and finally re-bind ‘ReportA’ to ‘DatasetPushableA’. But again, this is complicated, and not guarantied to work for all datasets’ schemas. Better stick to creating the datasets via the Push APIs

View solution in original post

5 REPLIES 5
yoavo
Employee
Employee

Hi,

Datasets which were created on PowerBI Desktop and imported to PowerBi, are accessible via many Rest APIs, but not via Push APIs (such as the call you do).

The process to may such a dataset accessible via Push APIs is complicated (see below), and not guaranteed to work. So you’de better create the datasets via the rest API to begin with (which is what you describe in your post…), and perhaps create/edit the report with PowerBI portal UI, which gives you editing capabilities comparable to those of PowerBi desktop.

 

For accessing such a dataset ‘DatasetA’ with report ‘ReportA’ via Push APIs you will need to go back to the desktop PBIX, extract the model into Json, save the template, unzip into a schema, then use existing rest API to create a pushable dataset, say ‘DatasetPushableA’, and finally re-bind ‘ReportA’ to ‘DatasetPushableA’. But again, this is complicated, and not guarantied to work for all datasets’ schemas. Better stick to creating the datasets via the Push APIs

Datasets which were created on PowerBI Desktop and imported to PowerBi, are accessible via many Rest APIs

can you @yoavo please mention what all REST APIs are there other than PUSH APIs  

v-ljerr-msft
Employee
Employee

Hi @jd_alation,

 

Currently, Power BI REST APIs can only manipulate the datasets and tables also created via REST APIs. Here is the idea shared on Power BI Ideas forum. You can vote it up and add you comments there to improve Power BI on this feature. Smiley Happy

 

Regards

jd_alation
Regular Visitor

I have created some datasets from the Power BI desktop application.

Now i am trying to access these datasets on https://powerbi.docs.apiary.io/#reference/datasets/datasets-collection/list-all-datasets?console=1 listTables.png

After clicking on the Call Resource button i get the following error message

 

listTablesErrorMsg.png

It seems , the datasets created through desktop application are not accessible from the rest APIs . But if we create a dataset from the rest API itself , such datasets are accessible . Below is a screenshot of getTables call on one such dataset

 

listTablesSuccessful.png

 

 

 Is there any way to access JSONs of datasets which were created using Desktop application ?

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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