<?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: API Refreshes Data Set 400 Bad Request error after first time in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/1065311#M23449</link>
    <description>&lt;P&gt;Could it be that you hit the refresh limit of 8 refreshes per day (or 48 in case of a workspace on a Premium node)?&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2020 07:12:17 GMT</pubDate>
    <dc:creator>trutz</dc:creator>
    <dc:date>2020-05-04T07:12:17Z</dc:date>
    <item>
      <title>API Refreshes Data Set 400 Bad Request error after first time</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/399228#M11886</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not able to find the problem with an API call to refresh a dataset. It worked once and it doesn't anymore. It gives a 400 Bad Request Error on GetResponse(). The call works if I do a GET which gives me the refresh history, no problem. The POST doesn't work after the first&amp;nbsp;time it did.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The call is made by a WebApp that resides in Azure. The dataset is an import from Azure SQL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;protected void UpdateReport(int index)&lt;BR /&gt;{&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;// Create a request using a URL that can receive a post.&lt;BR /&gt;System.Net.WebRequest request = System.Net.WebRequest.Create("&lt;A href="https://api.powerbi.com/v1.0/" target="_blank"&gt;https://api.powerbi.com/v1.0/&lt;/A&gt;&lt;STRONG&gt;company&lt;/STRONG&gt;/groups/325d21e4-403b-455f-0000-XXXXXXXXX/datasets/b19ac36a-bb5b-XXXXXXXXXX/refreshes");&lt;BR /&gt;// Set the Method property of the request to POST.&lt;BR /&gt;request.Method = "POST";&lt;BR /&gt;request.Headers.Add("Authorization", String.Format("Bearer {0}", accessToken.Value));&lt;BR /&gt;// Set the ContentType property of the WebRequest.&lt;BR /&gt;request.ContentType = "application/x-www-form-urlencoded";&lt;BR /&gt;// Set the ContentLength property of the WebRequest.&lt;BR /&gt;request.ContentLength = 0;&lt;BR /&gt;System.Net.WebResponse response = request.GetResponse();&lt;BR /&gt;// Display the status.&lt;BR /&gt;System.IO.Stream dataStream = response.GetResponseStream();&lt;BR /&gt;// Open the stream using a StreamReader for easy access.&lt;BR /&gt;System.IO.StreamReader reader = new System.IO.StreamReader(dataStream);&lt;BR /&gt;// Read the content.&lt;BR /&gt;string responseFromServer = reader.ReadToEnd();&lt;BR /&gt;// Display the content.&lt;BR /&gt;txtResponseFromServer.Text = responseFromServer;&lt;BR /&gt;//Console.WriteLine(responseFromServer);&lt;BR /&gt;// Clean up the streams.&lt;BR /&gt;reader.Close();&lt;BR /&gt;dataStream.Close();&lt;BR /&gt;response.Close();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;catch (Exception e)&lt;BR /&gt;{&lt;BR /&gt;txtResponseFromServer.Text = String.Format("An error occurred: '{0}'", e);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreaciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alexis&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 13:40:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/399228#M11886</guid>
      <dc:creator>alexisc67</dc:creator>
      <dc:date>2018-04-18T13:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: API Refreshes Data Set 400 Bad Request error after first time</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/400778#M11941</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error 400 is an HTTP general error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try to replace the URL with the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://api.powerbi.com/v1.0/" target="_blank"&gt;https://api.powerbi.com/v1.0/&lt;/A&gt;&lt;STRONG&gt;myorg&lt;/STRONG&gt;/groups/325d21e4-403b-455f-0000-XXXXXXXXX/datasets/b19ac36a-bb5b-XXXXXXXXXX/refreshes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Under the&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;System.Net.WebRequest.Create&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;function, then check the results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 07:45:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/400778#M11941</guid>
      <dc:creator>v-micsh-msft</dc:creator>
      <dc:date>2018-04-20T07:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: API Refreshes Data Set 400 Bad Request error after first time</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/401641#M11978</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thansk for the response. I have tried using 'myorg' and also my company name in this place. I get the same result. Isn't strange that the GET works fine and the POST doesn't. Also, why worked once and not after.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can think of something else I can check, please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alexis&lt;/P&gt;</description>
      <pubDate>Sun, 22 Apr 2018 12:10:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/401641#M11978</guid>
      <dc:creator>alexisc67</dc:creator>
      <dc:date>2018-04-22T12:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: API Refreshes Data Set 400 Bad Request error after first time</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/401648#M11980</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with a new report. Again, it worked for a few times initially and now it doesn't work anymore with a 400 Bad Request error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="refreshdataset.PNG" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/92312iF9A3DEB402C3AC6B/image-size/large?v=v2&amp;amp;px=999" role="button" title="refreshdataset.PNG" alt="refreshdataset.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Apr 2018 12:35:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/401648#M11980</guid>
      <dc:creator>alexisc67</dc:creator>
      <dc:date>2018-04-22T12:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: API Refreshes Data Set 400 Bad Request error after first time</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/402243#M12003</link>
      <description>&lt;P&gt;Hi alexisc67,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This happened to me once but I don't remember if it was 400 bad request error. How many times do you refreshed it? The maximum ammount of refreshes in a day is 8. If you exceded it will stop to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need to refresh more than 8 times you should consider&amp;nbsp;a streaming dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alexsander&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 12:14:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/402243#M12003</guid>
      <dc:creator>alexsilvar</dc:creator>
      <dc:date>2018-04-23T12:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: API Refreshes Data Set 400 Bad Request error after first time</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/1065311#M23449</link>
      <description>&lt;P&gt;Could it be that you hit the refresh limit of 8 refreshes per day (or 48 in case of a workspace on a Premium node)?&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 07:12:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/API-Refreshes-Data-Set-400-Bad-Request-error-after-first-time/m-p/1065311#M23449</guid>
      <dc:creator>trutz</dc:creator>
      <dc:date>2020-05-04T07:12:17Z</dc:date>
    </item>
  </channel>
</rss>

