Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have a Power BI project working 100% in power bi desktop. But when I publish it in Power BI Server and I try to configure the below Data Source, I got the error "Web.Contents failed to get contents from api (404): Not Found".
Any ideia how can I solve it?
let
url = "https://xxxxx.com.br/yyyyy/api/Acesso/Logon",
headers = [#"Content-Type" = "application/json-patch+json", #"accept" = "application/json"],
postData = Json.FromValue([userID = "user01", password = "key", aplName = "xpto"]),
response = Web.Contents(
url,
[
Headers = headers,
Content = postData
]
),
jsonResponse = Json.Document(response),
objeto = jsonResponse[objeto],
#"Converted to Table" = Record.ToTable(objeto),
#"Filtered Rows" = Table.SelectRows(#"Converted to Table", each [Name] = "accessToken"),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Name"})
in
#"Removed Columns"
I tried to use the url "https://xxxxx.com.br/yyyyy/api/Acesso/Logon" in my chrome and got the same error 404 (because i don't pass the body parametrs). If I try "https://xxxxx.com.br/yyyyy/swagger/index.html", it works with swagger page.
Solved! Go to Solution.
the solution was change the token capture to function as https://www.advaiya.com/generate-dynamic-token-and-get-data-from-custom-api-in-power-bi/
the solution was change the token capture to function as https://www.advaiya.com/generate-dynamic-token-and-get-data-from-custom-api-in-power-bi/
User | Count |
---|---|
3 | |
3 | |
2 | |
1 | |
1 |
User | Count |
---|---|
9 | |
4 | |
3 | |
3 | |
2 |