Sunil Chauraha
Sunil Chauraha

Reputation: 555

How to execute spring cloud task using rest-api

I know a cloud task can be scheduled and can be configured using stream also to be executed. As a developer I want to execute my spring cloud task using rest-api so that I can execute the task on demand. Basically i have a work flow management system and we are using control-m agent. So now some of the jobs will be executed by control-m and some of the task will be deployed on spring cloud dataflow server. Now when one job completes then other job which is there on cloud has to be executed. So for this I need the capability to call a rest api and execute the cloud task on demand. I am sure this feature must be there but I am unable to find an example of documentation. Can someone please help me. Thanks in advance.

Upvotes: 2

Views: 4651

Answers (1)

Sabby Anandan
Sabby Anandan

Reputation: 5651

Please refer to the REST-API guide; specifically, you'd be using tasks/deployments endpoint to operate on an existing task.

Create:

dataflow:>task create foo --definition "timestamp"
Created new task 'foo'

Launch:

curl http://localhost:9393/tasks/deployments/foo\?arguments\=\&properties\= -d ""

p.s: all the supported REST-APIs are listed for your reference and they are accessible at: http://localhost:9393

Upvotes: 6

Related Questions