Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

C# code to get pages from each report

Hello all!! I am playing with the powerBI API and I need help with. I want to get the meta data from pages of a specific report . My goal is to make API calls to  ApiUrl/reports/{report-id}/{pagen...
  • v-ljerr-msft's avatar
    8 years ago

    Hi Anonymous,

    I want to get the meta data from pages of a specific report . My goal is to make API calls to 

    ApiUrl/reports/{report-id}/{pagename}, and get meta data from it. 



    If I understand you correctly, you should be able to use the report.getPages function(PowerBI-JavaScript) to get the list of pages within the report, and then use page functions to get the Filters or Visuals or other meta data of each page. :smileyhappy:

     

    The sample code below is for your reference.

        var report = powerbi.embed(reportContainer, config);
    
        report.on('loaded', function () {
            report.getPages().then(function (pages) {
                //pages[1].setActive();
    page.getFilters().then(filters => { ... }); }); });

     

    Regards