External API
Get Devices
Mengambil daftar perangkat beserta metadata sensor yang tersedia.
GET
/
devices
Get list devices
curl --request GET \
--url https://app.mertani.co.id/external/v1/devices \
--header 'Authorization: Basic <encoded-value>'{
"message": "Success",
"data": [
{
"device_id": "DEV-001-ABC123",
"name": "AWLR SUNGAI CONTOH 1",
"type": "AWLR",
"lat": -7.7956,
"long": 110.3695,
"interval_seconds": 1800,
"last_update_at": "2026-05-05T10:00:00Z",
"sensors": [
{
"sensor_id": "ABC1-batt",
"name": "Battery Level",
"type": "BATTERY",
"unit": "%"
},
{
"sensor_id": "ABC1-water",
"name": "Water Level",
"type": "FLUID_LEVEL",
"unit": "cm"
},
{
"sensor_id": "ABC1-signal",
"name": "Signal Strength",
"type": "CELLULAR_SIGNAL",
"unit": "dBm"
}
]
},
{
"device_id": "DEV-002-XYZ789",
"name": "AWS CUACA CONTOH 2",
"type": "AWS",
"lat": -7.8012,
"long": 110.3649,
"interval_seconds": 3600,
"last_update_at": "2026-05-05T09:30:00Z",
"sensors": [
{
"sensor_id": "XYZ7-temp",
"name": "Air Temperature",
"type": "AIR_TEMPERATURE",
"unit": "°C"
},
{
"sensor_id": "XYZ7-hum",
"name": "Air Humidity",
"type": "AIR_HUMIDITY",
"unit": "%RH"
},
{
"sensor_id": "XYZ7-rain",
"name": "Rainfall",
"type": "RAIN_FALL",
"unit": "mm"
},
{
"sensor_id": "XYZ7-wind",
"name": "Wind Speed",
"type": "WIND_SPEED",
"unit": "m/s"
}
]
}
]
}⌘I
Get list devices
curl --request GET \
--url https://app.mertani.co.id/external/v1/devices \
--header 'Authorization: Basic <encoded-value>'{
"message": "Success",
"data": [
{
"device_id": "DEV-001-ABC123",
"name": "AWLR SUNGAI CONTOH 1",
"type": "AWLR",
"lat": -7.7956,
"long": 110.3695,
"interval_seconds": 1800,
"last_update_at": "2026-05-05T10:00:00Z",
"sensors": [
{
"sensor_id": "ABC1-batt",
"name": "Battery Level",
"type": "BATTERY",
"unit": "%"
},
{
"sensor_id": "ABC1-water",
"name": "Water Level",
"type": "FLUID_LEVEL",
"unit": "cm"
},
{
"sensor_id": "ABC1-signal",
"name": "Signal Strength",
"type": "CELLULAR_SIGNAL",
"unit": "dBm"
}
]
},
{
"device_id": "DEV-002-XYZ789",
"name": "AWS CUACA CONTOH 2",
"type": "AWS",
"lat": -7.8012,
"long": 110.3649,
"interval_seconds": 3600,
"last_update_at": "2026-05-05T09:30:00Z",
"sensors": [
{
"sensor_id": "XYZ7-temp",
"name": "Air Temperature",
"type": "AIR_TEMPERATURE",
"unit": "°C"
},
{
"sensor_id": "XYZ7-hum",
"name": "Air Humidity",
"type": "AIR_HUMIDITY",
"unit": "%RH"
},
{
"sensor_id": "XYZ7-rain",
"name": "Rainfall",
"type": "RAIN_FALL",
"unit": "mm"
},
{
"sensor_id": "XYZ7-wind",
"name": "Wind Speed",
"type": "WIND_SPEED",
"unit": "m/s"
}
]
}
]
}