<?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: Change Dataconnection Password through Qlik-Cli in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Dataconnection-Password-through-Qlik-Cli/m-p/1600418#M10939</link>
    <description>&lt;P&gt;It works now, thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jul 2019 13:29:15 GMT</pubDate>
    <dc:creator>tobiasweidemann</dc:creator>
    <dc:date>2019-07-09T13:29:15Z</dc:date>
    <item>
      <title>Change Dataconnection Password through Qlik-Cli</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Dataconnection-Password-through-Qlik-Cli/m-p/1600346#M10933</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;due to a company policy, passwords for all accounts have to be changed in a regular interval including service accounts.&lt;BR /&gt;I got a script for updating the password for the Qlik Sense services, which also updates the data connections of the monitor apps.&lt;/P&gt;&lt;P&gt;Updating the services works well, but when it comes to changing the data connections, I get a HTTP error 400 "invalid request".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The part of the script, which changes the password of the data connections:&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;LI-CODE lang="php"&gt;#Datenverbindung ermitteln
    $DataconnectionID = Invoke-QlikGet -path "/qrs/dataconnection/full?filter=(name eq '$connection')";
    #ID der Datenverbindung
    $AppID = $DataconnectionID.id;
    #JSON Konstrukt der Datenverbindung 
    $App_JSON = Invoke-QlikGet -path /qrs/dataconnection/$AppID;
    #Dem JSON Konstrukt ein neues Password zuweisen
    $App_JSON | Add-Member Password $Password -Force;

    #JSON konform konvertieren
    $App_JSON = $App_JSON | ConvertTo-Json;

    #Übermitteln
    Invoke-QlikPut -path https://$($QlikSenseServer):4242/qrs/dataconnection/$AppID -body $App_JSON;&lt;/LI-CODE&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 11:37:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Dataconnection-Password-through-Qlik-Cli/m-p/1600346#M10933</guid>
      <dc:creator>tobiasweidemann</dc:creator>
      <dc:date>2019-07-09T11:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Change Dataconnection Password through Qlik-Cli</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Dataconnection-Password-through-Qlik-Cli/m-p/1600370#M10934</link>
      <description>&lt;P&gt;Hi Tobias,&lt;/P&gt;&lt;P&gt;I haven't tried your code yet, but I have a small question.&lt;BR /&gt;Since Qlik-CLI provides functions to work with dataconnections, why not using&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Update-QlikDataConnection&lt;/EM&gt;&lt;/STRONG&gt;? You can find more through powershell's &lt;EM&gt;&lt;STRONG&gt;get-help&lt;/STRONG&gt; &lt;/EM&gt;or directly here:&amp;nbsp;&lt;A href="https://github.com/ahaydon/Qlik-Cli/blob/master/resources/dataconnection.ps1" target="_blank"&gt;https://github.com/ahaydon/Qlik-Cli/blob/master/resources/dataconnection.ps1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Riccardo&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 12:18:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Dataconnection-Password-through-Qlik-Cli/m-p/1600370#M10934</guid>
      <dc:creator>rzenere_avvale</dc:creator>
      <dc:date>2019-07-09T12:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Change Dataconnection Password through Qlik-Cli</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Dataconnection-Password-through-Qlik-Cli/m-p/1600418#M10939</link>
      <description>&lt;P&gt;It works now, thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 13:29:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Dataconnection-Password-through-Qlik-Cli/m-p/1600418#M10939</guid>
      <dc:creator>tobiasweidemann</dc:creator>
      <dc:date>2019-07-09T13:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Change Dataconnection Password through Qlik-Cli</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Dataconnection-Password-through-Qlik-Cli/m-p/1601058#M10956</link>
      <description>&lt;P&gt;Yep, there was an added function which handles things.&lt;/P&gt;
&lt;P&gt;To do it without the function you're likely missing getting the raw output. Otherwise Qlik-CLI does handing of the dates. Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;
$Data = Get-Content C:\ProgramData\Qlik\Sense\Host.cfg
# Convert the base64 encoded install name for Sense to UTF data
$FQDN = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($($Data)))
Connect-Qlik -Username INTERNAL\sa_api -TrustAllCerts
$Password = 'foo'
$rawoutput=$true
# Get the ID of the Data Connection
$RESTapp = Invoke-QlikGet -path "/qrs/dataconnection/full?filter=(name eq 'Temp (qtsel_ltu)')"
# Filter out the ID value for later GET
$RESTappID = $RESTapp.id
# GET the DataConnection JSON
$RESTappDC = Invoke-QlikGet -path /qrs/dataconnection/$RESTappID
# Swap the password out in the JSON
$RESTappDC | Add-Member Password $Password -Force
# Convert to actual JSON
$RESTappDC = $RESTappDC | ConvertTo-Json
# PUT in the new password
Invoke-QlikPut -path https://$($FQDN):4242/qrs/dataconnection/$RESTappID -body $RESTappDC
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 17:59:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Dataconnection-Password-through-Qlik-Cli/m-p/1601058#M10956</guid>
      <dc:creator>Levi_Turner</dc:creator>
      <dc:date>2019-07-10T17:59:36Z</dc:date>
    </item>
  </channel>
</rss>

