Summary

The RestPointProxyExt is responsible for the RestQuery request frequency. A RestQuery will use the highest frequency of all its RestPointProxyExt dependents as the polling frequency.

It also allows conversions to be applied on the value received if the selector is of type JsonSelector. It first applies a status to the final value based on the value read in the JSON, and then performs a conversion of the value to get the final data that will be written to the point. These Conversions are specific to the standard data types received in the Web APIs.

When the selector type is set to Header or Cookies, the text field allows to target a specific header or cookie to retrieve from the response.


Implementation

The RestPointProxyExt is automatically inserted into the points created by the RestPointManager. The three types of points accepted by the RestPointDeviceExt are also available in a palette with the RestPointProxyExt.

To configure it:

  1. Specify a selector to filter the received data to just the desired field.
  2. Configure the Status Conversions
  3. Configure the Value Conversions

Properties

  • Status: Returns the status of the point.
  • Fault Cause: Indicates the point fault reason.
  • Enabled: Configures the status of the point. A disabled point will not receive data from RestQuery.
  • Device Facets: Configures the input value facets.
  • Conversion: Allows application of a standard conversion. This conversion is the one available in all Niagara ProxyExts.
  • Read Value: The value received by a RestQuery, filtered by the Selector and converted as shown below. If the value is a final value (String, Numeric or Boolean) then it is converted to a Niagara value. If this value is an Object then the slot receives a text representing the list of the keys for the object. If it is an Array, then it receives a number representing the length of the array. If the value is Null, then the slot receives the text: "null".
  • Write Value: Not currently used.
  • Poll Frequency: Configures the frequency of data recovery. (See RestNetwork)
  • Selector: Allows to choose if you want to target the body, the headers or the cookies of the http response.
  • Received Type: Provides an indication of the type of data received before the conversions.
  • Status Conversion: Container used to configure the status of the value that will be written to the point. (See Status Conversions).
  • Value Conversion: Container used to modify the value to be written in the point. The conversion output values must match the control point type. (See Value Conversions).