Create measurement

Create a new measurement entry.

URI
/measurement/create/{nodeKey}/{fieldName}/{value}
Method
GET

URI parameters

nodeKey
The node key
fieldName
The field name
value
The float value

Request headers

Request body

Response body

200 The saved measurement
{  
   "epoch":17910,
   "nodeId":"7c8f4bb0-17eb-11e9-9ca3-f719d74fca9a",
   "field":"teszt",
   "created":"870d9b00-17eb-11e9-b2c0-591f3111d72f",
   "floatValue":21.0,
   "textValue":null
}
404 Node key not found or field of node not exists

                            

Delete raw measurement data

Delete raw measurement data by epoch and range of UTC timestamp of milliseconds.

URI
/measurement/delete/{epoch}/{nodeId}/{fieldName}/{fromTimestamp}/{toTimestamp}
Method
GET

URI parameters

epoch
The epoch of day
nodeId
The ID of the node
fieldName
The field name
fromTimestamp
Inclusive UTC timestamp in milliseconds
toTimestamp
Exclusive UTC timestamp in milliseconds

Request headers

Authorization
Bearer eyJhbGciO ... _K74HRzwg

Request body

Response body

200 The removed measurement entries
[{  
   "epoch":17910,
   "nodeId":"7c8f4bb0-17eb-11e9-9ca3-f719d74fca9a",
   "field":"teszt",
   "created":"870d9b00-17eb-11e9-b2c0-591f3111d72f",
   "floatValue":21.0,
   "textValue":null
}]
403 Access forbidden to the node

                            
404 Node key not found or field of node not exists

                            

List raw measurement data

List raw measurement data by epoch and range of UTC timestamp of milliseconds.

URI
/measurement/list/{epoch}/{nodeId}/{fieldName}/{fromTimestamp}/{toTimestamp}
Method
GET

URI parameters

epoch
The epoch of day
nodeId
The ID of the node
fieldName
The field name
fromTimestamp
Inclusive UTC timestamp in milliseconds
toTimestamp
Exclusive UTC timestamp in milliseconds

Request headers

Authorization
Bearer eyJhbGciO ... _K74HRzwg

Request body

Response body

200 The list of measurement entries
[{  
   "epoch":17910,
   "nodeId":"7c8f4bb0-17eb-11e9-9ca3-f719d74fca9a",
   "field":"teszt",
   "created":"870d9b00-17eb-11e9-b2c0-591f3111d72f",
   "floatValue":21.0,
   "textValue":null
}]
403 Access forbidden to the node

                            
404 Node key not found or field of node not exists

                            

Load raw measurements by epoch

Load raw values by epoch, node id, field name.

URI
/measurement/loadByEpoch/{epoch}/{nodeId}/{fieldName}
Method
GET

URI parameters

epoch
The elapsed days (epoch) from 1 January, 1970
nodeId
The ID of the node
fieldName
The field name

Request headers

Request body

Response body

200 The saved measurement
[  
   [  
      1546894398360,
      15.0
   ],
   [
      ...,
      ...
   ],
   [  
      1546894372542,
      15.0
   ]
]
404 Node key not found or field of node not exists

                            

Load measurement series by granulation

Load series of values by node id, field name, granulation and number of series.

URI
/measurement/loadByNodeId/{nodeId}/{fieldName}/{granulation}/{numberOfSeries}
Method
GET

URI parameters

nodeId
The ID of the node
fieldName
The field name
granulation
The granulation of the aggregation of the series:
  • DAY: 5 minutes aggregation per series
  • WEEK: 1 hour aggregation per series
  • MONTH: 4 hours aggregation per series
  • YEAR: 1 day aggregation per series
numberOfSeries
Number of series to now

Request headers

Request body

Response body

200 The array of series (timestamp, average, minimum, maximum) with meta data of node and field.
[  
   {  
      "field":"temp",
      "data":[  
         [  
            1547561700000,
            20.4,
            20.4,
            20.4
         ],
         [
            ...,
            ...,
            ...,
            ...
         ], 
         [  
            1547475900000,
            20.8,
            20.8,
            20.8
         ]
      ],
      "name":"room — temp",
      "description":"room"
   }
]

Load measurement series by granulation

Load series of values by node key, field name, granulation and number of series.

URI
/measurement/loadByNodeKey/{nodeKey}/{fieldName}/{granulation}/{numberOfSeries}
Method
GET

URI parameters

nodeKey
The node key
fieldName
The field name
granulation
The granulation of the aggregation of the series:
  • DAY: 5 minutes aggregation per series
  • WEEK: 1 hour aggregation per series
  • MONTH: 4 hours aggregation per series
  • YEAR: 1 day aggregation per series
numberOfSeries
Number of series to now

Request headers

Request body

Response body

200 The array of series (timestamp, average, minimum, maximum) with meta data of node and field.
[  
   {  
      "field":"temp",
      "data":[  
         [  
            1547561700000,
            20.4,
            20.4,
            20.4
         ],
         [
            ...,
            ...,
            ...,
            ...
         ], 
         [  
            1547475900000,
            20.8,
            20.8,
            20.8
         ]
      ],
      "name":"room — temp",
      "description":"room"
   }
]

Load the last float value

Load the last float value of the node id and field name.

URI
/measurement/loadFloatValue/{nodeKey}/{fieldName}
Method
GET

URI parameters

nodeKey
The node key
fieldName
The field name

Request headers

Request body

Response body

200 The last float value of the node key and field name.
23.21
404 Node key not found or field of node not exists