跳至主要内容

Create a data stream

POST 

/api/v1/orgs/{orgId}/devices/{deviceId}/data-streams

Create a new data stream for a specific device.

Parameters

  • deviceId (string, required): Unique ID of the device. Example: 74fe488d5d35

Request Body

  • dataStreamName (string, required): Unique name of the data stream within the device.
  • displayName (string, optional): Human-readable label for the data stream.
  • description (string, optional): Description of the data stream.
  • unitDisplay (string, optional): Display unit of the measured value (e.g. °C, %).
  • dataType (string, required): Data type of the stream value (e.g. double, boolean, integer).
  • recordToDataLake (boolean, optional): Whether to persist values to the data lake.

Responses

  • 201 Created: Data stream created successfully. The stream is user-managed (managedBy = User) with no dataSource; bind a source later via the source-linking APIs.
  • 400 Bad Request: Invalid request body.
  • 409 Conflict: A data stream with the same name already exists on this device.

Security

  • This API requires authentication.

Request

Responses

Data stream created successfully. The stream is user-managed (managedBy = User) with no dataSource; bind a source later via the source-linking APIs.