Skip to main content

Rtu

Definition

Rtu Type
rtu.json
{
"id": 0,
"farmID": 0,
"zoneID": 0,
"groupID": 0,
"nodeID": 0,
"typeID": 0,
"rtuName": "",
"serialNumber": "",
"lat": 0,
"lng": 0,
"power": 0,
"rssi": 0,
"clientID": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Rtus

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

Get Rtu

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

Apply Rtu.ID

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

Create Rtu

curl -X POST "https://${baseUrl}/rtu/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @rtu.json
info
rtu.json
{
"farmID": 0,
"zoneID": 0,
"groupID": 0,
"nodeID": 0,
"typeID": 0,
"rtuName": "",
"serialNumber": "",
"lat": 0,
"lng": 0,
"power": 0,
"rssi": 0,
"clientID": "",
"status": 0,
}
tip

success status: 201

Update Rtu

curl -X PUT "https://${baseUrl}/rtu/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @rtu.json
info
rtu.json
{
"farmID": 0,
"zoneID": 0,
"groupID": 0,
"nodeID": 0,
"typeID": 0,
"rtuName": "",
"serialNumber": "",
"lat": 0,
"lng": 0,
"power": 0,
"rssi": 0,
"clientID": "",
"status": 0,
}

Update Rtu Partial

curl -X PATCH "https://${baseUrl}/rtu/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: farmID,zoneID,groupID,nodeID,typeID,rtuName,serialNumber,lat,lng,power,rssi,clientID,status" \
-d @rtu.json
info
rtu.json
{
"farmID": 0,
"zoneID": 0,
"groupID": 0,
"nodeID": 0,
"typeID": 0,
"rtuName": "",
"serialNumber": "",
"lat": 0,
"lng": 0,
"power": 0,
"rssi": 0,
"clientID": "",
"status": 0,
}

Update Rtu Status

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

Destroy Rtu

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