Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Contributor II
Contributor II

Re: Howto set NPrining report filters trough REST Api?

{

"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"

                            }

                        ]

}

]

}

Highlighted

Re: Howto set NPrining report filters trough REST Api?

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.
Highlighted
Contributor II
Contributor II

Re: Howto set NPrining report filters trough REST Api?

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

Highlighted
Specialist
Specialist

Re: Howto set NPrining report filters trough REST Api?

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

Highlighted

Re: Howto set NPrining report filters trough REST Api?

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.
Highlighted
Partner
Partner

Re: Howto set NPrining report filters trough REST Api?

Hi,

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

Thanks,

Rajesh

Highlighted

Re: Howto set NPrining report filters trough REST Api?

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.