<?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 How to use the curl command in Qlik Enterprise Manager in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/How-to-use-the-curl-command-in-Qlik-Enterprise-Manager/ta-p/2145038</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Logging into the &lt;A href="https://help.qlik.com/en-US/enterprise-manager/Content/EnterpriseManager/Main/Introduction/Home.htm" target="_blank" rel="noopener"&gt;Qlik Enterprise Manager&lt;/A&gt; console prompts for a username and password. The login is generally in the format of&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;domain_name\username&lt;/FONT&gt;. These credentials can be used for curl to obtain a &lt;FONT color="#339966"&gt;&lt;STRONG&gt;sessionid&lt;/STRONG&gt; &lt;/FONT&gt;to run API commands from curl.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can authenticate either using domain\username or basic authentication using a base64 encoded string of the username and password.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Username and Password:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open a &lt;STRONG&gt;command prompt&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Run the following command, where &lt;FONT face="courier new,courier"&gt;DOMAIN_NAME\USER&lt;/FONT&gt; is the username you want to authenticate with and &amp;lt;your URL&amp;gt; the hostname.&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;curl -i -k -u DOMAIN_NAME\USER https://&amp;lt;your URL&amp;gt;/attunityenterprisemanager/api/V1/login&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Enter the password when prompted&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Copy the&amp;nbsp;&lt;STRONG&gt;apisessionid&amp;nbsp;&lt;/STRONG&gt;returned&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sessionid returned with CURL.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125944iE2D70544EE451C27/image-size/large?v=v2&amp;amp;px=999" role="button" title="sessionid returned with CURL.png" alt="sessionid returned with CURL.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Basic Authentication:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Encode your username and password using a base64 encoder&lt;BR /&gt;
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI&gt;Create the following string out of your username and password:&amp;nbsp;&lt;FONT face="courier new,courier" size="3"&gt;USER@YOURDOMAIN:YourPassword&lt;/FONT&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Use a base64 encoder to encode the string. The result will look something like this:&amp;nbsp;&lt;FONT face="courier new,courier" size="3"&gt;YWRtaW5YWw6UGFzc3dmQxMjMh&lt;/FONT&gt; (not a real result)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Copy the result&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Open a &lt;STRONG&gt;command prompt&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Run the following command, inserting your encoded credentials and hostname:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;curl -i -k --header "Authorization: Basic &lt;STRONG&gt;&lt;FONT face="courier new,courier" size="3"&gt;YWRtaW5YWw6UGFzc3dmQxMjMh&lt;/FONT&gt;&lt;/STRONG&gt;" https://&lt;STRONG&gt;&amp;lt;your URL&amp;gt;&lt;/STRONG&gt;/attunityenterprisemanager/api/V1/Login&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Copy the&amp;nbsp;&lt;STRONG&gt;apisessionid&amp;nbsp;&lt;/STRONG&gt;returned&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sessionid returned with CURL basic authentication.png" style="width: 968px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125948i0C3765B737241886/image-size/large?v=v2&amp;amp;px=999" role="button" title="sessionid returned with CURL basic authentication.png" alt="sessionid returned with CURL basic authentication.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;You can then use the generated session ID to run other API commands. The session ID is valid for ten minutes before a new one needs to be created.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example API call to stop a task:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;curl -i -k -X POST --header "EnterpriseManager.APISessionID: &lt;FONT face="courier new,courier" size="3"&gt;YdfaW5YWw6UGFzs3dmQxMjMh&lt;/FONT&gt;" --header "Content-Length: 0"&amp;nbsp;https://SERVERNAME/attunityenterprisemanager/api/v1/servers/Replicate/tasks/Test-Task?action=stop&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;LI-PRODUCT title="Qlik Enterprise Manager" id="qlikEnterpriseManager"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Dec 2023 15:05:07 GMT</pubDate>
    <dc:creator>Gerald_U</dc:creator>
    <dc:date>2023-12-21T15:05:07Z</dc:date>
    <item>
      <title>How to use the curl command in Qlik Enterprise Manager</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/How-to-use-the-curl-command-in-Qlik-Enterprise-Manager/ta-p/2145038</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Logging into the &lt;A href="https://help.qlik.com/en-US/enterprise-manager/Content/EnterpriseManager/Main/Introduction/Home.htm" target="_blank" rel="noopener"&gt;Qlik Enterprise Manager&lt;/A&gt; console prompts for a username and password. The login is generally in the format of&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;domain_name\username&lt;/FONT&gt;. These credentials can be used for curl to obtain a &lt;FONT color="#339966"&gt;&lt;STRONG&gt;sessionid&lt;/STRONG&gt; &lt;/FONT&gt;to run API commands from curl.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can authenticate either using domain\username or basic authentication using a base64 encoded string of the username and password.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Username and Password:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open a &lt;STRONG&gt;command prompt&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Run the following command, where &lt;FONT face="courier new,courier"&gt;DOMAIN_NAME\USER&lt;/FONT&gt; is the username you want to authenticate with and &amp;lt;your URL&amp;gt; the hostname.&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;curl -i -k -u DOMAIN_NAME\USER https://&amp;lt;your URL&amp;gt;/attunityenterprisemanager/api/V1/login&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Enter the password when prompted&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Copy the&amp;nbsp;&lt;STRONG&gt;apisessionid&amp;nbsp;&lt;/STRONG&gt;returned&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sessionid returned with CURL.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125944iE2D70544EE451C27/image-size/large?v=v2&amp;amp;px=999" role="button" title="sessionid returned with CURL.png" alt="sessionid returned with CURL.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Basic Authentication:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Encode your username and password using a base64 encoder&lt;BR /&gt;
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI&gt;Create the following string out of your username and password:&amp;nbsp;&lt;FONT face="courier new,courier" size="3"&gt;USER@YOURDOMAIN:YourPassword&lt;/FONT&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Use a base64 encoder to encode the string. The result will look something like this:&amp;nbsp;&lt;FONT face="courier new,courier" size="3"&gt;YWRtaW5YWw6UGFzc3dmQxMjMh&lt;/FONT&gt; (not a real result)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Copy the result&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Open a &lt;STRONG&gt;command prompt&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Run the following command, inserting your encoded credentials and hostname:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;curl -i -k --header "Authorization: Basic &lt;STRONG&gt;&lt;FONT face="courier new,courier" size="3"&gt;YWRtaW5YWw6UGFzc3dmQxMjMh&lt;/FONT&gt;&lt;/STRONG&gt;" https://&lt;STRONG&gt;&amp;lt;your URL&amp;gt;&lt;/STRONG&gt;/attunityenterprisemanager/api/V1/Login&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Copy the&amp;nbsp;&lt;STRONG&gt;apisessionid&amp;nbsp;&lt;/STRONG&gt;returned&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sessionid returned with CURL basic authentication.png" style="width: 968px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125948i0C3765B737241886/image-size/large?v=v2&amp;amp;px=999" role="button" title="sessionid returned with CURL basic authentication.png" alt="sessionid returned with CURL basic authentication.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;You can then use the generated session ID to run other API commands. The session ID is valid for ten minutes before a new one needs to be created.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example API call to stop a task:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;curl -i -k -X POST --header "EnterpriseManager.APISessionID: &lt;FONT face="courier new,courier" size="3"&gt;YdfaW5YWw6UGFzs3dmQxMjMh&lt;/FONT&gt;" --header "Content-Length: 0"&amp;nbsp;https://SERVERNAME/attunityenterprisemanager/api/v1/servers/Replicate/tasks/Test-Task?action=stop&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;LI-PRODUCT title="Qlik Enterprise Manager" id="qlikEnterpriseManager"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 15:05:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/How-to-use-the-curl-command-in-Qlik-Enterprise-Manager/ta-p/2145038</guid>
      <dc:creator>Gerald_U</dc:creator>
      <dc:date>2023-12-21T15:05:07Z</dc:date>
    </item>
  </channel>
</rss>

