Skip to content

How Pagination Works in Qlik-Cli

Pagination

Pagination is the process of retrieving data effieciently by breaking down complex outputs into smaller manageable sets. This helps to save resources and also provides a better experience for the user.

There are several ways in which pagination can be handled. This resource is the technical documentation of specific functionality and design flows in qlik-cli.

To learn more about pagination, sorting and filtering on the Qlik platform see this resource.

The qlik-cli has built-in logic around pagination, to simplify the tool’s usage across different APIs and resources.

Most API endpoints expose a limit query parameter, with a default, minimum and maximum value.

Note: The qlik-cli paginates if needed, in the background and returns all items in a single response. However, a single page only includes an array of 100 items.

Check the verbose logs for a more detailed example of how the pagination works. In the example below GET /v1/items has a maximum limit of 100. If 200 is passed using the --limit flag to the qlik-cli, then the tool will paginate once.

$ qlik item ls --resourceType "app,qvapp" --limit 200 --verbose | grep GET

GET https://qcs.us.qlikcloud.com/api/v1/items?limit=100&resourceType=app%2Cqvapp
* Establishing connection to: qcs.us.qlikcloud.com:443
* TLS Handshake started
* TLS Handshake done (101ms), version: TLS v1.3
* Connection established (200ms)
> Host: qcs.us.qlikcloud.com
> User-Agent: qlik-cli/v2.15.1-dev (darwin)
> Authorization: Bearer **omitted**
> Content-Type: application/json
> Referer: https://qcs.us.qlikcloud.com/
> Accept-Encoding: gzip
< Cache-Control: no-store
< Connection: keep-alive
< Content-Type: application/json; charset=utf-8
< Date: Mon, 17 Oct 2022 10:49:59 GMT
< Pragma: no-cache
< Ratelimit-Limit: 10
< Ratelimit-Remaining: 10
< Ratelimit-Reset: 1666003857
< Strict-Transport-Security: max-age=15724800; includeSubDomains
< X-B3-Traceid: 000000000000000096d6858d0439d090
Response time: 2s
Status: 200 OK
GET https://qcs.us.qlikcloud.com/api/v1/items?limit=100&next=KQAAAAljcmVhdGVkQXQASTXjAWoBAAAHX2lkAFysg-R3lykAAcwBjwA&resourceType=app%2Cqvapp
* Establishing connection to: qcs.us.qlikcloud.com:443
* Connection established (0ms)
> Host: qcs.us.qlikcloud.com
> User-Agent: qlik-cli/v2.15.1-dev (darwin)
> Authorization: Bearer **omitted**
> Content-Type: application/json
> Referer: https://qcs.us.qlikcloud.com/
> Accept-Encoding: gzip
< Cache-Control: no-store
< Connection: keep-alive
< Content-Type: application/json; charset=utf-8
< Date: Mon, 17 Oct 2022 10:49:59 GMT
< Pragma: no-cache
< Ratelimit-Limit: 10
< Ratelimit-Remaining: 10
< Ratelimit-Reset: 1666003859
< Strict-Transport-Security: max-age=15724800; includeSubDomains
< X-B3-Traceid: 0000000000000000b27fdb1a38a07999
Response time: 401ms
Status: 200 OK

ON THIS PAGE

Was this page helpful?