HTTP Interaction(Beta) November 5, 2019

Overview

HTTP interaction services, also known as UbiHTTP. It allows the communication between devices, websites, and Web services without implementing protocols at the device level. You can specify operations in UbiHTTP and then trigger them in other Ubibot functions, such as the alert function.

Create a UbiHTTP request

1. Create a new UbiHTTP request. Click “Data factory” -> “HTTP interaction”, and then click new UbiHTTP;
2. Specify Settings. Not all Settings are required for every type of request. All UbiHTTP requests require the following parameters.

Required parameters Description
Name Enter a unique name for your UbiHTTP request.
API Key API key generated automatically for UbiHTTP requests.
Url Enter the web site address where the data is requested or written, starting with http:// or https://.
Method Select one of the following HTTP request methods to access the web site url: GET,POST,PUT,DELETE.

Additional parameters can be specified depending on the nature of your request. For example, UbiHTTP requests to servers that require authentication require a user name and password.

Optional parameters Description
HTTP authorized user name If your URL requires authentication, enter an authentication user name to access a private channel or website.
HTTP authentication password If your URL needs authentication, enter the authentication password to access the private channel or website.
Content type Enter the MIME or form type of the requested content. For example, application/x-www-form-ubibot.
Host If your ThingHTTP request requires a host address, enter the domain name. For example, api.ubibot.cn.
Content Enter the message you want to include in the request.

Trigger UbiHTTP

UbiHTTP is triggered by setting up an alert rule using a GET or POST request.
1. Click “Data Warehouse” -> “Data Warehouse”;
2. Select the device to set HTTP interaction -> “Rules” -> “Create Offline/Sensor/USB Down Alert”;
3. Set the early alert information according to the application situation;
4. Mode of alert select “HTTP interaction” -> select the UbiHTTP request name just set up;
5. Save alert;
UbiHTTP requests are triggered when the device’s sensor detection value reaches a user-set threshold.