Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Howto set NPrining report filters trough REST Api?

Hi,

I try to get report from NPrinting. I send POST OnDemandRequest and then get it by GET-call OnDemandRequestResult.

Another task, I need to filter my report by some values (eg - quarter, year etc.). I try send PUT Filter request but get error - 400 with a message "Request is malformed". What I'm doing wrong?

This is JSON of the PUT-filter request:

{

  "id": "6c567bc4-1378-44c2-de4e-ff45673df23c",

  "enabled": "True",

  "fields": [{

  "name": "flag",

  "overrideValues": "True",

  "values": []

  }, {

  "name": "Test",

  "overrideValues": "True",

  "values": [{

  "value": "3",

  "type": "number"

  }, {

  "value": "4",

  "type": "number"

  }

  ]

  }

  ]

}

7 Replies
shneior2
Contributor II
Contributor II

{

"appId": "e278ee9a-8985-46da-9aa8-75c2474a4cb1",

"enabled":"True",

"name": "NEW_FILTER",

"fields": [

{

"connectionId": "cd9207ef-0eb9-4124-81b7-35f6913ed03c",

"name": "FILED_TO_FILTER",

"overrideValues": "false",

                        "values": [

                            {

                                "value": "1",

                                "type": "number"

                            }

                        ]

}

]

}

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

This is very interesting - does it mean that filter has to exist in first place before you can apply it?

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
shneior2
Contributor II
Contributor II

There is no meaning to the order of the field they just must to be there

for exemple you can write as follow

{

"appId": "e278ee9a-8985-46da-9aa8-75c2474a4cb1",

"enabled":"True",

"name": "NEW_FILTER",

"fields": [

{

"name": "FILED_TO_FILTER",

"overrideValues": "false",

                        "values": [

                            {

                                "value": "1",

                                "type": "number"

                            }

                        ],

"connectionId": "cd9207ef-0eb9-4124-81b7-35f6913ed03c"

}

]

}

note: that json add a new filter and you need to apply it on app/report/contact

amien
Specialist
Specialist

question on the side : how can i get the filters bound to a report? i can get the filters.. i can get the reports, but i don't see any way to link the filters to a report

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, there is not API endpoint allowing you to do it at the moment

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
rajesh9147
Partner - Contributor II
Partner - Contributor II

Hi,

Is there any API available now in Nprint 19 version  I want to apply the filter to a publish task?

Thanks,

Rajesh

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

No there is not. Use https://help.qlik.com to read API reference

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.