Sending notifications via an HTTP request

If it is necessary to transmit or, by the opposite, to load data from an external service in the business logic implementation, sending HTTP requests may be used.

For that, the command "Make HTTP request" should be added on entering in the state of an automation scenario or on exit from it. By clicking on this command, the sidebar will appear to configure the request. There may be set:

  1. Method of the request. Five main requests are added in the system:
  1. URL address on which the request will be sent. This is the full address of a resource.
  2. Headers allowing to take into account the features of data representation and transmission to a server. Here may be specified the authorization parameters, the message body language, the message formats required on the side of a client or a server, options for the current connection, etc.
  3. Body of the message in which the message data are set taking into account the required encoding (see paragraph Notifications). The body is not necessary.

scheme

Based on filling these fields after saving all changes, the HTTP request will be configured taking into account rules of its structure forming. As a result, after the final state machine starting, the HTTP request will be sent to the external service and actions, specified in the request, will be fulfilled when the object will be in the corresponding state.

Thus, using the HTTP requests may allow realizing the interaction with the external services such as mobile and web-applications, CRM and ERP systems, etc. Eventually, it can lead to expanding the functionality and possibilities of developed IoT project.