Skip to content
SENS Platform Docs

Create an immutable draft flow version.

POST
/v1/flows/{flowId}/versions
curl --request POST \
--url https://api.dev.iot-sens.schlossers.at/v1/flows/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "graph": { "schemaVersion": "flow-graph.v2", "deviceTypeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "nodes": [ { "kind": "block", "nodeId": "example", "block": {}, "name": "example", "configuration": {}, "position": { "x": 1, "y": 1 } } ], "edges": [ {} ], "parameters": [ {} ] } }'
flowId
required
string format: uuid
Media typeapplication/json
object
graph
required

Contains exactly one current-output and one timeseries-output system node.

object
schemaVersion
required
string
Allowed value: flow-graph.v2
deviceTypeId
required
string format: uuid
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

Draft created.

Media typeapplication/json
object
flowVersionId
required
string format: uuid
flowId
required
string format: uuid
tenantId
required
string format: uuid
versionNumber
required
integer
>= 1
status
required
string
Allowed values: draft released deprecated
graph
required

Contains exactly one current-output and one timeseries-output system node.

object
schemaVersion
required
string
Allowed value: flow-graph.v2
deviceTypeId
required
string format: uuid
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
checksum
required
string | null
releasedAt
required
One of:
string format: date-time
createdAt
required
string format: date-time
Example
{
"status": "draft",
"graph": {
"schemaVersion": "flow-graph.v2",
"nodes": [
{
"kind": "block"
}
]
}
}

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