Creates a new workflow

The following example demonstrates submitting a new workflow.

Assuming a model exists 'average_rainfall' with ports ['startdate', 'enddate', 'rainfall', 'average_rainfall']

Example CreateWorkflowRequest

{
"name": "A useful name for the workflow",
"description": "A detailed description...",
"organisationid": "csiro",
"groupids": ["my_group"],
"runas": { "roles": [ "my_group_role" ] }
"graph": {
"nodes" : [
{
"id" : "average_rainfall_model",
"modelid" : "average_rainfall"
},
{
"id" : "startdate_node",
"documentid" : "existing_document_datanode_id"
},
{

"id" : "enddate_node",
"value": "2017-01-01T10:00:00.0000Z"
},
{
"id" : "rainfall_node",
"streamid" : "rainfall.stream.123"
},
{
"id" : "average_rainfall_node",
"streamid" : "sensorcloud.average.rainfall.stream.id"
}]
"connections" : [
{
"source" : { "node": "startdate_node" },
"target" : { "node": "average_rainfall_model", "port": "startdate"}
},
{

"source" : { "node": "enddate_node" },
"target" : { "node": "average_rainfall_model", "port": "enddate"}
},
{
"source" : { "node": "rainfall_node" },
"target" : { "node": "average_rainfall_model", "port": "rainfall"}
},
{
"source" : { "node": "average_rainfall_model", "port": "average_rainfall"}
"target" : { "node": "average_rainfall_node" },
}]
}
}

Explanation:
  • runas: provides the authorisation context for the workflow. If omitted, the requesting user's roles will be assigned to the workflow instead.* startdate_node: connects an existing document datanode by id.
  • enddate_node: creates a new document datanode using the provided value.
  • rainfall_node: connects an existing stream.
  • average_rainfall_node: provides a destination output node for the model.
    1. NOTE: if a stream datanode already exists with the same streamid, it will reuse the existing datanode without creating a new stream datanode.

MAP Operations:

  • An operator node can be 'mapped' to apply an operator to all elements of a collection, potentially in parallel.
  • To 'map' an operator node, add the 'type: map' property. For the above example: { "id": "average_rainfall_model", "modelid": "average_rainfall", "type": "map" }
  • For more detail, see the Analysis Service tutorial document: https://senaps.eratos.com/dashboard/pdf/analysis-api-tutorial.pdf
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The request to create a workflow

string
required
groupids
array of strings, unique
groupids
string
required
string
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/hal+json