Forum Discussion

jd_alation's avatar
jd_alation
Regular Visitor
8 years ago
Solved

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 

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

 

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

 

 

 

 

 

  • 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. :smileyhappy:

     

    Regards

  • 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

5 Replies

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Microsoft 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. :smileyhappy:

     

    Regards

  • jd_alation's avatar
    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 

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

     

    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

     

     

     

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

     

     

  • yoavo's avatar
    yoavo
    Microsoft 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