Set the data streams attached to policy (attach / detach)
PUT/api/v1/orgs/{orgId}/alert-policies/{alertPolicyId}/data-streams
Send the full desired list of attached data streams. This is a full-replace operation, not an incremental add: streams included in the payload that were not previously attached are attached; streams that were previously attached but are left out of the payload are detached. Sending an empty array detaches all data streams from the policy.
Request Body
An array of device/data-stream pairs — the complete desired binding list for this policy:
deviceId(string, required): Device identifier. Ex:9F75ABDA56C3.dataStreamId(UUID, required): Data stream identifier. Must exist (both the device and the specific data stream are validated).
Parameters
alertPolicyId(UUID, required): Alert policy identifier.
Responses
200 OK: Returns the final attached list (each item includesalertPolicyId,deviceId,dataStreamId), reflecting the desired state that was just applied.404 Not Found: Alert policy not found, adeviceIddoes not exist, or a(deviceId, dataStreamId)pair does not exist.
Request
Responses
- 200
OK