Hi All, Hi Gerard_McNamara_Ged,
I’ve read your posting in this topic:
If you know the format of the string you want to send, isnt it simpler to just make a template string and just replace the values instead?
myStringTemplate = "{"startInfo":{"Release": "{0}"....}}"
myBody = String.Format(myStringTemplate, "0b0b7094-0ed5-4cf7-91f2-2ffbaaa744db", ...)
Is it possible that you write detailed how you fixed it?
I get this Error:
JReponse={“message”:“An unexpected ‘StartObject’ node was found for property named ‘InputArguments’ when reading from the JSON reader. A ‘PrimitiveValue’ node was expected.”,“errorCode”:0,“resourceIds”:null} and Status code=400
with that payload string:
“{startInfo:{ReleaseKey:'”+str_Key+“',Strategy:‘Specific’,RobotIds:[”+str_Id+“],NoOfRobots:0,Source:‘Manual’,InputArguments:{in_str_jobname:'”+in_str_jobname+“‘,in_str_param1:’”+in_str_param1+“‘,in_str_param2:’”+in_str_param2+“'}}}”
thanks a lot for your help!
I found a solution! Perhaps you need it also:
In my payload string it was only necessary to put a backslash and 2 double quotation marks around the keys from the Input keys.
So my payload looks now like this and works :-):
“{”“startInfo”“:{”“ReleaseKey”“:'”+str_Key+“',”“Strategy”“:‘Specific’,”“RobotIds”“:[”+str_Id+“],”“NoOfRobots”“:0,”“Source”“:‘Manual’,”“InputArguments”“:”“{"“in_str_jobname"”:'”+in_str_jobname+“‘,"“in_str_param1"”:’”+in_str_param1+“‘,"“in_str_param2"”:’”+in_str_param2+“'}”“}}”