cancel
Showing results for 
Search instead for 
Did you mean: 
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

View solution in original post

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
Microsoft
Microsoft

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors