<?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>article Call the Qlik Sense QRS API with Python in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/ta-p/1715877</link>
    <description>&lt;P&gt;&lt;SPAN&gt;This article is a guide on how to&amp;nbsp;call the Qlik Sense Repository API using Python.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environments:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Qlik Sense any version&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Python 3.x&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Prerequisites to host the app on a different server&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Export the certificates from the QMC, provide a password and select &lt;FONT face="courier new,courier"&gt;platform independent PEM-format&lt;/FONT&gt;&amp;nbsp;in the&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt;Export file format for certificates&lt;/FONT&gt;&amp;nbsp;option.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Copy the &lt;FONT face="courier new,courier"&gt;client.pem&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;client_key.pem&lt;/FONT&gt; &lt;SPAN&gt;certificates to the external server where the application is hosted.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;The Qlik Sense Repository (QRS) API is a RESTful API, so in order to call it from Python, you would need to use a module such as &lt;STRONG&gt;requests&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;This can be simply installed using pip:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;pip install requests&lt;/PRE&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Option 1: Connecting using certificates&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt; Create a python file &lt;I&gt;test.py &lt;/I&gt;with the following contents (&lt;U&gt;strings in red&lt;/U&gt; should be replaced to match your environment):&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;import requests

requests.packages.urllib3.disable_warnings()

#Set up necessary headers comma separated
xrf = 'iX83QmNlvu87yyAB'
headers = {'X-Qlik-xrfkey': xrf,
"Content-Type": "application/json",
"X-Qlik-User":"UserDirectory=&lt;STRONG&gt;&lt;SPAN&gt;DOMAIN&lt;/SPAN&gt;&lt;/STRONG&gt;;UserId=&lt;STRONG&gt;&lt;SPAN&gt;Administrator&lt;/SPAN&gt;&lt;/STRONG&gt;"}

#Set up the certificate path
cert = '&lt;SPAN&gt;&lt;STRONG&gt;C:\certificates\clientandkey.pem&lt;/STRONG&gt;&lt;/SPAN&gt;'

#Set the endpoint URL
url = 'https://&lt;SPAN&gt;&lt;STRONG&gt;qlikserver1.domain.local&lt;/STRONG&gt;&lt;/SPAN&gt;:4242/qrs/app/full?xrfkey={}'.format(xrf)

#Call the endpoint to get the list of Qlik Sense apps
resp = requests.get(url, headers=headers, verify=False, cert=cert)

if resp.status_code != 200:
    # Returns an error if something went wrong.
    raise ApiError('GET /qrs/app/full {}'.format(resp.status_code))
for app in resp.json():
    print('{} {}'.format(app['id'], app['name']))&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;The&amp;nbsp;clientandkey.pem file should look like below and contains both private key and certificate in pem format (Certificate and private key can be exported from QMC and it can be merged manually using a text editor)&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAigl7uyMr9zdiyZ4UU99IA15qaR6YisrkAxOEDh9aC5xX8cKX
mS++v6JjoIJCItLaAII19ubKylSLQZMfiYNMqKrKQIKH8VqgK8G5H/pAYkvpWuz+
MIp5cT4Xxg8sGNFFygHKVfbYPG6M7IXsqiuydKra1+wcgtqh0HrDfHRjzdImYCOB
P8zfVVFc5CbVri8mvtbyWr4BYSNcxbacASXo8VQAi5KNHXn39CsfQUy1YmHckBUe
vgMS6LwEks4WOY6FBGJ/0XeL2tgJYM85rHsnQNel5L2v5dVfJduZfOPojknjerZs
GqMZH/zfj14E/e/p0r2ilOgGNAV56yJmnFou5wIDAQABAoIBAGDs28bBoaOLboBn
0Zo7FFPZPhrl8vKyGHzYfUd1WEMC2vXVT6Gu1t+05QPVsx7Es3Lb+4yM7iQ4TTgU
WHa0jWV5116IyW/91K4k7xq3G/Jpn0fLVYk8Ep4jnYnjKXGbsMdxjmPiWl/EuIt0
VoP+/uXQ+q3XCwYPAsRjD1UaXOIt/rlRWvkr18Sx2OcReaFO7j83a/w61QSgVGN9
F5PA29s2KHPPLzsdFfM1Z9eYYQzySPd0Qh7J5lDtznbiaK2GwI+tTKDN6nAVgbkA
OY4fmPyeijQckmcFxpEvJg4E7Spxx+VXmVMma/ro5karL/VrrsCm8h3g19vV0Jn4
zTKBkJECgYEAzq/9vs02FnspPTpcAWaJwrw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QQDDApRbGlrQ2xpZW50MIIB
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAigl7uyMr9zdiyZ4UU99IA15q
aR6YisrkAxOEDh9aC5xX8cKXmS++v6JjoIJCItLaAII19ubKylSLQZMfiYNMqKrK
QIKH8VqgK8G5H/pAYkvpWuz+MIp5cT4Xxg8sGNFFygHKVfbYPG6M7IXsqiuydKra
1+wcgtqh0HrDfHRjzdImYCOBP8zfVVFc5CbVri8mvtbyWr4BYSNcxbacASXo8VQA
i5KNHXn39CsfQUy1YmHckBUevgMS6LwEks4WOY6FBGJ/0XeL2tgJYM85rHsnQNel
5L2v5dVfJduZfOPojknjerZsGqMZH/zfj14E/e/p0r2ilOgGNAV56yJmnFou5wID
AQABo1gwVjAdBgNVHQ4EFgQUHuRgu4W91AWDpUV89iV40Dn06KMwHwYDVR0jBBgw
FoAUWYVKKZg36ryR+h1omrSGo3ic+HowFAYIKwYBBQUHDQMECAQGQ2xpZW50MA0G
CSqGSIb3DQEBCwUAA4IBAQA2gVHTFyXOsjs2Vr1/EqNvx//a5QM+xcBSUvTQXfzZ
zoNofN0YCR5gc5SfS7ihf5R95MkrYXfKdhgCriqXVYExWiA0uPOLWsuMj9iaDJys
0494kUMA9UqiS+8AIfidCqkn4G1QpqtjEwPQMp3M2U3GkTkabQp6BB0Lf6srai6a
ASk33xatdm8c8mf8sTemm3Iu2VDR02eX6gNeDdo4S1pmil1HsIPJKqDEwXvRY0nF
kxedriyHdsXAz6Cb3stSl0szAeRuQ/B2UF3nW7VGMAjLiMFuDTLXai0539bzii0A
5rujJu/mt+wyljie0JUBfK1dvDCSSQUbHl4IEFGTX08b
-----END CERTIFICATE-----&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;If you get an error involving certificates change the following line in the code &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cert = '&lt;SPAN&gt;&lt;STRONG&gt;C:\certificates\clientandkey.pem&lt;/STRONG&gt;&lt;/SPAN&gt;'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;by&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cert = ('C:/certificates/client.pem', 'C:/certificates/client_key.pem') &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Option 2: Connecting using Windows authentication&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;You will need to also install the following module to handle NTLM authentication:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;pip install requests_ntlm&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a python file &lt;I&gt;test.py &lt;/I&gt;with the following contents (&lt;U&gt;strings in red&lt;/U&gt; should be replaced to match your environment):&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;import requests
from requests_ntlm import HttpNtlmAuth

requests.packages.urllib3.disable_warnings()

#Set up necessary headers comma separated
xrf = 'iX83QmNlvu87yyAB'
headers = {'X-Qlik-xrfkey': xrf,
"Content-Type": "application/json",
"User-Agent":"Windows"}

#Set up user credentials
user_auth = HttpNtlmAuth('&lt;SPAN&gt;&lt;STRONG&gt;domain\\user1&lt;/STRONG&gt;&lt;/SPAN&gt;','&lt;SPAN&gt;&lt;STRONG&gt;MyPassword&lt;/STRONG&gt;&lt;/SPAN&gt;')

#add xrfkey to URL
url = 'https://&lt;SPAN&gt;&lt;STRONG&gt;qlikserver1.domain.local&lt;/STRONG&gt;&lt;/SPAN&gt;/qrs/app/full?xrfkey={}'.format(xrf)

#Call the endpoint to get the list of Qlik Sense apps
resp = requests.get(url,headers = headers,verify=False,auth=user_auth)

if resp.status_code != 200:
    # Returns an error if something went wrong.
    raise ApiError('GET /qrs/app/full {}'.format(resp.status_code))
for app in resp.json():
    print('{1} {0}'.format(app['id'], app['name']))&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example of result obtained:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;PS C:\certificates&amp;gt; python test.py
&lt;STRONG&gt;9b428869-0fba-4ba5-9f94-901ae2fdf041 test1
72e183c7-f838-4a8e-8e16-1014aa80acb4 License Monitor
38476273-ae47-475b-bee0-68cffa384ae1 Operations Monitor
9cdad10c-a230-4c78-b4f7-0d97ca30a48a testuser2
9fa859ed-b59c-4574-bf26-2620e09f1289 test1(1)
d3c96fe7-2b3b-457a-82d7-2b32edbf4190 License Monitor_22.0.4.0
df32a902-bccb-4187-8c64-4223f6694f7c Operations Monitor_22.0.4.0&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;I&gt;&lt;STRONG&gt;&lt;SPAN&gt;!&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;The information in this article is provided as-is and to be used at own discretion. Ongoing support on the solution is not provided by Qlik Support.&lt;/I&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 31 May 2022 06:57:45 GMT</pubDate>
    <dc:creator>Damien_V</dc:creator>
    <dc:date>2022-05-31T06:57:45Z</dc:date>
    <item>
      <title>Call the Qlik Sense QRS API with Python</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/ta-p/1715877</link>
      <description>&lt;P&gt;&lt;SPAN&gt;This article is a guide on how to&amp;nbsp;call the Qlik Sense Repository API using Python.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environments:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Qlik Sense any version&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Python 3.x&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Prerequisites to host the app on a different server&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Export the certificates from the QMC, provide a password and select &lt;FONT face="courier new,courier"&gt;platform independent PEM-format&lt;/FONT&gt;&amp;nbsp;in the&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt;Export file format for certificates&lt;/FONT&gt;&amp;nbsp;option.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Copy the &lt;FONT face="courier new,courier"&gt;client.pem&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;client_key.pem&lt;/FONT&gt; &lt;SPAN&gt;certificates to the external server where the application is hosted.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;The Qlik Sense Repository (QRS) API is a RESTful API, so in order to call it from Python, you would need to use a module such as &lt;STRONG&gt;requests&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;This can be simply installed using pip:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;pip install requests&lt;/PRE&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Option 1: Connecting using certificates&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt; Create a python file &lt;I&gt;test.py &lt;/I&gt;with the following contents (&lt;U&gt;strings in red&lt;/U&gt; should be replaced to match your environment):&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;import requests

requests.packages.urllib3.disable_warnings()

#Set up necessary headers comma separated
xrf = 'iX83QmNlvu87yyAB'
headers = {'X-Qlik-xrfkey': xrf,
"Content-Type": "application/json",
"X-Qlik-User":"UserDirectory=&lt;STRONG&gt;&lt;SPAN&gt;DOMAIN&lt;/SPAN&gt;&lt;/STRONG&gt;;UserId=&lt;STRONG&gt;&lt;SPAN&gt;Administrator&lt;/SPAN&gt;&lt;/STRONG&gt;"}

#Set up the certificate path
cert = '&lt;SPAN&gt;&lt;STRONG&gt;C:\certificates\clientandkey.pem&lt;/STRONG&gt;&lt;/SPAN&gt;'

#Set the endpoint URL
url = 'https://&lt;SPAN&gt;&lt;STRONG&gt;qlikserver1.domain.local&lt;/STRONG&gt;&lt;/SPAN&gt;:4242/qrs/app/full?xrfkey={}'.format(xrf)

#Call the endpoint to get the list of Qlik Sense apps
resp = requests.get(url, headers=headers, verify=False, cert=cert)

if resp.status_code != 200:
    # Returns an error if something went wrong.
    raise ApiError('GET /qrs/app/full {}'.format(resp.status_code))
for app in resp.json():
    print('{} {}'.format(app['id'], app['name']))&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;The&amp;nbsp;clientandkey.pem file should look like below and contains both private key and certificate in pem format (Certificate and private key can be exported from QMC and it can be merged manually using a text editor)&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAigl7uyMr9zdiyZ4UU99IA15qaR6YisrkAxOEDh9aC5xX8cKX
mS++v6JjoIJCItLaAII19ubK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VjAdBgNVHQ4EFgQUHuRgu4W91AWDpUV89iV40Dn06KMwHwYDVR0jBBgw
FoAUWYVKKZg36ryR+h1omrSGo3ic+HowFAYIKwYBBQUHDQMECAQGQ2xpZW50MA0G
CSqGSIb3DQEBCwUAA4IBAQA2gVHTFyXOsjs2Vr1/EqNvx//a5QM+xcBSUvTQXfzZ
zoNofN0YCR5gc5SfS7ihf5R95MkrYXfKdhgCriqXVYExWiA0uPOLWsuMj9iaDJys
0494kUMA9UqiS+8AIfidCqkn4G1QpqtjEwPQMp3M2U3GkTkabQp6BB0Lf6srai6a
ASk33xatdm8c8mf8sTemm3Iu2VDR02eX6gNeDdo4S1pmil1HsIPJKqDEwXvRY0nF
kxedriyHdsXAz6Cb3stSl0szAeRuQ/B2UF3nW7VGMAjLiMFuDTLXai0539bzii0A
5rujJu/mt+wyljie0JUBfK1dvDCSSQUbHl4IEFGTX08b
-----END CERTIFICATE-----&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;If you get an error involving certificates change the following line in the code &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cert = '&lt;SPAN&gt;&lt;STRONG&gt;C:\certificates\clientandkey.pem&lt;/STRONG&gt;&lt;/SPAN&gt;'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;by&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cert = ('C:/certificates/client.pem', 'C:/certificates/client_key.pem') &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Option 2: Connecting using Windows authentication&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;You will need to also install the following module to handle NTLM authentication:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;pip install requests_ntlm&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a python file &lt;I&gt;test.py &lt;/I&gt;with the following contents (&lt;U&gt;strings in red&lt;/U&gt; should be replaced to match your environment):&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;import requests
from requests_ntlm import HttpNtlmAuth

requests.packages.urllib3.disable_warnings()

#Set up necessary headers comma separated
xrf = 'iX83QmNlvu87yyAB'
headers = {'X-Qlik-xrfkey': xrf,
"Content-Type": "application/json",
"User-Agent":"Windows"}

#Set up user credentials
user_auth = HttpNtlmAuth('&lt;SPAN&gt;&lt;STRONG&gt;domain\\user1&lt;/STRONG&gt;&lt;/SPAN&gt;','&lt;SPAN&gt;&lt;STRONG&gt;MyPassword&lt;/STRONG&gt;&lt;/SPAN&gt;')

#add xrfkey to URL
url = 'https://&lt;SPAN&gt;&lt;STRONG&gt;qlikserver1.domain.local&lt;/STRONG&gt;&lt;/SPAN&gt;/qrs/app/full?xrfkey={}'.format(xrf)

#Call the endpoint to get the list of Qlik Sense apps
resp = requests.get(url,headers = headers,verify=False,auth=user_auth)

if resp.status_code != 200:
    # Returns an error if something went wrong.
    raise ApiError('GET /qrs/app/full {}'.format(resp.status_code))
for app in resp.json():
    print('{1} {0}'.format(app['id'], app['name']))&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example of result obtained:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;PS C:\certificates&amp;gt; python test.py
&lt;STRONG&gt;9b428869-0fba-4ba5-9f94-901ae2fdf041 test1
72e183c7-f838-4a8e-8e16-1014aa80acb4 License Monitor
38476273-ae47-475b-bee0-68cffa384ae1 Operations Monitor
9cdad10c-a230-4c78-b4f7-0d97ca30a48a testuser2
9fa859ed-b59c-4574-bf26-2620e09f1289 test1(1)
d3c96fe7-2b3b-457a-82d7-2b32edbf4190 License Monitor_22.0.4.0
df32a902-bccb-4187-8c64-4223f6694f7c Operations Monitor_22.0.4.0&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;I&gt;&lt;STRONG&gt;&lt;SPAN&gt;!&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;The information in this article is provided as-is and to be used at own discretion. Ongoing support on the solution is not provided by Qlik Support.&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 06:57:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/ta-p/1715877</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2022-05-31T06:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Call the Qlik Sense QRS API with Python</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/1897744#M5653</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp; ,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this is an amazing article, which I have been able to use and works as expected. I have a question though:&lt;/P&gt;
&lt;P&gt;We are using a third party server provider for our ssl certificate.&lt;/P&gt;
&lt;P&gt;The question I have is using the PEM files, as per above i.e. Qlik default ones is the connection secure?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or do we need to generate equivalent PEM files from our ssl certificate ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 16:58:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/1897744#M5653</guid>
      <dc:creator>cpra_qlik</dc:creator>
      <dc:date>2022-02-25T16:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Call the Qlik Sense QRS API with Python</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/1898246#M5659</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/102468"&gt;@cpra_qlik&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In the current product design, it's not possible to replace the QlikClient certificate by a 3rd party generated certificate. The API can only be called by the QlikClient certificate generated by Qlik Sense itself.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 12:50:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/1898246#M5659</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2022-02-28T12:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Call the Qlik Sense QRS API with Python</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/1932989#M6447</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp;will this approach work via the proxy server rather than direct to port 4242?&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 11:09:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/1932989#M6447</guid>
      <dc:creator>DavidFosterVF</dc:creator>
      <dc:date>2022-05-19T11:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Call the Qlik Sense QRS API with Python</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/1933037#M6449</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/163820"&gt;@DavidFosterVF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, that's what option 2 is explaining if you scroll down in the article.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 12:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/1933037#M6449</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2022-05-19T12:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Call the Qlik Sense QRS API with Python</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/1933116#M6451</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp; got it working now. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 13:59:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/1933116#M6451</guid>
      <dc:creator>DavidFosterVF</dc:creator>
      <dc:date>2022-05-19T13:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Call the Qlik Sense QRS API with Python</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/1995964#M7603</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;First at all thanks for sharing this example.&lt;/P&gt;
&lt;P&gt;I'd like to know how to adapt your script to obtain the script for each app. I mean, I'd like to send the request below:&lt;/P&gt;
&lt;P&gt;{&lt;BR /&gt;"handle": 1,&lt;BR /&gt;"method": "GetScript",&lt;BR /&gt;"params": {}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;I understand your script is working with the Global object and to run the GetScript request I have to work with Doc object. The list of docs objects can be obtained from your script however I don't know how to request "GetScript".&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 07:14:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/1995964#M7603</guid>
      <dc:creator>LDR</dc:creator>
      <dc:date>2022-10-24T07:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Call the Qlik Sense QRS API with Python</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/2000007#M7682</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/99769"&gt;@LDR&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To receive more direct assistance with your customisation request, I would recommend posting about this in the correct forum (&lt;A href="https://community.qlik.com/t5/integration-extension-apis/bd-p/qlik-sense-integration-extension-api" target="_blank" rel="noopener"&gt;APIs and Intregations&lt;/A&gt;&amp;nbsp;).&lt;/P&gt;
&lt;P&gt;All the best,&lt;BR /&gt;Sonja&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 09:45:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/2000007#M7682</guid>
      <dc:creator>Sonja_Bauernfeind</dc:creator>
      <dc:date>2022-11-03T09:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Call the Qlik Sense QRS API with Python</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/2000057#M7690</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28597"&gt;@Sonja_Bauernfeind&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll do that. However, so far I'm learning about Qlik APIs maybe REST APIs will be enough according my requirements.&lt;/P&gt;
&lt;P&gt;Thanks for your point of view&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 10:54:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/2000057#M7690</guid>
      <dc:creator>LDR</dc:creator>
      <dc:date>2022-11-03T10:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Call the Qlik Sense QRS API with Python</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/2108314#M9978</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp;Works perfectly. But how can I verify the certificates to avoid getting warnings all the time?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 09:25:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/2108314#M9978</guid>
      <dc:creator>Kellerassel</dc:creator>
      <dc:date>2023-08-22T09:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Call the Qlik Sense QRS API with Python</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/2468481#M14236</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please do you know if it s possible to connect Python to Qlik Sense Enterprise?&lt;BR /&gt;&lt;BR /&gt;I have some data sheets in some streams and I d like to access them automatically&lt;BR /&gt;&lt;BR /&gt;thanks for your help&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2024 18:18:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Call-the-Qlik-Sense-QRS-API-with-Python/tac-p/2468481#M14236</guid>
      <dc:creator>maurizio_lospinoso</dc:creator>
      <dc:date>2024-07-06T18:18:25Z</dc:date>
    </item>
  </channel>
</rss>

