Skip to main content

Node

Definition

Node Type
node.json
{
"id": 0,
"ref": 0,
"key": 0,
"pile": 0,
"farmID": 0,
"zoneID": 0,
"groupID": 0,
"lat": 0,
"lng": 0,
"direction": 0,
"altitude": 0,
"power": 0,
"rssi": 0,
"nodeName": "",
"nodeDescription": "",
"status": 0,
"deletedAt": "",
"createdAt": "",
"updatedAt": "",
}

Get Nodes

curl -X GET "https://${baseUrl}/node/?\$filter=&\$orderBy=&\$page=1&\$pageSize=10" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Get Node

curl -X GET "https://${baseUrl}/node/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Apply Node.ID

curl -X POST "https://${baseUrl}/apply/node/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Create Node

curl -X POST "https://${baseUrl}/node/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @node.json
info
node.json
{
"ref": 0,
"key": 0,
"pile": 0,
"farmID": 0,
"zoneID": 0,
"groupID": 0,
"lat": 0,
"lng": 0,
"direction": 0,
"altitude": 0,
"power": 0,
"rssi": 0,
"nodeName": "",
"nodeDescription": "",
"status": 0,
}
tip

success status: 201

Update Node

curl -X PUT "https://${baseUrl}/node/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @node.json
info
node.json
{
"ref": 0,
"key": 0,
"pile": 0,
"farmID": 0,
"zoneID": 0,
"groupID": 0,
"lat": 0,
"lng": 0,
"direction": 0,
"altitude": 0,
"power": 0,
"rssi": 0,
"nodeName": "",
"nodeDescription": "",
"status": 0,
}

Update Node Partial

curl -X PATCH "https://${baseUrl}/node/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: ref,key,pile,farmID,zoneID,groupID,lat,lng,direction,altitude,power,rssi,nodeName,nodeDescription,status" \
-d @node.json
info
node.json
{
"ref": 0,
"key": 0,
"pile": 0,
"farmID": 0,
"zoneID": 0,
"groupID": 0,
"lat": 0,
"lng": 0,
"direction": 0,
"altitude": 0,
"power": 0,
"rssi": 0,
"nodeName": "",
"nodeDescription": "",
"status": 0,
}

Update Node Status

curl -X PATCH "https://${baseUrl}/node/${id}/status/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @node.json
info
node.json
{
"status": 0
}

Destroy Node

curl -X DELETE "https://${baseUrl}/node/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
curl -X POST "https://${baseUrl}/node/${id}/user/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "[1,2,3,4]"
curl -X DELETE "https://${baseUrl}/node/${id}/user/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "[1,2,3,4]"