Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have dat like below in postman request
in qlik connection i am using nextUrl as my pagination
Next Url path :paging/link
it bring only one page can you help here
Because your pagination parameter is incorrect. To use an example API which returns subsequent pages in a URL in the response: https://rickandmortyapi.com/api/character
My next url path is root/info/next. Root is an artifact of how the Qlik REST connector works, you need to specify it. From there you need to provide the path in the JSON response to the URL. In this example it's info > next so I use root/info/next.
Example Load Script:
LIB CONNECT TO 'REST_httpsrickandmortyapi.comapicharacter';
RestConnectorMasterTable:
SQL SELECT
"__KEY_root",
(SELECT
"count",
"pages",
"next",
"prev",
"__FK_info"
FROM "info" FK "__FK_info"),
(SELECT
"id",
"name" AS "name_u1",
"status",
"species",
"type",
"gender",
"image",
"url" AS "url_u1",
"created",
"__KEY_results",
"__FK_results",
(SELECT
"name",
"url",
"__FK_origin"
FROM "origin" FK "__FK_origin"),
(SELECT
"name" AS "name_u0",
"url" AS "url_u0",
"__FK_location"
FROM "location" FK "__FK_location"),
(SELECT
"@Value",
"__FK_episode"
FROM "episode" FK "__FK_episode" ArrayValueAlias "@Value")
FROM "results" PK "__KEY_results" FK "__FK_results")
FROM JSON (wrap on) "root" PK "__KEY_root";
[info]:
LOAD [count],
[pages],
[next],
[prev],
[__FK_info] AS [__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_info]);
[origin]:
LOAD [name],
[url],
[__FK_origin] AS [__KEY_results]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_origin]);
[location]:
LOAD [name_u0] AS [name_u0],
[url_u0] AS [url_u0],
[__FK_location] AS [__KEY_results]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_location]);
[episode]:
LOAD [@Value],
[__FK_episode] AS [__KEY_results]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_episode]);
[results]:
LOAD [id],
[name_u1] AS [name_u1],
[status],
[species],
[type],
[gender],
[image],
[url_u1] AS [url_u1],
[created],
[__KEY_results],
[__FK_results] AS [__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_results]);
[root]:
LOAD [__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__KEY_root]);
DROP TABLE RestConnectorMasterTable;
Back to your example, I would expect the next URL parameter to be root/paging/next/link.
I would expect root/paging/next/link to work.
i see it is not loading all it is not fetching n ext link
Because your pagination parameter is incorrect. To use an example API which returns subsequent pages in a URL in the response: https://rickandmortyapi.com/api/character
My next url path is root/info/next. Root is an artifact of how the Qlik REST connector works, you need to specify it. From there you need to provide the path in the JSON response to the URL. In this example it's info > next so I use root/info/next.
Example Load Script:
LIB CONNECT TO 'REST_httpsrickandmortyapi.comapicharacter';
RestConnectorMasterTable:
SQL SELECT
"__KEY_root",
(SELECT
"count",
"pages",
"next",
"prev",
"__FK_info"
FROM "info" FK "__FK_info"),
(SELECT
"id",
"name" AS "name_u1",
"status",
"species",
"type",
"gender",
"image",
"url" AS "url_u1",
"created",
"__KEY_results",
"__FK_results",
(SELECT
"name",
"url",
"__FK_origin"
FROM "origin" FK "__FK_origin"),
(SELECT
"name" AS "name_u0",
"url" AS "url_u0",
"__FK_location"
FROM "location" FK "__FK_location"),
(SELECT
"@Value",
"__FK_episode"
FROM "episode" FK "__FK_episode" ArrayValueAlias "@Value")
FROM "results" PK "__KEY_results" FK "__FK_results")
FROM JSON (wrap on) "root" PK "__KEY_root";
[info]:
LOAD [count],
[pages],
[next],
[prev],
[__FK_info] AS [__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_info]);
[origin]:
LOAD [name],
[url],
[__FK_origin] AS [__KEY_results]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_origin]);
[location]:
LOAD [name_u0] AS [name_u0],
[url_u0] AS [url_u0],
[__FK_location] AS [__KEY_results]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_location]);
[episode]:
LOAD [@Value],
[__FK_episode] AS [__KEY_results]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_episode]);
[results]:
LOAD [id],
[name_u1] AS [name_u1],
[status],
[species],
[type],
[gender],
[image],
[url_u1] AS [url_u1],
[created],
[__KEY_results],
[__FK_results] AS [__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_results]);
[root]:
LOAD [__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__KEY_root]);
DROP TABLE RestConnectorMasterTable;
Back to your example, I would expect the next URL parameter to be root/paging/next/link.