GetNode

GetNode provides the details about a single node in the Niagara config space or cached hierarchy tree (“hier:/”). This does not need to be called for full tree traversal. Starting at any node, you can use GetChildNodes exclusively.

Request example

{
     "requests": [{
           "message": "GetNode",
           "node" : "slot:/TridiumEMEA/MainPower",
     }]
}

Request elements

Request element Value Description
message GetNode Identifies the type of request being submitted.
Node or node (required) ORD (defaults to a relative ORD slot, which is resolved against the config space to which the Px view is assigned) Defines the ORD to the desired slot.

Response example

{ "responses" : [
{
     "message" : "GetNode",
     "node" : "slot:/TridiumEMEA/MainPower",
     "name" : "MainPower",
     "icon" : "/ord?module://icons:/x16/folder.png",
     "hasChildren" : true,
     "data" : [
       {
          "data" : "slot:TridiumEMEA_Main",
          "name" : "TridiumEMEA_Main",
          "type" : "numeric",
          "icon" : "/ord?module://icons/x16/schedule.png",
          "hasTrend" : false,
          "unit" : {
            "name" : "kilowatt",
            "symbol" : "kW"
          }
       }
     ],
 }
]}

Response elements

In addition to the following, the system echoes back all request elements.

Response element Value Description
actions list Lists the actions available on the node:

name returns the action slot name.

display returns the display name.

parameter is only present if the action takes a parameter. This could represent a single object or a tree of complex objects. It the parameter represents a complex tree, each property is represented as a child object whose name is the slotName. The properties are the same as those described for the data element.

returnType identifies the data type.

attributes text Returns a map of attribute names and their associated values.
Data algorithm (or tag) name; data=algorithm or tag name Specifies the an algorithm (or tag) used to retrieve data.

The purpose of an alert is to detect a fault condition (Boolean value result). In most cases, you would pick an algorithm that has a Boolean result when configuring this property for an alert. Algorithms with a numeric or enum value greater than zero are considered true and less than zero are considered false.

This is how output from one algorithm becomes the input data source to another algorithm. The prefix for algorithms is alg:.

Name read-only Returns the display name of the object.
falseText text Returns descriptive word(s) when the result is false, such as offor closed.
hasChildren read only Indicates if the node has child nodes.
hasTrend read only Indicates if the node has histories.
Interval optional drop-down list (defaults to the optimal number of records on reports); interval=option Refers to the BInterval component, which the framework uses to identify the time between values in a trend (time series). When specified, a rollup is required, which causes the system to combine all values that fall into a single interval.

Options range from None to a Year.

Above the drop-down list, the Use This Value check box turns on and off the check box next to Interval in the Settings window (you access this window by clicking the Edit button (Image), followed by clicking the Settings button (Image) on the chart). The availability of this check box provides an easy way for a user to enable and disable the use of intervals in chart calculations.

max number Defines the largest number possible.
min number Defines the smallest number.
Range string Identifies an enum range as a list of string values.
trueText text Returns descriptive word(s) when the result is true such as on, or open.
Type or type boolean, numeric, enum, string, formula, data definition Defines or returns the object type, which depends on where you are in the system.
unit unit=option (unit of measure) Selects the unit name and display symbol to associate with a data source.