Get list devices
curl --request GET \
--url https://app.mertani.co.id/external/v1/devices \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://app.mertani.co.id/external/v1/devices"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://app.mertani.co.id/external/v1/devices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.mertani.co.id/external/v1/devices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.mertani.co.id/external/v1/devices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.mertani.co.id/external/v1/devices")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.mertani.co.id/external/v1/devices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"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"
}
]
}
]
}{
"message": "Bad Request",
"data": null
}{
"message": "Unauthorized",
"data": null
}{
"message": "Forbidden",
"data": null
}{
"message": "Method Not Allowed",
"data": null
}{
"message": "To Many Request",
"data": null
}Open 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>'import requests
url = "https://app.mertani.co.id/external/v1/devices"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://app.mertani.co.id/external/v1/devices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.mertani.co.id/external/v1/devices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.mertani.co.id/external/v1/devices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.mertani.co.id/external/v1/devices")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.mertani.co.id/external/v1/devices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"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"
}
]
}
]
}{
"message": "Bad Request",
"data": null
}{
"message": "Unauthorized",
"data": null
}{
"message": "Forbidden",
"data": null
}{
"message": "Method Not Allowed",
"data": null
}{
"message": "To Many Request",
"data": null
}Last modified on June 11, 2026
⌘I