Rule Triggered Webhook Payload Examples - TeamViewer Support
<main>
<article class="userContent">
<p><em>This article applies to all TeamViewer IoT users who monitor their IoT network.</em></p><p>Via the <a href="https://community.teamviewer.com/English/home/leaving?target=https%3A%2F%2Fteamviewer-iot.com" rel="nofollow noreferrer ugc">TeamViewer IoT Cloud</a> <em>Rules </em>page, you can set up Rules to send notifications to your webhooks for alerting or further processing. A webhook is thrown (an HTTP/HTTPS POST request is made to the specified Webhook URL) when a new endpoint is registered and needs confirmation, or when a <strong>Rule's </strong>condition, is met or recovered. </p><p>The examples below show Webhook payload samples for your reference</p><h2 data-id="webhook-endpoint-confirmation">Webhook Endpoint Confirmation</h2><pre class="code codeBlock" spellcheck="false" tabindex="0">{ "Type": "ChannelConfirmation",
"Message": "You have received this request because your webhook URL has been added to the TeamViewer IoT notification channel list. To confirm this channel visit the ConfirmationURL included in this message" ,
"ConfirmationURL": "https://mywebhook.com/confirmation/eyJ0aW1lU3RhbXAiOjE1Mjk0NzU1OTQwNzYsImNoYW5uZWxOYW1lIjoidGVzdCIsImNoYW5uZWxUeXBlIjoxLCJ1c2VySWQiOiI1YjI3YjI5ZGY2N2VjM2Y1MTAxMDUxNjkiLCJjaGFubmVsSWQiOiI1YjI5ZjIwYTMzNmJjNzUzZjA5M2Q1YWMiLCJ0YXJnZXQiOiJodHRwczovL3dlYmhvb2suc2l0ZS8zMjBmZTQ1Mi1kNzZmLTQ0YTUtYWFiZC04MDAzYTIyZTRlZWEifQ=="
}
{
"Type": "ChannelConfirmationResponse",
"Message": "Webhook channel has been successfully confirmed",
"Timestamp": 1529475719718
}
{
"Type": "ChannelConfirmationResponse",
"Message": "Webhook channel has already been confimred.",
"Timestamp": 1529475731790
}
</pre><h2 data-id="rule-met">Rule Met</h2><pre class="code codeBlock" spellcheck="false" tabindex="0">{
"StartTime": 1501068864000,
"ruleName": "Default alarm policy",
"condition": "raspberrypi.dht22.temperature < 3",
"consecutiveChecks": 4,
"values": {
"raspberrypi.dht22.temperature": 2
}
}
</pre><h2 data-id="rule-recovered">Rule Recovered</h2><pre class="code codeBlock" spellcheck="false" tabindex="0">{
"endTime": 1501068864000,
"duration": "2 hour(s) 45 minute(s)",
"ruleName": "Default alarm policy",
"condition": "raspberrypi.dht22.temperature < 2",
"consecutiveChecks": 4,
"values": {
"raspberrypi.dht22.temperature": 5
}
}
</pre>
</article>
</main>