Running a Workflow
To run a workflow, you first must create a request.
- Procedure
- Use the following code to create the request for the API:
ROOT_URL/workflows/$workflowId/run?token=$token
where
$workflowIdis the ID of the workflow as identified by TIBCO Data Science - Team Studio.$tokenis the API authentication token. This is the same as the TIBCO Data Science - Team Studio session ID. The authentication token also can be used in the header without thetokenquery parameter. The session ID can be found at http://host:port/api/sessions.
Optional query parameters:
saveResult: defaults to true. If true, the workflow result history is available in the My Flow Results window. The Run Type shows API instead of Manual in the user interface.startTimeOut: defaults to 10 seconds. If the workflow has not started within this time frame, the API responds with an error.
Note that this request must use the HTTP POST protocol.
Samples
Authentication parameter:
curl -i -X POST 'http://localhost:8080/alpinedatalabs/api/v1/json/workflows/6/run?token=6d45d99fdb4ceb31e4a9953c46a3a507da6c9f2c'
Authentication in header:
curl -i -H 'x-token:6d45d99fdb4ceb31e4a9953c46a3a507da6c9f2c' -X POST 'http://localhost:8080/alpinedatalabs/api/v1/json/workflows/6/run'
Subtopics