Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
have you an idea to pass trouth the domain string like "domain\userid".
i try to insert users into Nprinting Feb. 2018 but when i fill in domain\userid, it will fail with
QVX_UNEXPECTED_END_OF_DATA: HTTP protocol error 400 (Bad Request):
{"error":{"code":400,"message":"Request is malformed."}}
RestNPPOSTandPUTTestTable:
SQL SELECT
"__KEY_data"
FROM JSON (wrap off) "data" PK "__KEY_data"
WITH CONNECTION( URL "*********/api/v1/users", BODY "{""Username"":"""",""Email"":"""",""Password"":""123"",""Enabled"":""true"",""Folder"":"""",""Subfolder"":"""",""DomainAccount"":""DOMAIN\USER"",""Timezone"":""Europe/Vienna"",""Locale"":""de""}",
HTTPHEADER "Origin" "https://***********",
HTTPHEADER "Content-Type" "application/json",
HTTPHEADER "cookie" "NPWEBCONSOLE_SESSION=967f0a56b127b200ec358a32ca1eb084f4dbe1fa-%00NPWEBCONSOLE_XSRF-TOKEN%3AopT1Hrhu3Rr6xKl4Z6tuqVHNiRm6WGXKGX10V2wx7%2Bw%3D%00%00_TS%3Asession%00%00userid%3A6a4a3525653a4739b67667b86bcd2bd8%00; ")
thank you for your Response
Hi,
Remember to add the escape character. So the domain account should be similar to Domain\\Account.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
Hi Aaron,
see code in attached file - navigate to section with USERS:
cheers
Lech
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
Hi,
Remember to add the escape character. So the domain account should be similar to Domain\\Account.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
For example:
{
"email":"name@domain.com",
"enabled":true,
"userName":"NewUser",
"domainAccount":"domain\\user",
"timezone":"CET",
"locale":"En",
"folder":"c:\\NewUser",
"subFolder":"NewUser",
"password":"Password123"
}
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
this is incosistent then as it works for me with single \ character like: Domain\user
Hi Lech,
The \ as escape characters could be added automatically by the client you are using to send the API request or by a library you used in your program. For example I tested the snippet I just posted in ARC. If I use the JSON visual editor I simply need to specify a single backslash:
but if you open it in the raw editor you see the double backslashes
The same could happens if you are using a library that format the JSON code in a custom software. The library adds the needed backslashes.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
thank you for all your help, I tested domain\\user and it worked for me
best regards
Cool understand,
I was using Qlik Rest Connector and i was executing content from my script as a part of chaining reload - import/update users - distribute report.
regards
Lech