Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Qlik-cli, known on the command line simply as qlik, is a command line interface for Qlik cloud. It provides access to all public APIs through the command line, making it easier to perform administrative tasks.
By now, working with Qlik-cli might be an obvious choice, to enhance your experience, here are six (6) things you might not know about Qlik-cli.
1. The alias command:
The alias command is a customisable command that enables you to create short names for commands that are not easy to remember. For example, if you want to list 50 items you would call qlik item ls --limit 50 .
Instead, you can create an alias i or use any word that makes it easier for you to remember.
qlik i
To see existing aliases you can call:
qlik alias ls
For more details call:
qlik alias --help
2. The edit command:
qlik space edit <spaceid>
3. The Raw Command:
qlik raw get v1/items
4. The verbose flag:
qlik app create -v
This is the response you get:
Server-type not set, guessing "cloud"
POST https://yourtenant.qlik.com/api/v1/apps
* Establishing connection to: yourtenant.qlik.com:443
* TLS Handshake started
* TLS Handshake done (188ms), version: TLS v1.3
* Connection established (410ms)
> Host:yourtenant.qlik.com
> User-Agent: qlik-cli/2.16.0 (darwin)
> Transfer-Encoding: chunked
> Authorization: Bearer **omitted**
> Content-Type: application/json
> Referer: https://yourtenant.qlik.com
> Accept-Encoding: gzip
PAYLOAD:
{}
< Cache-Control: no-store
< Connection: keep-alive
< Content-Length: 979
< Content-Type: application/json; charset=UTF-8
< Date: Wed, 11 Jan 2023 13:48:17 GMT
< Pragma: no-cache
< Strict-Transport-Security: max-age=15724800; includeSubDomains
Response time: 2s
Status: 200 OK
{
"attributes": {
"_resourcetype": "app",
"createdDate": "2023-01-11T13:48:15.996Z",
"custom": {},
"description": "",
"dynamicColor": "",
"encrypted": true,
"hasSectionAccess": false,
"id": "514******",
"isDirectQueryMode": false,
"lastReloadTime": "",
"modifiedDate": "2023-01-11T13:48:17.373Z",
"name": "514fffd9-bf9c-4f95-9b59-93040211d014",
"originAppId": "",
"owner": "auth0|e43**********",
"ownerId": "OwnerID",
"publishTime": "",
"published": false,
"thumbnail": ""
},
"create": [
{
"canCreate": true,
"resource": "sheet"
},
{
"canCreate": true,
"resource": "bookmark"
},
{
"canCreate": true,
"resource": "snapshot"
},
{
"canCreate": true,
"resource": "story"
},
{
"canCreate": true,
"resource": "dimension"
},
{
"canCreate": true,
"resource": "measure"
},
{
"canCreate": true,
"resource": "masterobject"
},
{
"canCreate": true,
"resource": "variable"
}
],
"privileges": [
"read",
"update",
"delete",
"reload",
"export",
"duplicate",
"change_space",
"export_reduced",
"source"
]
}
And this is what you get when you create an app without the verbose flag (-v):
{
"attributes": {
"_resourcetype": "app",
"createdDate": "2023-01-11T13:52:39.099Z",
"custom": {},
"description": "",
"dynamicColor": "",
"encrypted": true,
"hasSectionAccess": false,
"id": "9d*********",
"isDirectQueryMode": false,
"lastReloadTime": "",
"modifiedDate": "2023-01-11T13:52:40.044Z",
"name": "9d4c0950-ccd7-4824-9a96-db8f04a23716",
"originAppId": "",
"owner": "auth0|e43*********",
"ownerId": "63*********",
"publishTime": "",
"published": false,
"thumbnail": ""
},
"create": [
{
"canCreate": true,
"resource": "sheet"
},
{
"canCreate": true,
"resource": "bookmark"
},
{
"canCreate": true,
"resource": "snapshot"
},
{
"canCreate": true,
"resource": "story"
},
{
"canCreate": true,
"resource": "dimension"
},
{
"canCreate": true,
"resource": "measure"
},
{
"canCreate": true,
"resource": "masterobject"
},
{
"canCreate": true,
"resource": "variable"
}
],
"privileges": [
"read",
"update",
"delete",
"reload",
"export",
"duplicate",
"change_space",
"export_reduced",
"source"
]
}
5. The Quiet flag:
qlik app ls -q | head -n1 | qlik app get
qlik app create -q
6. Autocompletion:
The autocompletion provided in Qlik-cli does not only autocomplete the known commands but can also be used to list the resource id used for a specific command. If you have configured autocompletion in your shell you can use TAB to go through space IDs for instance.
Note: Completion should be added after Qlik-cli installation. You can see this tutorial on how to add completion.
If you are just getting started with Qlik-cli, you can learn more here or watch this video for an introduction to qlik-cli
Feel free to add more cool things we should know about qlik-cli.
/Gertrude.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.