Message Script
Last updated
Last updated
The message script allows to dynamically generate an HTTP request for sending time series to the target URL. The script uses JavaScript with the support for all built-in objects and functions of ECMAScript 5 specification (read more about it ). As a result, the script should return a RestRequestMessage object. The object is a prototype of the generated HTTP request and should contain all necessary message headers and body. Detailed description of the object can be found .
In order to access the time series data ready to be sent, the dataContext object is used. It provides access to an array of time series data. The object provides access to the secret string, and objects. A detailed description of dataContext can be found .
The following example shows a script used for inserting data into InfluxDB, which marks the data with an additional ts_type tag during generation.
When publishing data to various cloud services, cryptographic and text functions may be useful. Access to them is provided by and objects.