-
Notifications
You must be signed in to change notification settings - Fork 0
tekrice API
kirai edited this page Sep 11, 2014
·
9 revisions
Welcome to the tekrice wiki!
Nodes are computing elements gathering data from the environment. Each node can have 0 or more sensors attached to it.
Each sensor belongs to one node. Sensors gather information in "readings"
Each reading belongs to a sensor.
This is what you will use for storing and accessing readings from sensors.
In order to address a sensor a node_id and the sensor within that node must be provided.
GET /reading/node_:node_id/:sensor_alias
Request:
GET /reading/node_1/inside_temperature
Response:
{
"data": [
{
"timestamp" : 2014-09-10-11:29:41:468362,
"value": 29.0
}
],
"errors": [],
"request": {},
"warnings": []
}
Get the node_ids that belong to the current network
GET /node/all
Request:
GET /node/all
Response:
{
"data": [
{
"nodes" : [{"node_id" : 1,
"node_alias": "Chris Hatake North side",
"sensors" : [{"sensor_alias" : "temperature",
"latest_reading" : {"value" : 26.0, "time"}},
{"sensor_alias" : "distance"}]}]
}
],
"errors": [],
"request": {},
"warnings": []
}