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
bitsmythe
Frequent Visitor

API for Reports and Tiles Not Loading

I've created a c# app that queries the Power BI api for Groups, Dashboards, Tiles and Reports. I can successfully return Groups, Dashboards and Reports names and embed URLs for Reports. I get a "NotFound" error when I try to use the 

GET https://api.powerbi.com/beta/myorg/dashboards/{dashboard_id}/tiles URL for the request for Tiles. When I try to open a Report using the embed url in the iframe it continutes to try to load showing the travel dots across the page. Has anyone else experienced this? Thank you.

1 ACCEPTED SOLUTION
bitsmythe
Frequent Visitor

So I've fixed the other issue of not being able to find the tiles api url. This might need updating in the documentation. It appears that for a users workspace you use: "https://api.powerbi.com/beta/myorg/dashboards/" + ds1.Id + "/tiles", however for groups you need to qualify with the specific group id: "https://api.powerbi.com/beta/myorg/groups/" + ds1.Id + "/dashboards/" + ds3.Id + "/tiles". This was a little confusing. But now I show all dashboards, reports and tiles.

 

Capture.PNG

View solution in original post

4 REPLIES 4
bitsmythe
Frequent Visitor

So I've fixed the other issue of not being able to find the tiles api url. This might need updating in the documentation. It appears that for a users workspace you use: "https://api.powerbi.com/beta/myorg/dashboards/" + ds1.Id + "/tiles", however for groups you need to qualify with the specific group id: "https://api.powerbi.com/beta/myorg/groups/" + ds1.Id + "/dashboards/" + ds3.Id + "/tiles". This was a little confusing. But now I show all dashboards, reports and tiles.

 

Capture.PNG

bitsmythe
Frequent Visitor

So I fixed the first one. I was indeed injecting the token in the iframe but it was tied to the click event for setting the url which was too soon since the url hadn't loaded yet in the iframe. I added an event handler for the iframe onload event and then injected the token and now works as expected.

 

However I'm still getting a not found error for the api call for the tiles operation. It's as if there isn't a listerner on the other end using the format I referenced above. Thank You

jocaplan-MSFT
Employee
Employee

Are you adding a valid access token when you render the iframe?

Yes I am injecting the token. The iframe content appears to be valid because when i inspect the script in the header in the iframe it has all of my relevant info, just the bouncing dots never stops trying to load. I'm also listening for messages from the iframe and below is a snip from the iframe content. Thank you.

Capture.PNG

 

 

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.