Forum Discussion
dynamic web api source schedule refresh on powerbi service
- Anonymous4 years ago
Hi Anonymous - it difficult to validate the following but I think it relates to the following line in the above:
data_url = "https://api.websitename.com/im1/run/details?start_date=" & Start_Date_Parameter & "T12:00:20Z&end_date=" & End_Date_Parameter & "T12:00:20Z",
The concatenation of the URL string including the "?start_date" may not work as Chris describes in his blog. This component needs to be moved in the "Relative Path". i.e. not included in the main URL. This will allow Power BI to check the credentials based on the main url instead of the dynamic url that includes dates.
- Anonymous4 years ago
Hi Anonymous
Thanks! finally got it working after continuous try
data_url = "https://api.websitename.io/im1/run/details",
data_body = "{
""authorization"": """& AccessTokenHeader & """,
""content-type"": ""application/json"",
""CATEGORY-ID"":""" & Category_Parameter & """
}",GetGroups = Json.Document(
Web.Contents(
data_url, [Query=[start_date=Start_Date_Parameter & "T12:00:20Z", end_date=End_Date_Parameter & "T12:00:20Z"],
Headers = Json.Document(data_body)
]
)
)
Hi Anonymous
Thanks! finally got it working after continuous try
data_url = "https://api.websitename.io/im1/run/details",
data_body = "{
""authorization"": """& AccessTokenHeader & """,
""content-type"": ""application/json"",
""CATEGORY-ID"":""" & Category_Parameter & """
}",
GetGroups = Json.Document(
Web.Contents(
data_url, [Query=[start_date=Start_Date_Parameter & "T12:00:20Z", end_date=End_Date_Parameter & "T12:00:20Z"],
Headers = Json.Document(data_body)
]
)
)
Well done Anonymous - it does make sense that the "im1/run/details" is still included in the main URL. Only the parts after the ?.