SAMI Rules: Check Out the APIs

We hope you’ve enjoyed writing your own SAMI Rules in the User Portal. We designed the Rules web interface so that connecting and controlling your devices could be done in a few clicks. Today we’re showing another side of SAMI Rules. With the public Rules APIs, you can create and manage Rules programmatically within your application.

SAMI Rules

Our new documentation article highlights some of the basic APIs and describes the JSON Rule body in detail, while the Rules APIs are detailed in the API spec.

Using the Rules APIs, you can find, create and update Rules, as well as test-run the Actions associated with them. As we outlined in this blog, it is possible to define Rules dynamically by using field values from incoming messages. Now in your code, you can construct dynamic Rules, in addition to applying operations to values—something not yet possible with the Rules tool in the User Portal.

We are currently working on a development blog that illustrates how to build an application where Rules are created for the user. Stay tuned, and as always, let us know what you’re doing with SAMI, Rules and IoT!