<?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 Authenticating with Qlik Data Catalyst REST API in Catalog and Lineage</title>
    <link>https://community.qlik.com/t5/Catalog-and-Lineage/Authenticating-with-Qlik-Data-Catalyst-REST-API/m-p/1556547#M21</link>
    <description>&lt;P&gt;I'm trying to connect to the API for Qlik Data Catalyst with PowerShell. The API documentation provides everything I need to make a call. In this attempt I am trying to use the the GET method, GET/source/v1/getSources. When I make the request, I get a successful response. However the content of the response is HTML: it appears that the request is not valid because it is the HTML of the login page. I noticed in the documentation it does not provide the method for providing credentials. I've tried encoding them in the header to no avail. Here is an example of the script I am running (with server removed):&lt;/P&gt;&lt;PRE&gt;$header = @{'Accept' = 'application/json'}
$uri = "http://SERVER:8080/podium/source/v1/getSources?type=EXTERNAL&amp;amp;count=500&amp;amp;sortAttr=name&amp;amp;sortDir=ASC"
Invoke-WebRequest -Uri $uri -Method Get -Headers $header&lt;/PRE&gt;&lt;P&gt;According to the curl example provided in the documentation, this is all that is needed. I assume that we somehow need to authenticate a user through this request because of the false positive response. Please advise how to proceed.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Dec 2021 22:35:04 GMT</pubDate>
    <dc:creator>brandon-ao</dc:creator>
    <dc:date>2021-12-07T22:35:04Z</dc:date>
    <item>
      <title>Authenticating with Qlik Data Catalyst REST API</title>
      <link>https://community.qlik.com/t5/Catalog-and-Lineage/Authenticating-with-Qlik-Data-Catalyst-REST-API/m-p/1556547#M21</link>
      <description>&lt;P&gt;I'm trying to connect to the API for Qlik Data Catalyst with PowerShell. The API documentation provides everything I need to make a call. In this attempt I am trying to use the the GET method, GET/source/v1/getSources. When I make the request, I get a successful response. However the content of the response is HTML: it appears that the request is not valid because it is the HTML of the login page. I noticed in the documentation it does not provide the method for providing credentials. I've tried encoding them in the header to no avail. Here is an example of the script I am running (with server removed):&lt;/P&gt;&lt;PRE&gt;$header = @{'Accept' = 'application/json'}
$uri = "http://SERVER:8080/podium/source/v1/getSources?type=EXTERNAL&amp;amp;count=500&amp;amp;sortAttr=name&amp;amp;sortDir=ASC"
Invoke-WebRequest -Uri $uri -Method Get -Headers $header&lt;/PRE&gt;&lt;P&gt;According to the curl example provided in the documentation, this is all that is needed. I assume that we somehow need to authenticate a user through this request because of the false positive response. Please advise how to proceed.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 22:35:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Catalog-and-Lineage/Authenticating-with-Qlik-Data-Catalyst-REST-API/m-p/1556547#M21</guid>
      <dc:creator>brandon-ao</dc:creator>
      <dc:date>2021-12-07T22:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Authenticating with Qlik Data Catalyst REST API</title>
      <link>https://community.qlik.com/t5/Catalog-and-Lineage/Authenticating-with-Qlik-Data-Catalyst-REST-API/m-p/1556560#M22</link>
      <description>&lt;P&gt;Hi Brandon&lt;/P&gt;&lt;P&gt;My understanding is that you are writing a powershell script to get a source/entity details. In that case, first we need to establish a 'session' by creating a 'cookie file' and use that cookie file in subsequent API calls via curl. Below is an example - syntax is specific to Linux, but i am sure it shouldn't be much different for powershell as well.&lt;/P&gt;&lt;P&gt;cd /working_directory_where_u_want_to_create_cookie_files/&lt;/P&gt;&lt;P&gt;curl -v -s -c ./cookie-jar-j.txt --data 'j_username=user_name@domain&amp;amp;j_passwordplain_or_encyrpted_pwd' 'http://URL:8080/podium/j_spring_security_check'&lt;/P&gt;&lt;P&gt;#Once the above is created use in subsequent calls. Example below to import a prepare object from Dev to PROD (or any other environment)&lt;/P&gt;&lt;P&gt;cmd="curl -s -b ./cookie-jar-j.txt -X POST 'http://URL:8080/podium/metadataImport/v2/upload/Workflows' -F 'file=@${import_file_name}'"&lt;/P&gt;&lt;P&gt;Just FYI - One more common pitfall is, the account used to execute REST commands via script should have ADMIN access on the target object (source/entity/connector etc) Else it would return ambiguous results.&lt;/P&gt;&lt;P&gt;Let me know for any further questions.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jitender Renwa&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 13:46:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Catalog-and-Lineage/Authenticating-with-Qlik-Data-Catalyst-REST-API/m-p/1556560#M22</guid>
      <dc:creator>jrenwa144</dc:creator>
      <dc:date>2019-03-14T13:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Authenticating with Qlik Data Catalyst REST API</title>
      <link>https://community.qlik.com/t5/Catalog-and-Lineage/Authenticating-with-Qlik-Data-Catalyst-REST-API/m-p/1559686#M25</link>
      <description>&lt;P&gt;Hi Brandon&lt;/P&gt;&lt;P&gt;Can you confirm if you were able to resolve the issue?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jitender Renwa&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 15:58:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Catalog-and-Lineage/Authenticating-with-Qlik-Data-Catalyst-REST-API/m-p/1559686#M25</guid>
      <dc:creator>jrenwa144</dc:creator>
      <dc:date>2019-03-21T15:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Authenticating with Qlik Data Catalyst REST API</title>
      <link>https://community.qlik.com/t5/Catalog-and-Lineage/Authenticating-with-Qlik-Data-Catalyst-REST-API/m-p/1800706#M589</link>
      <description>&lt;P&gt;Does it keep working?&lt;BR /&gt;&lt;BR /&gt;Im tryng do it, but my postman return:&lt;BR /&gt;'&lt;SPAN&gt;Could not verify the provided CSRF token because your session was not found.'&lt;/SPAN&gt;&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="iulihardt_0-1618867400532.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/53246i4E6D9F818FCECBB8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="iulihardt_0-1618867400532.png" alt="iulihardt_0-1618867400532.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 21:26:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Catalog-and-Lineage/Authenticating-with-Qlik-Data-Catalyst-REST-API/m-p/1800706#M589</guid>
      <dc:creator>iulihardt</dc:creator>
      <dc:date>2021-04-19T21:26:58Z</dc:date>
    </item>
  </channel>
</rss>

