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

    • $workflowId is the ID of the workflow as identified by Team Studio.
    • $token is the API authentication token. This is the same as the Team Studio session ID. The authentication token also can be used in the header without the token query 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'
Related concepts
Related reference