Gateway
Definition
Gateway Type
- JSON
- Typescript
- Kotlin
gateway.json
{
"id": 0,
"farmID": 0,
"zoneID": 0,
"groupID": 0,
"nodeKey": 0,
"typeID": 0,
"gatewayName": "",
"serialNumber": "",
"lat": 0,
"lng": 0,
"power": 0,
"rssi": 0,
"iccid": "",
"topic": "",
"username": "",
"password": "",
"clientID": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}
Get Gateways
- Curl
- Typescript
- Kotlin
curl -X GET "https://${baseUrl}/gateway/?\$filter=&\$orderBy=&\$page=1&\$pageSize=10" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Get Gateway
- Curl
- Typescript
- Kotlin
curl -X GET "https://${baseUrl}/gateway/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Apply Gateway.ID
- Curl
- Typescript
- Kotlin
curl -X POST "https://${baseUrl}/apply/gateway/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Create Gateway
- Curl
- Typescript
- Kotlin
curl -X POST "https://${baseUrl}/gateway/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @gateway.json
info
gateway.json
{
"farmID": 0,
"zoneID": 0,
"groupID": 0,
"nodeKey": 0,
"typeID": 0,
"gatewayName": "",
"serialNumber": "",
"lat": 0,
"lng": 0,
"power": 0,
"rssi": 0,
"iccid": "",
"topic": "",
"username": "",
"password": "",
"clientID": "",
"status": 0,
}
tip
success status: 201
Update Gateway
- Curl
- Typescript
- Kotlin
curl -X PUT "https://${baseUrl}/gateway/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @gateway.json
info
gateway.json
{
"farmID": 0,
"zoneID": 0,
"groupID": 0,
"nodeKey": 0,
"typeID": 0,
"gatewayName": "",
"serialNumber": "",
"lat": 0,
"lng": 0,
"power": 0,
"rssi": 0,
"iccid": "",
"topic": "",
"username": "",
"password": "",
"clientID": "",
"status": 0,
}
Update Gateway Partial
- Curl
- Typescript
- Kotlin
curl -X PATCH "https://${baseUrl}/gateway/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: farmID,zoneID,groupID,nodeKey,typeID,gatewayName,serialNumber,lat,lng,power,rssi,iccid,topic,username,password,clientID,status" \
-d @gateway.json
info
gateway.json
{
"farmID": 0,
"zoneID": 0,
"groupID": 0,
"nodeKey": 0,
"typeID": 0,
"gatewayName": "",
"serialNumber": "",
"lat": 0,
"lng": 0,
"power": 0,
"rssi": 0,
"iccid": "",
"topic": "",
"username": "",
"password": "",
"clientID": "",
"status": 0,
}
Update Gateway Status
- Curl
- Typescript
- Kotlin
curl -X PATCH "https://${baseUrl}/gateway/${id}/status/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @gateway.json
info
gateway.json
{
"status": 0
}
Destroy Gateway
- Curl
- Typescript
- Kotlin
curl -X DELETE "https://${baseUrl}/gateway/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"