Appearance
Stream
Description
The stream module allows you to enable livestream data from a given device and service that supports it. Call the API to create a stream and receive updates via the websockets. For further information regarding the event structure check out the event section of this page.
Events
Following events are transmitted via the websocket.
The event that indicates that a livestream has been created. Only the user that created the livestream will receive this event. This event requires read
access to the resource stream
.
Name | Description |
---|---|
typestring constant | Constant value: CREATE_LIVESTREAM |
serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
propertystring | The property identifier. Either as hex 0x0000.TYPE formatted string or as the name for the property given by the schema |
propertyIdentifierinteger | The id as number of the property |
deviceIdentifierstring | The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API. |
expiresAtinteger | The utc timestamp (in milliseconds) when the open property stream will expire |
userstring | The user name. |
uuidstring | The uuid identifying a running open property stream |
API
Create Stream
This endpoint creates a stream. Whenever this stream transmits data the data will be sent via the websocket as an event. Please refer to the event section of this topic.
POST
/api/v1/streams
Access
This endpoint requires create
permission for the resource stream
.
Request Body
Name | Description |
---|---|
serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
deviceIdentifierstring | The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API. |
propertystring | The property identifier. Either as hex 0x0000.TYPE formatted string or as the name for the property given by the schema |
expiresIninteger optional | The amount of milliseconds the property will be kept open without a refresh. Default: 60000 |
Response
Name | Description |
---|---|
uuidstring | The uuid identifying a running open property stream |
serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
deviceIdentifierstring | The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API. |
propertystring | The property identifier. Either as hex 0x0000.TYPE formatted string or as the name for the property given by the schema |
expiresAtinteger | The utc timestamp (in milliseconds) when the open property stream will expire |
List Streams
Calling this endpoint will return all actives streams.
GET
/api/v1/streams
Access
This endpoint requires read
permission for the resource stream
.
Response
Name | Description |
---|---|
uuidstring | The uuid identifying a running open property stream |
serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
deviceIdentifierstring | The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API. |
propertystring | The property identifier. Either as hex 0x0000.TYPE formatted string or as the name for the property given by the schema |
expiresAtinteger | The utc timestamp (in milliseconds) when the open property stream will expire |
Refresh Stream
Call this endpoint to refresh a stream. Should a stream reach the expiresAt timestamp, the stream will be closed.
POST
/api/v1/streams/:stream_uuid
Access
This endpoint requires update
permission for the resource stream
.
URL Parameter
Name | Description |
---|---|
stream_uuidstring | The uuid identifying a running open property stream |
Request Body
Name | Description |
---|---|
expiresIninteger optional | The amount of milliseconds the property will be kept open without a refresh. Default: 60000 |
Response
Name | Description |
---|---|
uuidstring | The uuid identifying a running open property stream |
serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
deviceIdentifierstring | The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API. |
propertystring | The property identifier. Either as hex 0x0000.TYPE formatted string or as the name for the property given by the schema |
expiresAtinteger | The utc timestamp (in milliseconds) when the open property stream will expire |
Delete Stream
Deletes a streams and stops data transmission
DELETE
/api/v1/streams/:stream_uuid
Access
This endpoint requires delete
permission for the resource stream
.
URL Parameter
Name | Description |
---|---|
stream_uuidstring | The uuid identifying a running open property stream |
Response
This endpoint simply returns Status 204
to indicate a successful operation and to save bandwidth.