Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!

How to install and start using Qlik-CLI for SaaS editions of Qlik Sense

67% helpful (2/3)
cancel
Showing results for 
Search instead for 
Did you mean: 
Andre_Sostizzo
Digital Support
Digital Support

How to install and start using Qlik-CLI for SaaS editions of Qlik Sense

Last Update:

Aug 26, 2024 6:28:42 PM

Updated By:

Frank_S

Created date:

Mar 31, 2021 1:46:31 PM

This video will demonstrate how to install and configure Qlik-CLI for SaaS editions of Qlik Sense.

Content:

 

 

Requirements

  • The user has access to a Qlik Cloud tenant
  • The user has a professional license assigned in the tenant
  • The user has the developer role assigned (required for API access)
  • An API key can be obtained

 

Installation method One

  1. Download Qlik-CLI from GitHub
  2. Copy the executable to a local directory
  3. Add the Qlik-CLI as an Environment Variable Path
    1. Open your Windows Control Panel
    2. Navigate to System 
    3. Open Advanced system settings in the leftmost menu
    4. Click Environment Variables 
    5. Locate Path in the User's System variables 
    6. Click Edit
    7. Click New
    8. Add the path to Qlik-CLI for example C:\Tools\Qlik-QLI\Modify the User Environment. Add path to Qlik-CLI. ie "C:\Tools\Qlik-QLI\"Modify the User Environment. Add path to Qlik-CLI. ie "C:\Tools\Qlik-QLI\"
    9. Confirm with OK until all windows are closed
  4. Confirm the Qlik-CLI location path to verify it the installation completed successfully 
    1. Open PowerShell
    2. Execute:
      get-command qlik​
    3. Closer PowerShell

 

Installation Method Two

  1. Download and install Chocolatey as documented on chocolatey.org.
  2. Open PowerShell
  3. Execute:
    choco install qlik-cli
  4. This completes the installation.

 

Enable the Completion Feature (optional, but useful)

  1. Verify if a PowerShell profile exists or create a new one
    1. Open PowerShell
    2. Execute:
      if ( -not (Test-Path $PROFILE) ) {
         echo "" > $PROFILE
      }​
  2. Open the profile with the command notepad $PROFILE:
    qlik completion ps > "./qlik_completion.ps1" # Create a file containing the powershell completion.
    . ./qlik_completion.ps1                      # Source the completion.​
  3. Save it. 
  4. Restart PowerShell

 

Use Qlik-CLI

Advanced and additional instructions as seen in the video can be found at Qlik-CLI on Qlik.Dev. Begin with Get Started.

 
 
Labels (1)
Comments
nhoover
Luminary
Luminary

@Saranya_Durairaj Can you successfully browse to this directory? just copy and paste the following into the Run dialog, or do a search on your computer: %userprofile%\.qlik

nhoover
Luminary
Luminary

@Saranya_Durairaj 
Once you browse to the location mentioned above, open the file contexts.yml in notepad and you can add in your API Key manually. My file looks similar to the following:

current-context: myQlikServer.us.qlikcloud.com
contexts:
myQlikServer.us.qlikcloud.com:
headers:
Authorization: Bearer MySuperLongAPIKeyIsLocatedHere
server: https://myQlikServer.us.qlikcloud.com

Saranya_Durairaj
Contributor
Contributor

Hi @nhoover,

I can able to navigate the path and update the sane which you mentioned in the previous comment. After that, I'm trying to use some examples but getting the "server URL not specified" error. 

Saranya_Durairaj_0-1719495338736.png

 

nhoover
Luminary
Luminary

@Saranya_Durairaj I would validate that you modified the server correctly to match your tenant and try again, I feel you are very close to success! You may need to open a support ticket as I'm unable to help past this point.

current-context: SaranyaServer.us.qlikcloud.com
contexts:
SaranyaServer.us.qlikcloud.com:
headers:
Authorization: Bearer MySuperLongAPIKeyIsLocatedHere
server: https://SaranyaServer.us.qlikcloud.com

Saranya_Durairaj
Contributor
Contributor

Hi @nhoover ,

I have successfully updated the API key in the context file, and it is functioning properly.. Now, I am trying to create the app, but I am getting an error message saying 'No such host'.

For reference,

Saranya_Durairaj_0-1722860247344.png

Regards,

Version history
Last update:
‎2024-08-26 06:28 PM
Updated by: