Forum Discussion
rush
Helper V
3 years agoPOST API Call in Power Query
Hi Power BI Community I am struggling with calling an API in Power Query. I am not good at the framework of how I would call an API that requires a static bearer token along with a body and heade...
v-luwang-msft
Community Support
3 years agoHi rush ,
Pls refer the following article ,and check if it is helpful:
Solved: API call with form params in power query - Microsoft Power BI Community
Solved: Creating Loop in Power Query and API - Microsoft Power BI Community
Best Regards
Lucien
- rush3 years ago
Helper V
v-luwang-msft Thanks but I am not winning with that info.
I adjusted the query which is giving me an invalid identifier error:
let url = "https://sb2.replicon.com/ATP/services/ReportService1.svc/GenerateReport", body = "reportUri"= "urn:replicon-tenant:503a24bcd3809:report:d6b-b33c-4ca3-93bf-5dc7", filterValues = [], outputFormatUri = "urn:replicon:report-output-format-option:csv", Source = Json.Document(Web.Contents(url,[Content=Text.ToBinary(body), Parsed_JSON = Json.Document(body), BuildQueryString = Uri.BuildQueryString(Parsed_JSON), Source = Json.Document(Web.Contents(url, [Headers = [#"Content-Type"="application/json"], [#"X-Replicon-Application"="companykey-leavebalance"], [#"Authorization" = "Bearer llOThhZGE1ZDDA2ZDM4MDk"], Content = Text.ToBinary(BuildQueryString)] )) in Source