Forum Discussion

robinjohansson's avatar
robinjohansson
New Member
8 years ago

Report id in app workspace differs from same report in published app when fetching REST API reports

So i have a case in my organisation where I want to let users embed reports on our intranet. The solution works as follows:

When the user wants to embed a report, they go to the report they want to embed, and copy paste the url into a field, which i parse in my code. so for example for the url https://app.powerbi.com/apps/xxxxx/reports/1-2-3-4-a-b-c my code would perform a get request to https://api.powerbi.com/v1.0/myorg/reports and look for this report id... but the id i get from the REST API is not the same as in the report in my published app.. the only way i can get the correct id that is shown in the url is by getting the report from https://api.powerbi.com/v1.0/myorg/groups/groupid/reports. The ids for those reports match the report shown in the url at app.powerbi.com.. So my question is, is it possible to find the report ids returned from https://api.powerbi.com/v1.0/myorg/reports somewhere else, for example at app.powerbi.com? These ids are needed for those who want to create an embedded reports for the organisation's users.

 

When I use GetReports I get this JSON back with another id than i see in the url at app.powerbi.com when viewing it:

And this is the id i can see in the url:

 

 

Thanks in advance for any advice..

/Robin

2 Replies