Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Raju_6952
Creator III
Creator III

Users Data through Api call

Hi,

I am using below end point to fecth users data through api but the pagnination is not work and it still fecthing only 2o rows of data.

https://test.qlikcloud.com/api/v1/users

any suggestion on configuring pagination to fecth all the user info from qlik cloud tenant.

 

 

Regards,

Raju

Labels (2)
1 Solution

Accepted Solutions
marksouzacosta

Limit should not matter if you are using pagination. Limit will only change the number of records per pagination.
I did an example on my Tenant that has 94 users using Limit = 5. Following the code:

Load Script:

LIB CONNECT TO 'GET Users';

RestConnectorMasterTable:
SQL SELECT 
	"__KEY_root",
	(SELECT 
		"name" AS "name_u2",
		"email",
		"__FK_data",
		"__KEY_data"
	FROM "data" PK "__KEY_data" FK "__FK_data")
FROM JSON (wrap on) "root" PK "__KEY_root";

[data]:
LOAD	[name_u2] AS [name_u2],
	[email]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_data]);


DROP TABLE RestConnectorMasterTable;

The result:

marksouzacosta_1-1739377404540.png

 

 

This is the connection - green arrows indicates the changes I made:

marksouzacosta_0-1739377381479.png

 

 

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

View solution in original post

10 Replies
diegozecchini
Specialist
Specialist

Hi!
look here
https://qlik.dev/apis/rest/users

it seems you want to do this API Call
curl -X GET "https://test.qlikcloud.com/api/v1/users?limit=50" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

marksouzacosta

Hi @Raju_6952,

You have to setup the pagination on your Rest Connection so it will return automatically all the records for you. Qlik API uses the Next URL Pagination Type, so, try this setting on your REST Connection:

marksouzacosta_0-1739371928880.png

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

Raju_6952
Creator III
Creator III
Author

Hi @marksouzacosta ,

 

I tried the same pagination but for user api call it's only fetching top 20 rows only.

 

Regards,

Raju

diegozecchini
Specialist
Specialist

yes 20 is the default, to change it you need to use parameter "limit"

https://qlik.dev/apis/rest/users

marksouzacosta

Limit should not matter if you are using pagination. Limit will only change the number of records per pagination.
I did an example on my Tenant that has 94 users using Limit = 5. Following the code:

Load Script:

LIB CONNECT TO 'GET Users';

RestConnectorMasterTable:
SQL SELECT 
	"__KEY_root",
	(SELECT 
		"name" AS "name_u2",
		"email",
		"__FK_data",
		"__KEY_data"
	FROM "data" PK "__KEY_data" FK "__FK_data")
FROM JSON (wrap on) "root" PK "__KEY_root";

[data]:
LOAD	[name_u2] AS [name_u2],
	[email]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_data]);


DROP TABLE RestConnectorMasterTable;

The result:

marksouzacosta_1-1739377404540.png

 

 

This is the connection - green arrows indicates the changes I made:

marksouzacosta_0-1739377381479.png

 

 

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

Raju_6952
Creator III
Creator III
Author

Hi @marksouzacosta ,

Many thanks for your suggestions you it works for me as well now.

Thanks again,

Regards,

Raju

 

diegozecchini
Specialist
Specialist

@marksouzacosta 👌

 

 
Raju_6952
Creator III
Creator III
Author

Hi @marksouzacosta ,

 

It would be great if you kindly share the api end point along with paganitaion for fecth app metadata like file size and loop through the other apps in our tenant.

And also many thanks for your suggestions in my previous requests.

 

Regards,

Raju

 

 
marksouzacosta

Sure @Raju_6952.

But, can you please open another topic and add the link here?
This will make easier for other users to find about this specific question.

Thank you,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com