Forum Discussion
fernando89
3 years agoNew Member
Authenticating and Connecting Power BI to API
Hi everyone, I'm diving into the world of Power BI now looking to connect it with a CRM we use at work and create live data dashboards from it. Here's the link for this application (called MYP) A...
- Anonymous3 years ago
Hi fernando89,
It suppose it may mean the front part of request URL, you can take a look at the following link and sample codes about use web.content to getting data from API with relativepath option:
let url = "https://developer.mypcorp.com/", body = "{}", token = "xxxxxxxx", header = [ #"Content-Type" = "application/json", #"Authoritation" = "Basic " & token ], response = Web.Contents(url, [ RelativePath = "art/authentication/", Headers = header, Content = Text.ToBinary(body) ]), AccessToken = Json.Document(response)[access_token], JsonResponse = Web.Contents( url, [ RelativePath = "xxx/xxx", Headers = [ Authoraztion = "Basic " & AccessToken, #"Content-Type" = "application/json" ] ] ), Result = Json.Document(JsonResponse) in ResultRegards,
Xiaoxin Sheng
Anonymous
3 years agoNot applicable
Hi fernando89,
It suppose it may mean the front part of request URL, you can take a look at the following link and sample codes about use web.content to getting data from API with relativepath option:
let
url = "https://developer.mypcorp.com/",
body = "{}",
token = "xxxxxxxx",
header = [
#"Content-Type" = "application/json",
#"Authoritation" = "Basic " & token
],
response = Web.Contents(url, [
RelativePath = "art/authentication/",
Headers = header,
Content = Text.ToBinary(body)
]),
AccessToken = Json.Document(response)[access_token],
JsonResponse = Web.Contents(
url,
[
RelativePath = "xxx/xxx",
Headers = [
Authoraztion = "Basic " & AccessToken,
#"Content-Type" = "application/json"
]
]
),
Result = Json.Document(JsonResponse)
in
Result
Regards,
Xiaoxin Sheng