For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
DocsDashboardAPI ReferenceFAQ
DocsDashboardAPI ReferenceFAQ
  • Overview
    • Welcome
    • How Does Mertani Work?
    • Integration Method
    • Authentication
    • Struktur Data
    • Daftar Sensor ID
  • External API
    • GETGet list devices
    • GETGet device sensor data
  • Webhook API
    • POSTReceive Sensor Data
Dashboard
LogoLogo
External API

Get device sensor data

||View as Markdown|
GET
https://app.mertani.co.id/external/v1/devices/:device_id/data
GET
/external/v1/devices/:device_id/data
$curl -G https://app.mertani.co.id/external/v1/devices/device_id/data \
> -H "Content-Type: application/json" \
> -u "<username>:<password>" \
> --data-urlencode start=2024-06-01T00:00:00Z \
> --data-urlencode end=2024-06-01T23:59:59Z \
> -d tz=7
200Retrieved
1{
2 "message": "Data retrieved successfully",
3 "data": [
4 {
5 "timestamp": "2024-06-01T08:00:00Z",
6 "sensors": [
7 {
8 "id": "temperature",
9 "value": 26.5,
10 "unit": "°C"
11 },
12 {
13 "id": "humidity",
14 "value": 58.2,
15 "unit": "%"
16 }
17 ]
18 },
19 {
20 "timestamp": "2024-06-01T12:00:00Z",
21 "sensors": [
22 {
23 "id": "temperature",
24 "value": 29.1,
25 "unit": "°C"
26 },
27 {
28 "id": "humidity",
29 "value": 54.7,
30 "unit": "%"
31 }
32 ]
33 }
34 ]
35}
Was this page helpful?
Previous

Get list devices

Next

Receive Sensor Data

Built with

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Path parameters

device_idstringRequired

Query parameters

startdatetimeRequired
enddatetimeRequired
tzintegerOptional

Response

Success
messagestring
datalist of objects