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:74fe488d5d35dataStreamId(Guid, required): Unique ID of the data stream. Example:e033b4b3-36e0-4dbc-a6e4-1e77185402f4
Responses
204 No Content: Data stream soft-deleted successfully. To confirm, callGET /data-streams/{dataStreamId}afterward. It returns404 Not Foundonce the deletion has taken effect.400 Bad Request:orgIdordataStreamIdin the route is not a valid GUID.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
- 204
- 400
- 401
- 403
- 404
- 409
- 503
Data stream soft-deleted successfully. To confirm, call GET /data-streams/{dataStreamId} afterward. It returns 404 Not Found once the deletion has taken effect.
orgId or dataStreamId in the route is not a valid GUID.
The request is missing a bearer token, or the token is malformed, expired, or otherwise fails signature/issuer validation.
The bearer token is valid but does not grant access to this request: either it lacks the scope required by this endpoint, or its resource_access claim does not grant the caller access to the organization identified by orgId.
Data stream not found.
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.
Unable to verify analyzer/alert policy references because the dependent service did not respond in time.