Streaming Rule
A service for applying rules to a live stream of time series data in an IoT scenario.
You use streaming rules for time series data produced by sensors attached to devices in an IoT scenario. Each rule contains a rule expression, which is used to test whether the data matches a certain condition or not. In case the condition is met, further actions can be taken, such as triggering actions, sending an alert message, and so on.
Each rule is part of a so-called rule project, which serves as a container for one or many rules, as well as for a set of data objects, which is shared by all the rules within the project.
Looking at the list of methods supported by a rule, you realize that there’s a number of specialized methods going beyond the usual set of CRUD (create, retrieve, update, delete) methods. You can activate and deactivate a rule as well as provide test data that you can use to simulate the rule behavior prior to activating it in a productive environment. Last, but not least, you can call an API service method that returns a list of activations and deactivations for a specified rule, which can be required for auditing reasons.
- Formal Description: https://<server address>[:<port number>][/path]/v1/projects/<projectId>/stream-rules
- Example for a base URI in a cloud foundry environment: https://sap-iot-ae-noah-live-rules-designtime.cfapps.us10.hana.ondemand.com/v1/projects/<projectId>/stream-rules/
Permissions:
<rule>.c
<rule>.r
<rule>.u
<rule>.d
<rule>.a
Methods
| HTTP Method | Action | URI | Scopes |
|---|---|---|---|
| POST | Create a Streaming Rule | /v1/projects/<projectId>/stream-rules | <rule>.c |
| GET | Read a Streaming Rule | /v1/projects/<projectId>/stream-rules/<ID> | <rule>.r |
| GET | Read all Streaming Rules | /v1/projects/<projectId>/stream-rules | <rule>.r |
| PUT | Update a Streaming Rule | /v1/projects/<projectId>/stream-rules/<ID> | <rule>.u |
| DELETE | Delete a Streaming Rule | /v1/projects/<projectId>/stream-rules/<ID> | <rule>.d |
| POST | Activate a Streaming Rule | /v1/projects/<projectId>/stream-rules/<ID>/activation | <rule>.a |
| DELETE | Deactivate a Streaming Rule | /v1/projects/<projectId>/stream-rules/<ID>/activation | <rule>.a |
| POST | Simulate a Streaming Rule | /v1/projects/<projectId>/stream-rules/<ID>/simulation | <rule>.a |
| GET | Read Simulation Data (Streaming Rule) | /v1/projects/<projectId>/stream-rules/<ID>/simulation-input-template | <rule>.a |
| GET | Read Activation Details (Streaming Rule) | /v1/projects/<projectId>/stream-rules/<ID>/activation/details | <rule>.r |