Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
Partner
Partner

POST Nprinting Body Parameters

Hello Community,

I want to add Roles to a user in Nprinting via Rest API

Can Somebody tell me the parameters in the BODY, which i have to add.

QVX_UNEXPECTED_END_OF_DATA: HTTP protocol error 400 (Bad Request):

{"error":{"code":400,"message":"Malformed parameters in body"}}

Post:

SQL SELECT

"__KEY_data"

FROM JSON (wrap off) "data" PK "__KEY_data"

WITH CONNECTION( URL "XXXXXXXXXXXX", BODY "????????????????????????",

HTTPHEADER "Origin" "XXXXXXXXXXXXXX",

HTTPHEADER "Content-Type" "application/json",

HTTPHEADER "X-HTTP-Method-Override" "PUT",

HTTPHEADER "cookie" "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; ")


Is there a general way to find the parameters for the bodies? Because I need this also for filters and groups for a user.


Thank you in advance

Aaron

1 Solution

Accepted Solutions
Partner
Partner

Re: POST Nprinting Body Parameters

Hi agan Aaron

I just solved my issue with Users/{id}/Groups with the following format for request body;

["my_group_guid"]

12 Replies
Partner
Partner

Re: POST Nprinting Body Parameters

Hi Aaron

Have you solved this? I'm struggling with a similar issue

Partner
Partner

Re: POST Nprinting Body Parameters

The API doc list "roleIds" as the required request body string - https://help.qlik.com/en-US/nprinting/February2018/APIs/NP+API/index.html#usersIdRolesPut

I've tried a lot of combinations like the following for a similiar NP API endpoint (PUT /users/{id}/groups);

{"groupIds"."guid1"}

without any luck

Partner
Partner

Re: POST Nprinting Body Parameters

Hy Johan,

i have not solve it - it still doesn't work

Partner
Partner

Re: POST Nprinting Body Parameters

Well i begin to think that the API isn't production ready yet, or at least poorly documented.

I will open up a support case tomorrow if I'm not able to solve it before then.

Partner
Partner

Re: POST Nprinting Body Parameters

will you post the answer of qlik or your solution ?

Partner
Partner

Re: POST Nprinting Body Parameters

of course

Partner
Partner

Re: POST Nprinting Body Parameters

Hi agan Aaron

I just solved my issue with Users/{id}/Groups with the following format for request body;

["my_group_guid"]

Partner
Partner

Re: POST Nprinting Body Parameters

I've tried the /Roles endpoint on my env. and it worked good with the request body above

Partner
Partner

Re: POST Nprinting Body Parameters

thanks a lot Johan! it also work for me!