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

Get report method from REST API

I'm facing a problem with "Get Report" method API.

I'm using Power BI Rest API with Postman and an evaluation period of Power BI Pro.

 

I did succeed to authenticate getting the access token, to use 'GenerateToken' on my reports, list my reports, export them, rebind them to another dataset souce and also delete reports.

 

But I did not succeed with the 'Get report' method. Using the same syntax than similar requests (export report method for example), I have a 400 Bad Request response with 'Get Report' method.

 

GET https://api.powerbi.com/v1.0/myorg/groups/{group_id}/reports/{report_id}/Export => works fine 

 

GET https://api.powerbi.com/v1.0/myorg/groups/{group_id}/reports/{report_id} => Bad request

 

Do you have any idea ? Maybe the evaluation period ? 

8 REPLIES 8
Anonymous
Not applicable

This is also something we are facing issues with. GetDashboard has been used successfully, but GetReport is not working. Do you have a fix for this?

Not found yet Smiley Sad, still have the same problem.

 

** Update **

I tried with Fiddler, and it seems to work. I have to find why it doesn't work with Postman or curl and a http client.

v-shex-msft
Community Support
Community Support

HI @qlegoff,

 

Based on document, I found 'Get Report' and 'Export Report' has similar url.

I think you need to double check your request url if you direct modify 'Export Report' api string to use 'Get Report' api.(error message also related to invalid api url)

 

Reference link:

Power BI REST API reference

Get Report
GET https://api.powerbi.com/v1.0/myorg/groups/{group_id}/reports/{report_id}

Export report
GET https://api.powerbi.com/v1.0/myorg/groups/{group_id}/reports/{report_id}/Export

Get Reports
GET https://api.powerbi.com/v1.0/myorg/groups/{group_id}/reports

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft,

 

Thanks for your response. I made sure to double check before posting this problem. 

Plus, if it's an invalid API url, I think it would generate a 404 Not Found error no ?

Anonymous
Not applicable

Hi @qlegoff,

 

how did you generate your token? Did you set any access level (like view) or any identities?

 

What's the exact error message when you send a request like this in Postman or Fiddler?

 

GET https://api.powerbi.com/v1.0/myorg/groups/{group_id}/reports/{report_id}
Content-Type: application/json Authorization: Bearer ex...

Regards,

 

Thanos

HI @qlegoff,

 

Nope, it only means your requests are invalid, maybe you can try to use fiddler to trace these request to see detail operation on REST api.

 

Fiddler Trace

Fiddler is a free tool from Telerik that monitors HTTP traffic. You can see the back and forth with the Power BI service from the client machine. This may show errors and other related information.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hello,

 

Thanks for ur answers;

 

I did download Fidler and I don't know why, but when I use the Fidler "Composer" functionnality to request this method, it seems to work. But when I do the same request with Postman or with my Java application, it doesn't work.

I don't know yet where is the difference between Postman and Fidler, I'll let you know if I found.

 

Thx,

Hi @qlegoff,

 

I guess it may related to service forwarding, fiddler will trace requests and force use localhost(127.0.0.1)dns server to handling your request.


I think you need to check your application and router settings if there are any specific policy enabled.(e.g. redirect request, forwarding, encryption...)

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.

Top Solution Authors
Top Kudoed Authors