Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi agan Aaron
I just solved my issue with Users/{id}/Groups with the following format for request body;
["my_group_guid"]
Hi Aaron
Have you solved this? I'm struggling with a similar issue
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
Hy Johan,
i have not solve it - it still doesn't work
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.
will you post the answer of qlik or your solution ?
of course
Hi agan Aaron
I just solved my issue with Users/{id}/Groups with the following format for request body;
["my_group_guid"]
I've tried the /Roles endpoint on my env. and it worked good with the request body above
thanks a lot Johan! it also work for me!