Workflow API

POST /rest/workflow/{workflowName}/{workflowMethod}

Execute a workflow method, json body required.

Parameters

NameWhereRequired ValueDescriptionSchema
workflowNameurlThe name workflow to run.string
workflowMethodurlThe name of the workflow method to run.string
Content-Typeheadersapplication/jsonThe content-type.

Payload

{
    "argument1": "value",
    "argument2": 10,
    "argument3": "2012-01-01T11:00:00"
    "argument4": 12.2
}

Responses

200 Ok

The operation was successful.

{
    "responseArg1": "value",
    "responseArg2": 11
}
400 Bad Request

There was an error deserializing the JSON message.

{
    "detail": "error detail"
}
401 Unauthorized

The operation is not authorized.

Check if the authentication cookie is set or valid or a valid username and password are set in the URL.

500 Internal Error

All errors except for JSON message deserialization errors.

{
    "detail": "error detail"
}

Example

Workfow API

Given the following workflow code:

workflow AgeConcat;

type response {
    var message as string;
}

function main(name as string, age as int) as response {
    var result as response;
    result.message = "Hello " + name "! You have " + age " years.";
    return result;
}

And the following HTTP request:

POST /workflow/AgeConcat/main
Content-Type: application/json

{ 
    "nume" : "Alex",
    "age" : "30"
}

The server will return the following response:

200 OK
Content-Type: application/json

{ "response": "Hello Alex! You have 30 years." }