Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
From a Java application, we are trying to run a Standard job in TMC by invoking this REST API endpoint -
https://api.us-west.cloud.talend.com/tmc/swagger/swagger-ui.html# !/executions/execute
In the Body of the request, one of the parameters, say "arg2" is a JSON string as shown. This request fails with HTTP error 400. We used escape characters and we are very sure it's a valid JSON.
{
"executable": "task id here",
"parameters": {
"arg1": "a",
"arg2": {"one":"x", "two": "y"}
},
"logLevel": "WARN"
}
Now, if we change "arg2" to just a string value, it works successfully.
"executable": "",
"parameters": {
"arg1": "a",
"arg2": "b"
},
"logLevel": "WARN"
}
Does anybody know how to pass an argument that itself is a JSON string ?'
Thanks
Hi
Can you try
"{\"one\":\"x\", \"two\": \"y\"}"
Regards
Shong
Hi Shong,
Thanks for your response. As I have mentioned earlier, we have already escaped all the " characters and any slashes that needs escaping.
The body of the request is a valid JSON. However, the TMC REST API fails with 400