Node
Definition
Node Type
- JSON
- Typescript
- Kotlin
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
- Typescript
- Kotlin
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
- Typescript
- Kotlin
curl -X GET "https://${baseUrl}/node/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Apply Node.ID
- Curl
- Typescript
- Kotlin
curl -X POST "https://${baseUrl}/apply/node/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Create Node
- Curl
- Typescript
- Kotlin
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
- Typescript
- Kotlin
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
- Typescript
- Kotlin
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
- Typescript
- Kotlin
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
- Typescript
- Kotlin
curl -X DELETE "https://${baseUrl}/node/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Link Users
- Curl
- Typescript
- Kotlin
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]"
UnLink Users
- Curl
- Typescript
- Kotlin
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]"