Webhooks can be used to update your Apilio data and evaluate your Logiblocks from other apps and services, for example: iOS shortcuts (Siri), Tasker, Zapier, and many more.
In this post we’ll see how we can use these handy URLs to update your data in Apilio from any third party service or apps that can handle webhooks.
Webhooks URLs are in the show view for any variable or Logicblock
These urls are always displayed in the “show” view for any element.
Update boolean variables via webhooks
Variables in Apilio store data from devices, apps or services. With webhooks, you’ll be able to update your boolean variable to true, to false or to toggle it (if it was true, it will be set to false, and if it was false, it will be set to true).
Update string variables via webhooks
String variables can be cleared via webhooks (delete the data they store) or you can set them to a different value. You’ll need to append &value=new_value to the end of the URL, where “new_value” is the new string you’d like to update the variable to.
Update numeric variables via webhooks
Numeric variables can be set via webhooks and you can also do a couple of mathematical operations with them: add a number to the current data stored, or subtract a number from the value. In all these three cases, you’ll need to append &value=some_value at the end, where some_value is the number you wish to update the numeric variable to, or that you wish to add/subtract.
Evaluate a Logicblock via webhooks
You can have any external app launch a Logicblock automatically by using this webhook. This is useful for example to use a widget on your phone to launch a Logicblock manually. You’ll find it in the show view of your Logicblock, at the end of the page.
Activate or deactivate a Logicblock via webhooks
We’ve added two new capabilities via webhooks, so you can automate if you wish to deactivate a specific logicblock.
You can use this to for example, deactivate a specific Logicblock when you are away on holiday, and then make it active again when you are back home. You can also use this to manually deactivate/activate a specific Logicblock from your phone.
Examples using webhooks
Related articles