<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Power BI Report Server Data source Web.Contents failed to get contents from api (404): Not Found in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-Data-source-Web-Contents-failed-to-get/m-p/3320801#M30433</link>
    <description>&lt;P&gt;the solution was change the token capture to function as&amp;nbsp;&lt;A href="https://www.advaiya.com/generate-dynamic-token-and-get-data-from-custom-api-in-power-bi/" target="_blank"&gt;https://www.advaiya.com/generate-dynamic-token-and-get-data-from-custom-api-in-power-bi/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jul 2023 16:30:20 GMT</pubDate>
    <dc:creator>kfm91</dc:creator>
    <dc:date>2023-07-07T16:30:20Z</dc:date>
    <item>
      <title>Power BI Report Server Data source Web.Contents failed to get contents from api (404): Not Found</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-Data-source-Web-Contents-failed-to-get/m-p/3313000#M30357</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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&amp;nbsp; "Web.Contents failed to get contents from api (404): Not Found".&lt;/P&gt;&lt;P&gt;Any ideia how can I solve it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use the url "&lt;A href="https://xxxxx.com.br/yyyyy/api/Acesso/Logon&amp;quot;" target="_blank" rel="noopener"&gt;https://xxxxx.com.br/yyyyy/api/Acesso/Logon"&lt;/A&gt;&amp;nbsp;in my chrome and got the same error 404 (because i don't pass the body parametrs). If I try "&lt;A href="https://xxxxx.com.br/yyyyy/swagger/index.html&amp;quot;," target="_blank" rel="noopener"&gt;https://xxxxx.com.br/yyyyy/swagger/index.html",&lt;/A&gt;&amp;nbsp;it works with swagger page.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 16:21:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-Data-source-Web-Contents-failed-to-get/m-p/3313000#M30357</guid>
      <dc:creator>kfm91</dc:creator>
      <dc:date>2023-07-03T16:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Report Server Data source Web.Contents failed to get contents from api (404): Not Found</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-Data-source-Web-Contents-failed-to-get/m-p/3320801#M30433</link>
      <description>&lt;P&gt;the solution was change the token capture to function as&amp;nbsp;&lt;A href="https://www.advaiya.com/generate-dynamic-token-and-get-data-from-custom-api-in-power-bi/" target="_blank"&gt;https://www.advaiya.com/generate-dynamic-token-and-get-data-from-custom-api-in-power-bi/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 16:30:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-Data-source-Web-Contents-failed-to-get/m-p/3320801#M30433</guid>
      <dc:creator>kfm91</dc:creator>
      <dc:date>2023-07-07T16:30:20Z</dc:date>
    </item>
  </channel>
</rss>

