Skip to main content

Delete a data stream

DELETE 

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

Soft-delete a specific data stream from a device. The stream is marked as deleted and excluded from listings; its historical data is retained per the data retention policy.

Only user-managed streams (managedBy = User) can be deleted; system-managed streams (WedaNode / WedaSubNode sources) are synced automatically from the device and cannot be deleted.

The delete is blocked while the data stream is currently attached to a source (dataSource), used by an analyzer, or referenced by an alert policy; detach it from the source, remove it from the analyzer, and remove it from any alert policies first, then retry the delete. If the analyzer/alert policy service cannot be reached to verify these references, the delete is rejected (503) rather than proceeding without the check.

Parameters

  • deviceId (string, required): Unique ID of the device. Example: 74fe488d5d35
  • dataStreamId (Guid, required): Unique ID of the data stream. Example: e033b4b3-36e0-4dbc-a6e4-1e77185402f4

Responses

  • 204 No Content: Data stream soft-deleted successfully.
  • 404 Not Found: Data stream not found.
  • 409 Conflict: The data stream is system-managed, currently attached to a source, used by an analyzer, or referenced by an alert policy; detach/remove it first, then retry the delete.
  • 503 Service Unavailable: Unable to verify analyzer/alert policy references because the dependent service did not respond in time.

Security

  • This API requires authentication.

Request

Responses

Data stream soft-deleted successfully.