Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
anindya_manna
Creator II
Creator II

How to fetch entire Nprinting task list from Qliksense??(Only 50 task max is fetching)

Hi,

When I am fetching all the task list from Nprinting server in below code in RestConnectorMasterTable only 50 task is fetching.How to fetch entire task list?

LIB CONNECT TO  $(vAPIConnectionNameForGET);
//exit script;

let vEndpoint=  vNPrintingServer  & '/api/v1/tasks' ;

    RestConnectorMasterTable:
    SQL SELECT 
        "__KEY_data",
        (SELECT 
            "id",
            "name",
            "description",
            "type",
            "created",
            "lastUpdate",
            "lastExecution",
            "enabled",
            "appId",
            "__FK_items"
        FROM "items" FK "__FK_items")
    FROM JSON (wrap off) "data" PK "__KEY_data"
    with Connection (URL "$(vEndpoint)", HTTPHEADER "Cookie" "$(vCookie)");

    [items]:
    LOAD	[id] AS [id],
        [name] AS [name],
        [description] AS [description],
        [type] AS [type],
        [created] AS [created],
        [lastUpdate] AS [lastUpdate],
        [lastExecution] AS [lastExecution],
        [enabled] AS [enabled],
        [appId] AS [appId]
    RESIDENT RestConnectorMasterTable
    //WHERE NOT IsNull([__FK_items]) and [name]= $(vNPrintingPublishTaskName);
    WHERE NOT IsNull([__FK_items]); // and [id]= '$(vNPrintingPublishTaskID)';
Labels (2)
1 Reply
Daniel_Jenkins
Specialist III
Specialist III

Hi Anindya,

50 is the default. You can use the optional limit Query parameter to change this. See: https://help.qlik.com/en-US/nprinting/February2019/APIs/NP+API/index.html?page=51

Example:

let vEndpoint=  vNPrintingServer  & '/api/v1/tasks?limit=100' ;

HTH - Daniel.