Example 7: Single Step REST call with Workers
In this V2.0 syntax example we execute a single step REST call using workers to execute the uri command.
{ "name": "Submit simple REST workflow",
"version": "1.0",
"workflow": {
"name": "Single step REST workflow with input uri",
"version": "1.0",
"plan": {
"steps": [
{
"name": "rest step",
"operation": {
"type": "REST",
"parameters": {
"method": "GET",
"uri": "${workflow.vars.uri}"
}
}
}
]
},
"input": {
"vars": {
"uri": "http://www.somewhere.com/rest/api",
"other": "value"
},
"workers": {
"worker1": {
},
"worker2": {
"vars": {
"uri": "http://www.somewhere-else.com/rest/api2"
}
}
}
}
}
}