<?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: Gateway ODATA datasource creation via API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Gateway-ODATA-datasource-creation-via-API/m-p/1796522#M29100</link>
    <description>&lt;P&gt;Thanks Xiaoxin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found the reason in the meantime. The parameter&amp;nbsp;&lt;/P&gt;&lt;P&gt;"useEndUserOAuth2Credentials": false,&lt;/P&gt;&lt;P&gt;was missing. The error message was a little bit misleading.&lt;/P&gt;&lt;P&gt;Joerg&lt;/P&gt;</description>
    <pubDate>Wed, 21 Apr 2021 04:53:16 GMT</pubDate>
    <dc:creator>JoergSch</dc:creator>
    <dc:date>2021-04-21T04:53:16Z</dc:date>
    <item>
      <title>Gateway ODATA datasource creation via API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Gateway-ODATA-datasource-creation-via-API/m-p/1792720#M29069</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently trying to create an OData datasource via the Gateway - Create Data source API (&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/createdatasource#code-try-0" target="_blank"&gt;Gateways - Create Datasource (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;When I put in the JSON and execute, I am getting below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "error": {
    "code": "BadRequest",
    "message": "Bad Request",
    "details": [
      {
        "message": "Unexpected character encountered while parsing value: {. Path 'connectionDetails', line 11, position 27.",
        "target": "datasourceToGatewayRequest.connectionDetails"
      },
      {
        "message": "'datasourceToGatewayRequest' is a required parameter",
        "target": "datasourceToGatewayRequest"
      }
    ]
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Input JSON looks as following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "datasourceName":  "My_ODATA",
    "credentialDetails":  {
                              "encryptedConnection":  "Encrypted",
                              "credentialType":  "Basic",
                              "credentials":  "mSTkW...dEwQ==",
                              "privacyLevel":  "Private",
                              "encryptionAlgorithm":  "RSA-OAEP"
                          },
    "dataSourceType":  "OData",
    "connectionDetails":  {\"url\":\"https://myURL.com\"}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whats wrong with that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I create an OData data source via the API?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Joerg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 12:44:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Gateway-ODATA-datasource-creation-via-API/m-p/1792720#M29069</guid>
      <dc:creator>JoergSch</dc:creator>
      <dc:date>2021-04-19T12:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway ODATA datasource creation via API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Gateway-ODATA-datasource-creation-via-API/m-p/1796254#M29097</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/215903"&gt;@JoergSch&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;If you not so sure these connection strings configured correctly.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;You can try to directly config them on your gateway data source settings, then you can use the 'get Datasource' API to get the corresponding 'data source connections' as a referencce.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400" target="_blank"&gt;400 Bad Request - HTTP | MDN (mozilla.org)&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/createdatasource" target="_blank"&gt;Gateways - Create Datasource (Power BI Power BI REST APIs) | Microsoft Docs&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 01:39:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Gateway-ODATA-datasource-creation-via-API/m-p/1796254#M29097</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-21T01:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway ODATA datasource creation via API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Gateway-ODATA-datasource-creation-via-API/m-p/1796522#M29100</link>
      <description>&lt;P&gt;Thanks Xiaoxin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found the reason in the meantime. The parameter&amp;nbsp;&lt;/P&gt;&lt;P&gt;"useEndUserOAuth2Credentials": false,&lt;/P&gt;&lt;P&gt;was missing. The error message was a little bit misleading.&lt;/P&gt;&lt;P&gt;Joerg&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 04:53:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Gateway-ODATA-datasource-creation-via-API/m-p/1796522#M29100</guid>
      <dc:creator>JoergSch</dc:creator>
      <dc:date>2021-04-21T04:53:16Z</dc:date>
    </item>
  </channel>
</rss>

