I’m always on the lookout for a tool that would make my life easier as a developer. Qlik-cli is a great asset to have in your toolbox when working with Qlik Sense SaaS. As its name suggests, it is a command line interface that lets you tap into Qlik’s published APIs and take advantage of the full power and possibilities of Qlik Cloud.
Being able to perform any administrative task from the command line can be very attractive for developers or system administrators who, for one, are used to dealing with cloud platforms via a cli, but also just want to access certain tools quickly without going through the management console graphical interface especially when trying to execute tasks in bulk or automate certain workflows.
So whether you are looking to run tasks or reloads, check on those reloads, move apps between environments, manage user access, or make updates at a large scale, qlik-cli is the right tool for that.
Once you’ve installed qlik-cli on your machine, you will need to grab your API Key from the Qlik Cloud tenant and create and configure a context from the command line to authenticate to Qlik Sense SaaS.
You can always view contexts if you happen to have multiple tenants or users via the "qlik context ls" command, and switch between them using "qlik context use <context-name>"
With qlik-cli’s built-in documentation, it’s very intuitive to see see which commands and flags you can use by adding --help to any command.
For instance qlik app --help will return the following:
What are some of the things you can use qlik-cli for:
A quick and easy example to show how easy it is to perform certain tasks with qlik-cli is to create an app, add a script and reload it:
A good idea then is to maybe create a space and move all these apps to it with a few commands such as: “qlik space create” and “qlik app space update”
You can also do some basic task chaining by using a function that runs against a JSON object containing task name, app id and status. This process can be especially helpful when wanting to execute a reload upon the completion status of a preceding reload.
Another great application of the qlik-cli for folks who are moving away from Qlik Sense Enterprise Client-Managed to Qlik Cloud, is to use it for migration. By leveraging basic PowerShell scripts and qlik-cli commands, you can facilitate and speed up a process that would otherwise be tedious. You can find more information about the whole process here . Take a look at the PowerShell scripts (download and extract the “Qlik Cloud migration tools” zip file) to see qlik-cli commands in action for inspiration.
I hope this post helped you get a sense of how powerful yet simple qlik-cli can be when it’s used alongside shell scripting to access and unlock the full potential of Qlik Cloud APIs.