Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Tamerlane
Helper I
Helper I

Get data from API that uses a callbackurl

Hi everyone,

 

I am for the first time trying to get data from an API into Power BI Desktop using Advanced Editor to write the proper information in.

 

I can connect, get a list of reports but can't find out how to actually load a report in Power BI. The documentation of the API mentions this:

"GetReportData
This method takes one or more reportIds and a callbackUrl. Because it can take a significant amount of
time to download the report information, this is an async call. The resulting data will be send via a POST
request to the supplied callbackUrl."

 

This is my M-code to fetch report 250:

let
url = "https://xxx.nl/api/GetReportData?reportIds=250&callbackurl=xxx",
body="grant_type=client_credentials&client_id=TReasuryAPI&client_secret=xxx&scope=Treasury",
Source = Json.Document(Web.Contents(url,
[
Headers = [Authorization="Bearer " & "xxx",
#"Content-Type"="application/x-www-form-urlencoded"],
Content=Text.ToBinary(body)
]
)
)
in
Source

 

I need to give a value to the callbackurl (xxx is a placeholder), but what? Or is this something that Power BI Desktop does not support?

 

I have a short line to the person that build the API and he mentioned he might add a API call to fetch one report at a time, not using a callbackurl. Is that a good solution for my scenario?

 

Thanks in advance! 

1 REPLY 1
Tamerlane
Helper I
Helper I

Anyone?

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.