Skip to content
SENS Platform Docs

Create a global template draft from a flow graph.

POST
/v1/flow-templates/{templateId}/versions
curl --request POST \
--url https://api.dev.iot-sens.schlossers.at/v1/flow-templates/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "graph": { "schemaVersion": "flow-template-graph.v2", "nodes": [ { "kind": "block", "nodeId": "example", "block": {}, "name": "example", "configuration": {}, "position": { "x": 1, "y": 1 } } ], "edges": [ {} ], "parameters": [ {} ] } }'
templateId
required
string format: uuid
Media typeapplication/json
object
graph
required
object
schemaVersion
required
string
Allowed value: flow-template-graph.v2
nodes
required
Array
>= 2 items <= 102 items
One of:
object
kind
required
string
Allowed value: block
nodeId
required
string
>= 1 characters <= 120 characters
block
required
object
name
required
string
>= 1 characters <= 200 characters
configuration
required
object
position
required
object
x
required
number
y
required
number
edges
required
Array<object>
object
parameters
required
Array<object>
object

Template draft created.

A safe platform error response.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: VALIDATION_FAILED AUTHENTICATION_FAILED AUTHORIZATION_FAILED RESOURCE_NOT_FOUND CONFLICT DEPENDENCY_FAILURE FLOW_FAILURE RATE_LIMITED INTERNAL_ERROR
category
required
string
Allowed values: validation authentication authorization not_found conflict dependency_failure flow_failure rate_limit internal
message
required

Safe client-facing diagnostic message.

string
correlationId
required

Correlation ID for operational investigation.

string
>= 1 characters
details

Safe bounded diagnostic details.

object
key
additional properties
One of:
string
Example
{
"error": {
"code": "VALIDATION_FAILED",
"category": "validation"
}
}
Cache-Control
string
Allowed value: no-store