Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Below is the format of the json object that I need to pass to the Talend public API
https://api.us-west.cloud.talend.com/tmc/v2.2/executions
to execute a job published to Talend cloud
- ------------------------------------------------
{
"executable": "57f64991e4b0b689a64feed0",
"parameters": {
"parameter_boss": "fupton",
"boss": "was"
},
"logLevel": "WARN"
}
------------------------------------------------
Basically there are three parameters - executable, parameters, and logLevel. I'm calling the API and passing the parameters through java code. The problem is that when I pass an embedded json object within parameters object, then the API doesn't execute the Talend job. It throws HTTP 400 error. Otherwise, it executes fine with just single key value pairs within parameters object. For example, when I try to pass the below json object in which the object parameters has embedded objects, I get HTTP 400 error -
- ------------------------------------------------
{
"executable": "57f64991e4b0b689a64feed0",
"parameters": {
"auth_info": {
"http_method": "POST",
"type": "REST API",
"source_connection_url": "auth",
"header": {
"key": "application/x-www-form-urlencoded",
"username": "username",
"password": "password",
"type": "text"
},
"response": {
"token": "sessionId",
"response_type": "json"
}
},
"base_url": "c",
"last_run_timestamp": "",
"source_connection_url": "community.talend.com",
"obj_name": "o"
},
"logLevel": "WARN"
}
------------------------------------------------
auth_info is defined as context parameter of String datatype in Talend job. Doesn't Talend API support embedded json objects within parameters object?