Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
katie2
Contributor
Contributor

Pass parameter to talend cloud job via public API

Is it possible to pass a parameter from the POST executions API to a cloud job? The example/model in swagger shows 

Executable task {

executable  ( string😞  

Executable identifier

 ,
parameters  ( inline_model,   optional😞  

Executable parameters

}
inline_model {}

 

But, when I publish a job to cloud and try this POST below, it runs, returns 201 but the job isn't using the parameter. 

 

- curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic xxxxxx ==' -d '{ \
"executable": "5cc75d7e1488ad43b1447f6a", \
\
"parameters": { \
"parameter_passed": "test" \
} \
}' 'https://api.us.cloud.talend.com/tmc/v1.2/executions'

 

Can someone please explain this? Is there a different way to set up the context variable or something?

Labels (3)
4 Replies
hbour
Contributor
Contributor

Hello,

I have th same problem, have you find a solution ?

Thanks

yome1
Creator
Creator

Hello,

 

I don't know how you define your parameter in your job but using "parameter_name" in the context works for me.

I set a tFixedFlowInput with this context and retrieve the value of the parameter correctly.

 

Hope this help

Guillaume

Anonymous
Not applicable

Bump.

Any updates or new findings how this actually works? The api docs are sparse/nonexistent .

Anonymous
Not applicable

Ok figured this out. 

The contexts in your job should be prefixed with 'parameter_' ("parameter_name" in my job)

Then in the body of your request you can just put the name of the context w/o the prefix. eg.

{
  "executable": "5dcb3498fc531f932a235dcam",
  "parameters": {
    "name":"Hello World"
  }
}