Specify Webhooks for Individual Devices
By default, all measurements send POST data to all measurement webhooks you have defined in the Tenovi web app. However, you can set individual devices to only send data to specific webhooks using device properties. This involves
- Getting the
measurement_webhook_id
of the webhook you wish to send data to - Set the device propery on an individual device to send data to only this webhook
Getting measurement_webhook_id
You can retrieve a list of all your webhooks by using our GET /webhooks/
endpoint:
This will return an object for each of your webhooks you have defined. You will need the id
of the webhook for the next step (setting up a device property to send data to only this webhook).
Setting measurement_webhook_id
Device Property
Using device properties, you can set key-value pairs attached to individual devices. A special device property is the measure_webhook_id
which accepts the id
you pulled in the previous step.
Creating this device property involves sending a POST request to this API endpoint which uses the hwi_device_id
of the specific device.
Attaching a JSON object to the body of your request assigns this device to only send data to the specified webhook.