Template DataStreams

Template datastream management

Get template datastreams

get

Retrieve all datastreams defined in a template.

Required permissions, when user-scoped authentication is used: PRODUCT_VIEW.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
templateIdinteger · int32Required

Template ID

Responses
chevron-right
200

List of datastreams

application/json
idinteger · int32Required

DataStream ID

Example: 1
labelstringRequired

DataStream label

Example: Temperature_Sensor
aliasstringRequired

DataStream alias

Example: Temperature Sensor
unitsstring · enumOptional

DataStream units

Example: CelsiusPossible values:
typestring · enumRequired

DataStream value type

Possible values:
defaultValueone ofOptional
stringOptional

String datastream value

Example: Some DataStream Value
or
number · doubleOptional

Double, integer or enum datastream value

Example: 22.2
or
number · double[] · min: 2 · max: 2Optional

Location datastream value. Represented as an array of two elements, where the first is longitude, and the second is latitude.

Example: [13.38886,52.517037]
pininteger · int32Required

Virtual pin number

Example: 5
pinTypestring · enumRequired

Pin type

Possible values:
pinModestring · enumOptional

Pin mode

Possible values:
isAnalogPinbooleanRequired

Whether the pin is an analog pin

isRawbooleanRequired

Whether the datastream value should be stored as raw value without parsing

isHistorybooleanRequired

Whether the datastream should be stored in the aggregated format

isForServicebooleanRequired

Whether the datastream should be displayed in the service chart widget

isForReportsbooleanRequired

Whether the datastream is used for reporting purposes

isForActionsbooleanRequired

Whether the datastream can be used in the automation actions

isForConditionsbooleanRequired

Whether the datastream can be used in the automation conditions

isSyncbooleanRequired

Whether the datastream value should be synced on the hardware request

get
/api/v1/organization/template/datastreams

Create template datastream

post

Add a new datastream to a template.

Only the original (root) template can be edited (the one with parentId = null). Sub-organizations cannot modify templates that were created by a parent organization. Pin numbers must be unique within the template.

Required permissions, when user-scoped authentication is used: PRODUCT_EDIT. Also, when the user-scoped authentication is used, user should have developer mode enabled.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Body
productIdinteger · int32Required

Template ID

Example: 101
labelstring · min: 1 · max: 128Required

Datastream label. Can only contain letters, digits, spaces and underscores.

Example: Temperature_Sensor
aliasstring · max: 200Required

Datastream label. Can only contain letters, digits and spaces.

unitsstring · enumOptional

DataStream units

Example: CelsiusPossible values:
typeone ofRequiredExample: {"type":"DOUBLE","defaultValue":30.1,"min":1.1,"max":100.1,"decimalsFormat":"FRACTION_5"}
or
or
or
or
pininteger · int32Required

Pin number

Example: 5
pinTypestring · enumRequired

Pin type

Possible values:
pinModestring · enumOptional

Pin mode

Possible values:
isAnalogPinbooleanOptional

Whether the pin is analog

isRawbooleanOptional

Whether Blynk should store raw values sent from the device

isHistorybooleanOptional

Whether Blynk should store aggregated values sent from the device

isForServicebooleanOptional

Whether the datastream should be displayed in the service chart widget

isForReportsbooleanOptional

Whether the datastream values should be included to reports

isForActionsbooleanOptional

Whether the datastream can be used in automation actions

isForConditionsbooleanOptional

Whether the datastream can be used in automation conditions

isSyncbooleanOptional

Whether the datastream should be synced with the device upon request

Responses
post
/api/v1/organization/template/datastream/create

Update template datastream

put

Update a datastream in a template.

Only the original (root) template can be edited (the one with parentId = null). Sub-organizations cannot modify templates that were created by a parent organization.

Required permissions, when user-scoped authentication is used: PRODUCT_EDIT. Also, when the user-scoped authentication is used, user should have developer mode enabled.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Body
productIdinteger · int32Required

Template ID

Example: 101
idinteger · int32Optional

Datastream ID, that should be updated

Example: 1
labelstring · min: 1 · max: 128Required

Datastream label. Can only contain letters, digits, spaces and underscores.

Example: Temperature_Sensor
aliasstring · max: 200Required

Datastream label. Can only contain letters, digits and spaces.

unitsstring · enumOptional

DataStream units

Example: CelsiusPossible values:
typeone ofRequiredExample: {"type":"DOUBLE","defaultValue":30.1,"min":1.1,"max":100.1,"decimalsFormat":"FRACTION_5"}
or
or
or
or
pininteger · int32Required

Pin number

Example: 5
pinTypestring · enumRequired

Pin type

Possible values:
pinModestring · enumOptional

Pin mode

Possible values:
isAnalogPinbooleanOptional

Whether the pin is analog

isRawbooleanOptional

Whether Blynk should store raw values sent from the device

isHistorybooleanOptional

Whether Blynk should store aggregated values sent from the device

isForServicebooleanOptional

Whether the datastream should be displayed in the service chart widget

isForReportsbooleanOptional

Whether the datastream values should be included to reports

isForActionsbooleanOptional

Whether the datastream can be used in automation actions

isForConditionsbooleanOptional

Whether the datastream can be used in automation conditions

isSyncbooleanOptional

Whether the datastream should be synced with the device upon request

Responses
put
/api/v1/organization/template/datastream

Delete template datastream

delete

Remove a datastream from a template.

Only the original (root) template can be edited (the one with parentId = null). Sub-organizations cannot modify templates that were created by a parent organization.

Required permissions, when user-scoped authentication is used: PRODUCT_EDIT. Also, when the user-scoped authentication is used, user should have developer mode enabled.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
templateIdinteger · int32Required

Template ID

dataStreamIdinteger · int32Required

DataStream ID

Responses
delete
/api/v1/organization/template/datastream

No content

Last updated

Was this helpful?