<?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 Some REST API calls return status 405 using PowerShell in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Some-REST-API-calls-return-status-405-using-PowerShell/m-p/2368487#M34712</link>
    <description>&lt;P&gt;I'm testing the waters with some REST calls for Power BI. I'm using the PowerShell cmdlets. I can successfully make calls to some api endpoints for example listing the refresh history of a dataset&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/get-refresh-history-in-group" target="_blank" rel="noopener"&gt;Datasets - Get Refresh History In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But others return an error even though I am following the documentation. For example,&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/cancel-refresh-in-group" target="_blank" rel="noopener"&gt;Datasets - Cancel Refresh In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;Invoke-PowerBIRestMethod -Method Delete -Url 'groups/xxxxx-xxxx-xxxx-xxxx-xxxxxc54c/datasets/xxxxxx-xxx-xxxx-xxxx-xxxxxx2bb0f/refreshes/xxxxxx-xxxx-xxxx-xxxx-xxxxx5b444'&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;Message : Response status code does not indicate success: 405 (Method Not Allowed).&lt;BR /&gt;StackTrace : at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()&lt;BR /&gt;at Microsoft.PowerBI.Commands.Profile.InvokePowerBIRestMethod.&amp;lt;InvokeRestMethod&amp;gt;d__35.MoveNext()&lt;BR /&gt;Exception : System.Net.Http.HttpRequestException&lt;BR /&gt;InvocationInfo : {Invoke-PowerBIRestMethod}&lt;BR /&gt;Line : Invoke-PowerBIRestMethod -Method Delete -Url .....&lt;BR /&gt;Position : At line:1 char:1&lt;BR /&gt;+ Invoke-PowerBIRestMethod -Method Delete -Url 'groups/9bbe36b5-cb03-4e ...&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I had similar error trying to invoke&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/get-refresh-execution-details-in-group" target="_blank" rel="noopener"&gt;Datasets - Get Refresh Execution Details In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Mar 2022 22:09:10 GMT</pubDate>
    <dc:creator>mattcarter865</dc:creator>
    <dc:date>2022-03-01T22:09:10Z</dc:date>
    <item>
      <title>Some REST API calls return status 405 using PowerShell</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Some-REST-API-calls-return-status-405-using-PowerShell/m-p/2368487#M34712</link>
      <description>&lt;P&gt;I'm testing the waters with some REST calls for Power BI. I'm using the PowerShell cmdlets. I can successfully make calls to some api endpoints for example listing the refresh history of a dataset&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/get-refresh-history-in-group" target="_blank" rel="noopener"&gt;Datasets - Get Refresh History In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But others return an error even though I am following the documentation. For example,&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/cancel-refresh-in-group" target="_blank" rel="noopener"&gt;Datasets - Cancel Refresh In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;Invoke-PowerBIRestMethod -Method Delete -Url 'groups/xxxxx-xxxx-xxxx-xxxx-xxxxxc54c/datasets/xxxxxx-xxx-xxxx-xxxx-xxxxxx2bb0f/refreshes/xxxxxx-xxxx-xxxx-xxxx-xxxxx5b444'&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;Message : Response status code does not indicate success: 405 (Method Not Allowed).&lt;BR /&gt;StackTrace : at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()&lt;BR /&gt;at Microsoft.PowerBI.Commands.Profile.InvokePowerBIRestMethod.&amp;lt;InvokeRestMethod&amp;gt;d__35.MoveNext()&lt;BR /&gt;Exception : System.Net.Http.HttpRequestException&lt;BR /&gt;InvocationInfo : {Invoke-PowerBIRestMethod}&lt;BR /&gt;Line : Invoke-PowerBIRestMethod -Method Delete -Url .....&lt;BR /&gt;Position : At line:1 char:1&lt;BR /&gt;+ Invoke-PowerBIRestMethod -Method Delete -Url 'groups/9bbe36b5-cb03-4e ...&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I had similar error trying to invoke&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/get-refresh-execution-details-in-group" target="_blank" rel="noopener"&gt;Datasets - Get Refresh Execution Details In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 22:09:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Some-REST-API-calls-return-status-405-using-PowerShell/m-p/2368487#M34712</guid>
      <dc:creator>mattcarter865</dc:creator>
      <dc:date>2022-03-01T22:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Some REST API calls return status 405 using PowerShell</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Some-REST-API-calls-return-status-405-using-PowerShell/m-p/2374566#M34761</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/301898"&gt;@mattcarter865&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Both of the following REST APIs are only for datasets that perform &lt;STRONG&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/connect-data/asynchronous-refresh" data-linktype="absolute-path" target="_blank"&gt;asynchronous refresh operation&lt;/A&gt;&lt;/STRONG&gt; operations:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/cancel-refresh-in-group" target="_self"&gt;Datasets - Cancel Refresh In Group&lt;/A&gt;:&amp;nbsp;&lt;SPAN&gt;Cancels the specified&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/connect-data/asynchronous-refresh" data-linktype="absolute-path" target="_blank"&gt;asynchronous refresh operation&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for the specified dataset from the specified workspace.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/get-refresh-execution-details-in-group" target="_self"&gt;Datasets - Get Refresh Execution Details In Group&lt;/A&gt;:&amp;nbsp;Returns execution details of an&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/connect-data/asynchronous-refresh" data-linktype="absolute-path" target="_blank"&gt;asynchronous refresh operation&lt;/A&gt;&amp;nbsp;for the specified dataset from the specified workspace.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;There are the following limitations for asynchronous refresh with the Power BI REST API, that&amp;nbsp;is probably the reason for getting 405 error...&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_0-1646383798059.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/679242i20C24B7E11E54052/image-size/large?v=v2&amp;amp;px=999" role="button" title="yingyinr_0-1646383798059.png" alt="yingyinr_0-1646383798059.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ionos.com/digitalguide/hosting/technical-matters/error-405-method-not-allowed-explanation-and-solutions/" target="_self"&gt;HTTP Error “405 Method Not Allowed”: How to solve the problem&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 08:52:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Some-REST-API-calls-return-status-405-using-PowerShell/m-p/2374566#M34761</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-04T08:52:27Z</dc:date>
    </item>
  </channel>
</rss>

