Find node

Find a node by id.

URI
/node/find/{nodeShortId}
Method
GET

URI parameters

nodeShortId
The short id of the node

Request headers

Access token (optional)
Authorization: Bearer eyJhbGciO ... _K74HRzwg

Request body

Response body

200 The (filtered) JSON of the node
{
   "nodeId":"6061c320-3cce-11e9-b6bd-7f24822e244f",
   "nodeShortId":"tr1_JIIuJE9gYcMgPM4R6Q",
   "description":"Desktop sensor node",
   "deviceId":"a7f71080-3bef-11e9-9115-7bf125b17ae7",
   "fields":[
      "temperature"
   ],
   "lastUpdate":1551685939128,
   "name":"Desktop",
   "nodeKey":"xxxxxxxxxxxxxxxxxxxxxx",
   "offset":{
      "temperature":0.0
   },
   "publicity":"GUEST",
   "retention":2592000,
   "userId":"42118de0-3bef-11e9-bbc1-f9cb7c3062e5"
}
404 Node not found or allowed to see

                            

Generate new key

Generate new key to the node.

URI
/node/generateNewKey/{nodeShortId}
Method
GET

URI parameters

nodeShortId
The short id of the node

Request headers

Access token
Authorization: Bearer eyJhbGciO ... _K74HRzwg

Request body

Response body

200 The (filtered) JSON of the node
{
   "nodeId":"6061c320-3cce-11e9-b6bd-7f24822e244f",
   "nodeShortId":"tr1_JIIuJE9gYcMgPM4R6Q",
   "description":"Desktop sensor node",
   "deviceId":"a7f71080-3bef-11e9-9115-7bf125b17ae7",
   "fields":[
      "temperature"
   ],
   "lastUpdate":1551685939128,
   "name":"Desktop",
   "nodeKey":"xxxxxxxxxxxxxxxxxxxxxx",
   "offset":{
      "temperature":0.0
   },
   "publicity":"GUEST",
   "retention":2592000,
   "userId":"42118de0-3bef-11e9-bbc1-f9cb7c3062e5"
}
401 The provided JWT access token is invalid or expired

                            
403 Node not found or not owned

                            

List of nodes

List of nodes by device id.

URI
/node/listByDevice/{deviceShortId}
Method
GET

URI parameters

deviceShortId
The short id of the device

Request headers

Access token
Authorization: Bearer eyJhbGciO ... _K74HRzwg

Request body

Response body

200 The (filtered) JSON of the list of nodes
[{
   "nodeId":"6061c320-3cce-11e9-b6bd-7f24822e244f",
   "nodeShortId":"tr1_JIIuJE9gYcMgPM4R6Q",
   "description":"Desktop sensor node",
   "deviceId":"a7f71080-3bef-11e9-9115-7bf125b17ae7",
   "fields":[
      "temperature"
   ],
   "lastUpdate":1551685939128,
   "name":"Desktop",
   "nodeKey":"xxxxxxxxxxxxxxxxxxxxxx",
   "offset":{
      "temperature":0.0
   },
   "publicity":"GUEST",
   "retention":2592000,
   "userId":"42118de0-3bef-11e9-bbc1-f9cb7c3062e5"
}]
403 Device not found or not visible

                            

List of nodes

List of public nodes of the user id.

URI
/node/listByUser/{userShortId}
Method
GET

URI parameters

userShortId
The id of the user

Request headers

Access token (optional)
Authorization: Bearer eyJhbGciO ... _K74HRzwg

Request body

Response body

200 The (filtered) JSON of the list of nodes
[{
   "nodeId":"6061c320-3cce-11e9-b6bd-7f24822e244f",
   "nodeShortId":"tr1_JIIuJE9gYcMgPM4R6Q",
   "description":"Desktop sensor node",
   "deviceId":"a7f71080-3bef-11e9-9115-7bf125b17ae7",
   "fields":[
      "temperature"
   ],
   "lastUpdate":1551685939128,
   "name":"Desktop",
   "nodeKey":"xxxxxxxxxxxxxxxxxxxxxx",
   "offset":{
      "temperature":0.0
   },
   "publicity":"GUEST",
   "retention":2592000,
   "userId":"42118de0-3bef-11e9-bbc1-f9cb7c3062e5"
}]

Update the node

Create a new node or update the editable fields of the node.

URI
/node/update
Method
POST

URI parameters

Request headers

Access token
Authorization: Bearer eyJhbGciO ... _K74HRzwg

Request body

Create new node (without nodeId and nodeShortId)
{
   "description":"Desktop sensor node",
   "name":"Desktop"
}
Update the node (with nodeId and nodeShortId)
{
   "nodeId":"6061c320-3cce-11e9-b6bd-7f24822e244f",
   "description":"Desktop sensor node",
   "name":"Desktop"
}

Response body

200 The (filtered) JSON of the created or update node
[{
   "nodeId":"6061c320-3cce-11e9-b6bd-7f24822e244f",
   "nodeShortId":"tr1_JIIuJE9gYcMgPM4R6Q",
   "description":"Desktop sensor node",
   "deviceId":"a7f71080-3bef-11e9-9115-7bf125b17ae7",
   "fields":[
      "temperature"
   ],
   "lastUpdate":1551685939128,
   "name":"Desktop",
   "nodeKey":"xxxxxxxxxxxxxxxxxxxxxx",
   "offset":{
      "temperature":0.0
   },
   "publicity":"GUEST",
   "retention":2592000,
   "userId":"42118de0-3bef-11e9-bbc1-f9cb7c3062e5"
}]
401 The provided JWT access token is invalid or expired

                            
403 Node not found or not owned, device not found or not owned