Kodall
REST API

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

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

Responses

Example

Given the following workflow code:

ONE Workflow
workflow DemoWf;

function hello(name as string, `type` as string) as string {
    // Throws a 400 Bad Request response
    system->errorIf(`type` == "error", "This is a system error!");
    // Throws a 424 Failed Dependency response
    validation->failIf(`type` == "fail", "This is a validation failure!");
    // Rejects a specific property with a 424 Failed Dependency response
    validation->rejectIf(`type` == "reject", "entityName", "propertyName", "This property value is rejected!");
    // Rejects a collection item property with a 424 Failed Dependency response
    validation->rejectItemIf(`type` == "rejectItem", "entityName", "propertyName", 0, "This item property value is rejected!");

    // Returns success string (returns default value "world" if name is null)
    return "Hello " + string->coalesce(name, "world");
}
POST/rest/workflow/DemoWf/hello
Initializing connection...