Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
aaron_ppmc
Partner - Contributor III
Partner - Contributor III

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
blaise
Partner - Specialist
Partner - Specialist

Hi agan Aaron

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

["my_group_guid"]

View solution in original post

15 Replies
blaise
Partner - Specialist
Partner - Specialist

Hi Aaron

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

blaise
Partner - Specialist
Partner - Specialist

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

aaron_ppmc
Partner - Contributor III
Partner - Contributor III
Author

Hy Johan,

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

blaise
Partner - Specialist
Partner - Specialist

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.

aaron_ppmc
Partner - Contributor III
Partner - Contributor III
Author

will you post the answer of qlik or your solution ?

blaise
Partner - Specialist
Partner - Specialist

of course

blaise
Partner - Specialist
Partner - Specialist

Hi agan Aaron

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

["my_group_guid"]

blaise
Partner - Specialist
Partner - Specialist

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

aaron_ppmc
Partner - Contributor III
Partner - Contributor III
Author

thanks a lot Johan! it also work for me!