GET /protocols/bacnet/local/objects/{objectType}/{objectInstance}/trend
The TrendLog resource allows retrieving the trend log records of a BACnet object.
The log frequency of a BACnet object is determined by its configuration, which could be done in EC-gfxProgram or Envysion.
A trend log history could contains different type of records: values, statuses, failures and time changes.
Used when you are operating a browser without access to the header parameter. This allows you to choose which encoding you want to use for the response:
All these resources can be used according what the resource allows.
If this parameter is not in the request, the Application/Json will be chosen by default.
There are multiple possible values (according the resource):
The first two are the most often used.
This is the object type string value.
This is the instance of a specific BACnet object type.
If this parameter is set to true, the timeStamp value will be in ISO 8601 format.
Type : Boolean
Default value : false
Used to set a range.
Can be combined with the stop query option.
This will get all the objects after this value.
This on can be used for two value depends of your request :
timeStamp : The value is a long.
sequenceNumber : The value is an integer and need the parameter bySequenceNumber set to true in the query options too.
Located in : Query
Example values : start=1469121300035
Used to set a range.
Can be combined with the start query option.
This will get all the objects before this value.
This on can be used for two value, depends of your request :
timeStamp : The value is a long.
sequenceNumber : The value is an integer and need the parameter bySequenceNumber set to true in the query options too.
Located in : Query
Example values : stop=1469121300035
The number of object returned in the array.
Type : Integer
If set to true, only the value with the same type as the object value type will be returned.
Type : Boolean
Default value : false
If true the array will be sort by sequenceNumber descending order.
Type : Boolean
Default value : false
If true, the range will be focused on the sequenceNumber value.
The start and stop value need to be set with a sequenceNumber value.
Type : Boolean
Default value : false
Object Name: LogRecord
Property Name | Type | Description | Method |
---|---|---|---|
Value | String | Could be boolean, enumerated, numeric, string or any other type. | GET |
TimeStamp | String | Date and time of the log record. | GET |
StatusFlags | String | A list of 4 boolean values which corresponds to the following: InAlarm, Fault, Overridden, OutOfService. | GET |
SequenceNumber | Integer | A value that is incremented for every record. It allows easy sorting of the records. | GET |
Type | Integer | Type is represented as an integer value :
|
GET |
URL Example: https://0.0.0.0/api/rest/v1/protocols/bacnet/local/objects/analog-value/11/trend?encode=json&iso8601=true
[
{
"value": 195.39922,
"timeStamp": "2016-07-28T10:43:00.029+00:00",
"type": 2,
"statusFlags": "false,false,false,false",
"sequenceNumber": 494221
},
{
"value": 196.93112,
"timeStamp": "2016-07-28T10:44:00.031+00:00",
"type": 2,
"statusFlags": "false,false,false,false",
"sequenceNumber": 494222
},
{
"value": 220.869,
"timeStamp": "2016-07-28T10:45:00.072+00:00",
"type": 2,
"statusFlags": "false,false,false,false",
"sequenceNumber": 494223
}
]
URL Example: https://0.0.0.0/api/rest/v1/protocols/bacnet/local/objects/analog-value/11/trend?encode=xml&iso8601=true
<?xml version="1.0" encoding="utf-8"?>
<LogRecordList>
<LogRecord>
<Value>220.869</Value>
<TimeStamp>2016-07-28T06:45:00.072-04:00</TimeStamp>
<StatusFlags>false,false,false,false</StatusFlags>
<RecordType>2</RecordType>
<SequenceNumber>494223</SequenceNumber>
</LogRecord>
<LogRecord>
<Value>195.92123</Value>
<TimeStamp>2016-07-28T06:46:00.049-04:00</TimeStamp>
<StatusFlags>false,false,false,false</StatusFlags>
<RecordType>2</RecordType>
<SequenceNumber>494224</SequenceNumber>
</LogRecord>
<LogRecord>
<Value>192.46585</Value>
<TimeStamp>2016-07-28T06:47:00.019-04:00</TimeStamp>
<StatusFlags>false,false,false,false</StatusFlags>
<RecordType>2</RecordType>
<SequenceNumber>494225</SequenceNumber>
</LogRecord>
<LogRecord>
<Value>191.274</Value>
<TimeStamp>2016-07-28T06:48:00.028-04:00</TimeStamp>
<StatusFlags>false,false,false,false</StatusFlags>
<RecordType>2</RecordType>
<SequenceNumber>494226</SequenceNumber>
</LogRecord>
<LogRecord>
<Value>188.99052</Value>
<TimeStamp>2016-07-28T06:49:00.020-04:00</TimeStamp>
<StatusFlags>false,false,false,false</StatusFlags>
<RecordType>2</RecordType>
<SequenceNumber>494227</SequenceNumber>
</LogRecord>
<LogRecord>
<Value>191.1937</Value>
<TimeStamp>2016-07-28T06:50:00.062-04:00</TimeStamp>
<StatusFlags>false,false,false,false</StatusFlags>
<RecordType>2</RecordType>
<SequenceNumber>494228</SequenceNumber>
</LogRecord>
<LogRecord>
<Value>217.50443</Value>
<TimeStamp>2016-07-28T06:51:00.019-04:00</TimeStamp>
<StatusFlags>false,false,false,false</StatusFlags>
<RecordType>2</RecordType>
<SequenceNumber>494229</SequenceNumber>
</LogRecord>
<LogRecord>
<Value>188.24916</Value>
<TimeStamp>2016-07-28T06:52:00.032-04:00</TimeStamp>
<StatusFlags>false,false,false,false</StatusFlags>
<RecordType>2</RecordType>
<SequenceNumber>494230</SequenceNumber>
</LogRecord>
<LogRecord>
<Value>186.57964</Value>
<TimeStamp>2016-07-28T06:53:00.021-04:00</TimeStamp>
<StatusFlags>false,false,false,false</StatusFlags>
<RecordType>2</RecordType>
<SequenceNumber>494231</SequenceNumber>
</LogRecord>
</LogRecordList>