<?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: PowerBI REST API error - Need help in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-REST-API-error-Need-help/m-p/512926#M15829</link>
    <description>&lt;P&gt;Any Help?&lt;/P&gt;</description>
    <pubDate>Tue, 11 Sep 2018 14:13:20 GMT</pubDate>
    <dc:creator>Ronnie7</dc:creator>
    <dc:date>2018-09-11T14:13:20Z</dc:date>
    <item>
      <title>PowerBI REST API error - Need help</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-REST-API-error-Need-help/m-p/509452#M15708</link>
      <description>&lt;DIV class="lia-message-heading lia-component-message-header"&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-standard"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-left"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-04 lia-quilt-column-right"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In effort to automate the creating of data source on a given Gateway, I have started using the PowerBI REST API commands.&lt;BR /&gt;I'm currently trying to create a sample data source on a specific gateway ID using the post command from PowerShell.&lt;BR /&gt;I went over the documentation and believe i have all the parameters correct. However, when i try to post i get the the following error:&lt;BR /&gt;+ CategoryInfo : WriteError: (Microsoft.Power...werBIRestMethod:InvokePowerBIRestMethod) [Invoke-PowerBIRestMethod], AggregateException&lt;BR /&gt;+ FullyQualifiedErrorId : One or more errors occurred.,Microsoft.PowerBI.Commands.Profile.InvokePowerBIRestMethod&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;BR /&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&amp;nbsp;$body2='{&lt;BR /&gt;"dataSourceType": "Sql",&lt;BR /&gt;"connectionDetails": "{\"server\":\"Server\",\"database\":\"TEST_DB\"}",&lt;BR /&gt;"datasourceName": "Sample",&lt;BR /&gt;"credentialDetails": {&lt;BR /&gt;"credentialType": "Basic",&lt;BR /&gt;"credentials": "{\"credentialData\":[{\"name\":\"username\", \"value\":\"ABC\"},{\"name\":\"password\", \"value\":\"ABC\"}]}",&lt;BR /&gt;"encryptedConnection":"Encrypted",&lt;BR /&gt;"encryptionAlgorithm":"RSA-OAEP",&lt;BR /&gt;"privacyLevel":"None"&lt;BR /&gt;}&lt;BR /&gt;}'&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Invoke-PowerBIRestMethod -url "&lt;A href="https://api.powerbi.com/v1.0/myorg/gateways/$gatewayID/datasources" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/gateways/$gatewayID/datasources&lt;/A&gt;" -Method post -body $body2&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$GatewayID is defined. the Get method does work and I can see all of the data source on that Gateway, but the POST just fails.&lt;/P&gt;&lt;P&gt;I have tried so many things and get the same error.&amp;nbsp;&lt;BR /&gt;Any help would be apprieciated!&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 11 Sep 2018 14:12:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBI-REST-API-error-Need-help/m-p/509452#M15708</guid>
      <dc:creator>Ronnie7</dc:creator>
      <dc:date>2018-09-11T14:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBI REST API error - Need help</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-REST-API-error-Need-help/m-p/512926#M15829</link>
      <description>&lt;P&gt;Any Help?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 14:13:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBI-REST-API-error-Need-help/m-p/512926#M15829</guid>
      <dc:creator>Ronnie7</dc:creator>
      <dc:date>2018-09-11T14:13:20Z</dc:date>
    </item>
  </channel>
</rss>

