We need to handle special characters such as # or $ or = otherwise we get a 500 error.
For example this pwd will fail with HTTP 500. Removing special character one by one we found that the \ char is the one that is triggering the failure.
x\$Klo=45)m#nGFD
This is one example, if there are more, that may cause the same failure.
You MUST use a PUT NOT a POST.
I ran a GET to get the sql_response configuration for the given domain, hub, robot and the probe.
Here is the syntax and this includes encryption as well. Note that the probe will successfully commit the changes and restart.
Check the sql_response.cfg and you will see that the passwords are changed and encrypted.
[{
"encrypt":"yes",
"key":"/connections/MyTestConn/<password>",
"value":"TESTALWAYSGOODXX99"
},
{
"encrypt":"yes",
"key":"/connections/MyTestConn_2/<password>",
"value":"TESTALWAYSGOODXXX9999"
}]
Please review the KB Article:
Reserved characters must be properly escaped to be used in strings.
To avoid this issue, Backslash ('\') should be replaced with ('\\') in the password as below.
{
"optionId": "<Password>",
"optionValues": [
"randomf6W2)H\\Q"
]
}
Note : The following characters are reserved characters and can not be used in JSON and must be properly escaped to be used in strings.
Backspace to be replaced with \b
Form feed to be replaced with \f
Newline to be replaced with \n
Carriage return to be replaced with \r
Tab to be replaced with \t
Double quote to be replaced with \"
Backslash to be replaced with \\
Reference:
Rest API parsing fails when Password contains a special character "\"