REST Plugin
REST Plugin
Configuration manual:
The following files are located in the S7Net plugin's config folder (\configurations\InputPlugins\Rest_Schildknecht)
DataMappings.xml (configures, how to build the messages from incoming REST data)
RestSettings.xml (basic plugin settings and definition of response message)
RestSettings.xml
The following settings should be configured to ensure plugin operation
Url: Endpoint for REST call
Method: Define the REST method. Allow: GET, POST, PUT, DELETE. Be aware, that each request is repeated periodically
PeriodSecs: Period in which the REST request is repeated, in seconds
Username
Password
ResponseDefinitions: define how the response message looks like. Please be aware, that the REST Schildknecht plugin assumes, the response is in JSON-array format; For each entry in the JSON-array, a ResponseDefinition must be defined. The below example demonstrates a response with three entries. A response may look like [[entry1, entry2, entry3], [entry1, entry2, entry3],....]
DataType: Select the datatype of the response entry: Allowed: Double, Integer, Long, Boolean, String, Timestamp
TimestampFormat: If DataType Timestamp is used and the timestamp format is not either in unix milliseconds or in standardized teimstamp format ("2018-01-01 10:21:12.234"), define the timestamp format
Name: Define the name of the response entry. Used for message creation
IsLastReadId: If IsLastReadId is set to true, this entry is used, to determine, which was the last received message. Always the last received entry is persisted on file system and is used to determine, how the next REST request is assembled, in terms of window definition
PersistLastReadId: Define FileName and FilePath of the file where the last read id is persisted. Make sure to provide read/write permissions
Selects: Define the "Select"-section of the query-string
Select: For every select-statement add a select xml tag. (Eg. if your select-statement should look like "select:["ch1", "ch2"]", enter <selects><select>ch1</select><select>ch2</select></selects>
UntilMax: Define the maximum "until"-string used in the querystring (eg. if you want to read at must until 22nd of August 2018, chose <UntilMax>20180822</UntilMax>
Also the file location and file name of the log-file as well as the other plugin-specific settings files can be specified here. Please note that the specified settings filenames and paths must correlate with the physical files.DataMappings.xmlThe default configuration is appropriate for most applications. Make sure to note the "IngressKey"-setting (default: RestData). This key is needed for the outgoing message mapping configuration.
Last updated