Find node

Find a node by id.

URI
/node/find/{nodeId}
Method
GET

URI parameters

nodeId
The 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/{nodeId}
Method
GET

URI parameters

nodeId
The 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 of the user.

URI
/node/list
Method
GET

URI parameters

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"
}]

List of nodes

List of nodes by device id.

URI
/node/listByDevice/{deviceId}
Method
GET

URI parameters

deviceId
The 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"
}]

List of nodes

List of public nodes of the user id.

URI
/node/listByUser/{userId}
Method
GET

URI parameters

userId
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)
{
   "description":"Desktop sensor node",
   "name":"Desktop"
}
Update the node (with nodeId)
{
   "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