API Documentation
Biogas Monitoring & Waste Management System — Depok · Jatisari · Indramayu · JakBar
How to Use This API
Complete integration guide for the RMC API
Authentication
Every data endpoint (GET) needs an X-API-KEY with the read scope, or an Authorization: Bearer token from POST /login. Only /ping and /test-cors are public.
Base URL
Every endpoint is relative to: https://monitoring.xampah.com/api/
Login Rate Limit
POST /login: at most 10 attempts per minute per IP (then 429).
Every endpoint below carries an access label. Labels are read straight from the server's own rules, so they always match what is actually enforced.
| Label | How to access |
|---|---|
| Public | No authentication. |
| API key (read) / login | X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login. |
| Device API key | X-API-KEY header (scope * — read-only keys are refused with 403). |
| Admin login | Authorization: Bearer token from POST /login. |
POST /login and use the Bearer token.Accept: application/json (always; validation errors come back as JSON 422)Content-Type: application/json (POST/PUT with a JSON body)X-API-KEY: sk_... (servers/devices)
or Authorization: Bearer {token}
(login)
{
"success": true, // true on success
"message": "...", // message (optional)
"data": {}, // payload (object or array)
"pagination": { // on paginated endpoints (called "meta" on some)
"current_page": 1,
"per_page": 25,
"total": 100,
"last_page": 4
}
}
| HTTP | Meaning | Notes |
|---|---|---|
| 200 | OK | Success |
| 201 | Created | Data created |
| 401 | Unauthorized | Missing / wrong X-API-KEY or login token |
| 403 | Forbidden | Valid credentials but not allowed (e.g. a read-only key sending data, not an admin) |
| 404 | Not Found | Data or endpoint does not exist |
| 409 | Conflict | Duplicate data (e.g. the same truck within 1 minute) |
| 422 | Unprocessable Entity | Validation failed; details in errors |
| 429 | Too Many Requests | Too many login attempts / repeated card tap |
| 500 | Server Error | Server error |
curl -X POST https://monitoring.xampah.com/api/login \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "your_password"}'
# response:
# {"success": true, "data": {"user": {...}, "token": "12|xxxx", "token_type": "Bearer"}}
curl https://monitoring.xampah.com/api/getCustomer \
-H "Accept: application/json" \
-H "Authorization: Bearer 12|xxxx"
# Swap the token: POST /refresh (Bearer)
# Sign out: POST /logout (Bearer)
Scavenger Workflow
POST /register-card-member
POST /attendance
POST /scavengers/save-mlo
GET /scavengers/users
GET /scavengers/total-weight
Biogas Monitoring
POST /biogas
POST /biogas/jatisari/push
POST /biogas/indramayu/push
GET /biogas-data/latest
GET /biogas-data/stats
Vehicle Weight
POST /weightDataIn
POST /weightDataOut
GET /weight/data
GET /recap/waste
<?php
// PHP cURL example - save an MLO weight
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://monitoring.xampah.com/api/scavengers/save-mlo',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-API-KEY: sk_xxxxxxxxxxxxxxxxxxxxxxxxx',
],
CURLOPT_POSTFIELDS => json_encode([
'user_id' => 1,
'weight' => 5.5,
]),
]);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo curl_error($ch);
}
curl_close($ch);
echo $response;
// JavaScript Fetch example
async function saveMlo(userId, weight) {
const response = await fetch(
'https://monitoring.xampah.com/api/scavengers/save-mlo',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'sk_xxxxxxxxxxxxxxxxxxxxxxxxx',
},
body: JSON.stringify({ user_id: userId, weight }),
}
);
const data = await response.json();
console.log(data);
}
saveMlo(1, 5.5);
# Python Requests example
import requests
url = "https://monitoring.xampah.com/api/scavengers/save-mlo"
headers = {
"Content-Type": "application/json",
"X-API-KEY": "sk_xxxxxxxxxxxxxxxxxxxxxxxxx",
}
data = {"user_id": 1, "weight": 5.5}
response = requests.post(url, json=data, headers=headers, timeout=10)
print("Status:", response.status_code)
print(response.json())
General API Endpoints
Authentication, API keys, users & roles, sensor health & history for every location, and Fleet (OTA / MQTT) for every gateway
Access: No authentication.
curl "https://monitoring.xampah.com/api/ping" \
-H "Accept: application/json"
{"status": "ok", "time": "2026-10-01 15:40:00"}
Access: No authentication.
curl "https://monitoring.xampah.com/api/test-cors" \
-H "Accept: application/json"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/db-test" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
{"status": "success"}
Access: No authentication.
username may hold a username or an email. Logging in deletes that user's old tokens (other devices are signed out). Admin/superadmin accounts with check_session=true: if the account is still active on another device (used in the last 30 minutes) the answer is 409 {code: session_active, data: {device, last_activity}}; send again with force=true to sign that device out. At most 10 attempts per minute per IP (429).
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | required | Username or email |
| password | string | required | Password |
| check_session | boolean | optional | Admin panel: ask first when the account is active on another device |
| force | boolean | optional | Log in anyway and sign the other device out |
curl -X POST "https://monitoring.xampah.com/api/login" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "••••••••"}'
{"username": "admin", "password": "••••••••"}
{"success": true, "message": "Login successful", "data": {"user": {"id": 1, "name": "Admin", "username": "admin", "email": "..."}, "token": "12|xxxxxxxx", "token_type": "Bearer"}}
Access: Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/user" \
-H "Accept: application/json" \
-H "Authorization: Bearer <token from POST /login>"
Access: Authorization: Bearer token from POST /login.
curl -X POST "https://monitoring.xampah.com/api/refresh" \
-H "Accept: application/json" \
-H "Authorization: Bearer <token from POST /login>"
Access: Authorization: Bearer token from POST /login.
curl -X POST "https://monitoring.xampah.com/api/logout" \
-H "Accept: application/json" \
-H "Authorization: Bearer <token from POST /login>"
{"success": true, "message": "Logout successful"}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/roles" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer (path) | required | Role ID |
curl "https://monitoring.xampah.com/api/roles/{id}" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| search | string | optional | Name/username/email |
| role | string | optional | Role name |
| role_id | integer | optional | Role ID |
| page | integer | optional | Page |
| per_page | integer | optional | Rows per page (max 200) |
curl "https://monitoring.xampah.com/api/users?role=admin&per_page=50" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/users/stats" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| role | string (path) | required | Role name |
curl "https://monitoring.xampah.com/api/users/by-role/{role}" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer (path) | required | User ID |
curl "https://monitoring.xampah.com/api/users/{id}" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
source: depok-biogas, depok-incinerator-1, depok-incinerator-2, indramayu-biogas, jatisari-biogas. The bucket width follows the length of the range: ≤1 day 5 minutes, ≤3 days 15 minutes, ≤14 days 1 hour, ≤62 days 6 hours, longer 1 day. Maximum range 366 days. t = start of the bucket (WIB).
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | string (path) | required | Data source (see notes) |
| start_date | date (Y-m-d) | required | Start date (inclusive) |
| end_date | date (Y-m-d) | required | End date (inclusive) |
| fields | string | optional | Comma-separated columns, e.g. ph_1,ph_2; default every column of the source |
curl "https://monitoring.xampah.com/api/history/{source}?start_date=2026-09-24&end_date=2026-09-30&fields=Tmp_Icn,Tmp_Prl" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
{
"success": true, "source": "depok-incinerator-1", "label": "Incinerator 1",
"start_date": "2026-09-24", "end_date": "2026-09-30", "bucket_seconds": 3600,
"fields": [{"key": "Tmp_Icn", "label": "Tmp_Icn", "unit": "°C"}],
"stats": {"Tmp_Icn": {"current": 678, "minimum": 40, "average": 388.12, "maximum": 769}},
"count": 168,
"points": [{"t": "2026-09-24 00:00:00", "n": 6, "Tmp_Icn": 151.5}]
}
Depok API Endpoints
Biogas, incinerator temperatures, truck scale, sorting scale (scavengers), waste & MLO recap, RFID cards, attendance
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
Form-urlencoded or JSON. Send Accept: application/json so validation errors come back as 422 JSON. Balloon_1..4 = fill level (%), 0 means no reading.
| Parameter | Type | Required | Description |
|---|---|---|---|
| ph_1 | number | required | Reactor 1 pH |
| ph_2 | number | required | Reactor 2 pH |
| ph_3 | number | required | Reactor 3 pH |
| ph_4 | number | required | Reactor 4 pH |
| ph_5 | number | required | Reactor 5 pH |
| ph_6 | number | required | Reactor 6 pH |
| ph_7 | number | required | Reactor 7 pH |
| gas_value_1 | number | required | Gas meter 1 (m³) |
| pressureGas_1 | number | required | Gas pressure 1 (kPa) |
| temperatureGas_1 | number | required | Gas temperature 1 (°C) |
| gas_value_2 | number | required | Gas meter 2 (m³) |
| pressureGas_2 | number | required | Gas pressure 2 (kPa) |
| temperatureGas_2 | number | required | Gas temperature 2 (°C) |
| Balloon_1 | number | required | Balloon 1 level (%) |
| Balloon_2 | number | required | Balloon 2 level (%) |
| Balloon_3 | number | required | Balloon 3 level (%) |
| Balloon_4 | number | required | Balloon 4 level (%) |
curl -X POST "https://monitoring.xampah.com/api/biogas" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"ph_1":7.12,"ph_2":7.05,"ph_3":6.98,"ph_4":7.20,"ph_5":7.01,"ph_6":6.95,"ph_7":7.10, "gas_value_1":85.5,"pressureGas_1":2.1,"temperatureGas_1":35.2, "gas_value_2":42.3,"pressureGas_2":1.9,"temperatureGas_2":34.8, "Balloon_1":61.05,"Balloon_2":58.42,"Balloon_3":0,"Balloon_4":72.63}'
{"ph_1":7.12,"ph_2":7.05,"ph_3":6.98,"ph_4":7.20,"ph_5":7.01,"ph_6":6.95,"ph_7":7.10,
"gas_value_1":85.5,"pressureGas_1":2.1,"temperatureGas_1":35.2,
"gas_value_2":42.3,"pressureGas_2":1.9,"temperatureGas_2":34.8,
"Balloon_1":61.05,"Balloon_2":58.42,"Balloon_3":0,"Balloon_4":72.63}
{"success": true}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/biogas-data" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/biogas-data/latest" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
{"success": true, "data": {"id": 20512345, "ph_1": 7.2, "gas_value_1": 85.5, "Balloon_1": 61.05, "created_at": "2026-10-01T08:00:00.000000Z"}}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | optional (default: 1) | Page |
| per_page | integer | optional (default: 15) | Rows per page (max 100) |
curl "https://monitoring.xampah.com/api/biogas-data/paginated?page=1&per_page=50" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | date (Y-m-d) | required | Start date (inclusive) |
| end_date | date (Y-m-d) | required | End date (inclusive), not before start_date |
| limit | integer | optional | Max rows |
curl "https://monitoring.xampah.com/api/biogas-data/date-range?start_date=2026-09-01&end_date=2026-09-30" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/biogas-data/stats" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer (path) | required | biogas_data row ID |
curl "https://monitoring.xampah.com/api/biogas-data/{id}" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| Tmp_Icn | number | required | Incinerator temperature (°C) |
| Tmp_Dct | number | required | ICN-2 / ducting temperature (°C) |
| Tmp_Prl | number | required | Chamber/pyrolysis temperature (°C) |
curl -X POST "https://monitoring.xampah.com/api/tempMonitor" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"Tmp_Icn": 712, "Tmp_Dct": 655, "Tmp_Prl": 680}'
{"Tmp_Icn": 712, "Tmp_Dct": 655, "Tmp_Prl": 680}
{"Success": true}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| Tmp_IcnJ1 | number | required | ICN (°C) |
| Tmp_DctJ1 | number | required | Ducting (°C) |
| Tmp_CmbJ1 | number | required | Chamber 1 (°C) |
| Tmp_PrlJ1_1 | number | required | Pyrolysis 1 (°C) |
| Tmp_PrlJ1_2 | number | required | Pyrolysis 2 (°C) |
| Tmp_PrlJ1_3 | number | required | Pyrolysis 3 (°C) |
| Tmp_PrlJ1_4 | number | required | Pyrolysis 4 (°C) |
curl -X POST "https://monitoring.xampah.com/api/tempMonitor2" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"Tmp_IcnJ1":720,"Tmp_DctJ1":640,"Tmp_CmbJ1":690,"Tmp_PrlJ1_1":410,"Tmp_PrlJ1_2":398,"Tmp_PrlJ1_3":380,"Tmp_PrlJ1_4":372}'
{"Tmp_IcnJ1":720,"Tmp_DctJ1":640,"Tmp_CmbJ1":690,"Tmp_PrlJ1_1":410,"Tmp_PrlJ1_2":398,"Tmp_PrlJ1_3":380,"Tmp_PrlJ1_4":372}
{"success": true, "data": {"id": 10512345, "Tmp_IcnJ1": 720, ...}}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
Without start_date/end_date: the latest data by range, at most limit rows. With start_date & end_date: EVERY reading in that range, newest first, paginated; meta holds total & last_page. Maximum range 366 days.
| Parameter | Type | Required | Description |
|---|---|---|---|
| range | today|week|month | optional (default: today) | Realtime mode |
| limit | integer | optional (default: 500) | Realtime mode: max rows (max 1000) |
| start_date | date (Y-m-d) | optional | Range mode: start date |
| end_date | date (Y-m-d) | optional | Range mode: end date |
| page | integer | optional (default: 1) | Range mode: page |
| per_page | integer | optional (default: 100) | Range mode: rows per page (max 500) |
curl "https://monitoring.xampah.com/api/temp-data?start_date=2026-09-25&end_date=2026-10-01&page=1&per_page=100" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
{"success": true, "data": [{"id": 20500123, "Tmp_Icn": 678, "Tmp_Dct": 658, "Tmp_Prl": 671, "created_at": "..."}], "meta": {"page": 1, "per_page": 100, "total": 959, "last_page": 10}}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/temp-data/latest" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer (path) | required | temp_monitors row ID |
curl "https://monitoring.xampah.com/api/temp-data/{id}" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| range | today|week|month | optional (default: today) | Realtime mode |
| limit | integer | optional (default: 500) | Realtime mode: max rows (max 1000) |
| start_date | date (Y-m-d) | optional | Range mode: start date |
| end_date | date (Y-m-d) | optional | Range mode: end date |
| page | integer | optional (default: 1) | Range mode: page |
| per_page | integer | optional (default: 100) | Range mode: rows per page (max 500) |
curl "https://monitoring.xampah.com/api/temp2-data?range=today" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | date (Y-m-d) | required | Start date (inclusive) |
| end_date | date (Y-m-d) | required | End date (inclusive), not before start_date |
| limit | integer | optional (default: 1000) | Max rows (max 5000) |
curl "https://monitoring.xampah.com/api/temp2-data/range?start_date=2026-09-01&end_date=2026-09-07" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/temp2-data/latest" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer (path) | required | temp_monitor2 row ID |
curl "https://monitoring.xampah.com/api/temp2-data/{id}" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
period + date pick the period around that date. today_stats (target, total, per hour) and the 30-day trend follow the chosen date.
| Parameter | Type | Required | Description |
|---|---|---|---|
| period | daily|weekly|monthly|yearly|custom | optional (default: daily) | Period |
| date | date (Y-m-d) | optional (default: today) | Reference date |
| start_date | date | optional | Custom range: start (required together with end_date) |
| end_date | date | optional | Custom range: end |
| limit | integer | optional (default: 100) | Transactions per page (max 1000) |
| page | integer | optional (default: 1) | Page |
| driver_id | integer | optional | Filter by driver |
| customer_id | integer | optional | Filter by customer |
| no_order | string | optional | Search order no. |
| is_completed | boolean | optional | true = already weighed out, false = not yet |
| min_net_weight | number | optional | Minimum net weight |
| max_net_weight | number | optional | Maximum net weight |
| sort_by | created_at|time_in|time_out|weight_in|weight_out | optional (default: created_at) | Sort by |
| sort_direction | asc|desc | optional (default: desc) | Direction |
| target_daily_tons | number | optional (default: 10) | Daily target (tons) |
| use_cache | boolean | optional (default: true) | Use the 30 s cache |
curl "https://monitoring.xampah.com/api/weight/data?period=daily&date=2026-09-30&limit=1000" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/getCustomer" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| date | date (Y-m-d) | optional (default: today) | Date |
curl "https://monitoring.xampah.com/api/scavengers/users?date=2026-09-30" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | integer (path) | required | Staff ID |
| date | date (Y-m-d) | optional (default: today) | Date |
| page | integer | optional | Page |
| limit | integer | optional | Rows per page |
curl "https://monitoring.xampah.com/api/scavengers/users/{user_id}" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer (path) | required | users.id |
curl "https://monitoring.xampah.com/api/scavengers/user/{id}" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/scavengers/weight" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| date | date (Y-m-d) | optional (default: today) | Date |
| user_id | integer | optional | Only this staff member |
curl "https://monitoring.xampah.com/api/scavengers/total-weight" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | date (Y-m-d) | required | Start date (inclusive) |
| end_date | date (Y-m-d) | required | End date (inclusive), not before start_date |
| user_id | integer | optional | Only this staff member |
curl "https://monitoring.xampah.com/api/scavengers/total-weight-range?start_date=2026-09-01&end_date=2026-09-30" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-mlo" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'mlo' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-plastic" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'plastic' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-gabruk" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'gabruk' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-botol-plastik" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'botol_plastik' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-kertas" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'kertas' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-kardus" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'kardus' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-botol-kaca" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'botol_kaca' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-aqua-gelas" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'aqua_gelas' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-incenerator" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'incenerator' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-incenerator2" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'incenerator_2' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-pirolisis" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'pirolisis' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-pirolisis2" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'pirolisis_2' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-bahan-prl" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'bahan_pirolisis' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-icn-today" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'siap_bakar' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-botol-biru" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'botol_biru' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-gelas-polos" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'gelas_polos' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-gelas-warna" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'gelas_warna' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-gelas-polos-bunga" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'gelas_bunga_besar' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-gelas-yakult-kecil" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'gelas_yakult_kecil' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-gelas-yakult-besar" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'gelas_yakult_besar' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-botol-polos-putih" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'botol_polos_putih' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-atom-warna-putih" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'atom_warna_putih' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-gelang-galon" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'gelang_galon' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-tutup" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'tutup' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-tutup-galon-besar" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'tutup_galon_besar' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-impek-regas" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'impek_regas' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-emperan-warna-warni" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'emperan_warna_warni' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-mainan-warna" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'mainan_warna' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-botol-bening-lemes" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'botol_bening_lemes' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-asoy" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'asoy' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-duplex" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'duplex' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-styrofoam" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'styrofoam' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-rdf" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'rdf' berhasil disimpan."}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_id | integer | optional | RFID card ID (scavenger_member_cards.id) = card_id from GET /get-member. Required when user_id is empty; what the sorting scale uses |
| user_id | integer | optional | Staff account ID (users.id). Required when card_id is empty |
| weight | number | required | Weight in kg, ≥ 0 |
curl -X POST "https://monitoring.xampah.com/api/scavengers/save-residu" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"card_id": 7, "weight": 4.35}'
{"card_id": 7, "weight": 4.35}
{"success": true, "message": "Data 'residu' berhasil disimpan."}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
MLO (organic waste material) = (weight_in − weight_out) − Pyrolysis feedstock − Incinerator feedstock (incenerator + incenerator_2) − Gabruk, from config/waste.php. Only trucks that have already weighed out are counted. Default group: ≤31 days daily, ≤186 days weekly, longer monthly. Maximum range 731 days; daily at most 186 days.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | date (Y-m-d) | required | Start date (inclusive) |
| end_date | date (Y-m-d) | required | End date (inclusive), not before start_date |
| group | day|week|month | optional (default: automatic) | Grouping |
curl "https://monitoring.xampah.com/api/recap/waste?start_date=2026-09-01&end_date=2026-09-30&group=day" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
{
"success": true, "start_date": "2026-09-01", "end_date": "2026-09-30", "group": "day",
"formula": {"text": "MLO = (Berat Masuk - Berat Keluar) - Bahan Pirolisis - Bahan Insinerator - Gabruk", "deductions": [...]},
"totals": {"transactions": 486, "completed": 484, "pending": 2, "weight_in": 4872100, "weight_out": 1707600, "net": 3164500,
"deductions": {"bahan_pirolisis": 366559, "bahan_incenerator": 273496, "gabruk": 166327},
"mlo": 2358118, "mlo_scale": 860471, "sorted_total": 1737106.9, "sorted_entries": 217},
"composition": [{"key": "mlo", "label": "MLO (Organik)", "kg": 2358118, "share": 74.5}, ...],
"periods": [{"key": "2026-09-01", "label": "Sel, 1 Sep 2026", "start": "2026-09-01", "end": "2026-09-01", "net": 102200, "mlo": 73119, ...}],
"sorted_by_type": [{"key": "mlo", "label": "MLO (Organik)", "kg": 860471, "share": 49.5}, ...],
"customers": [{"customer_id": 1, "name": "Pasar Kemiri Muka", "transactions": 80, "net": 520000}]
}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | date (Y-m-d) | required | Start date (inclusive) |
| end_date | date (Y-m-d) | required | End date (inclusive), not before start_date |
| status | all|completed|pending | optional (default: all) | Status filter |
| search | string | optional | Order no., customer, driver or licence plate |
| page | integer | optional (default: 1) | Page |
| per_page | integer | optional (default: 25) | Rows per page (max 100) |
curl "https://monitoring.xampah.com/api/recap/waste/transactions?start_date=2026-09-01&end_date=2026-09-30&status=completed&search=Pasar" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | date (Y-m-d) | required | Start date (inclusive) |
| end_date | date (Y-m-d) | required | End date (inclusive), not before start_date |
| search | string | optional | Order no. or staff name |
| page | integer | optional (default: 1) | Page |
| per_page | integer | optional (default: 25) | Rows per page (max 100) |
curl "https://monitoring.xampah.com/api/recap/waste/sorted?start_date=2026-09-30&end_date=2026-09-30" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| uid | string | required | Card UID, e.g. B29BCC4D |
curl "https://monitoring.xampah.com/api/get-member?uid=B29BCC4D" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
{"success": true, "data": {"id": 7, "uid": "B29BCC4D", "name": "Momoh", "role_id": 1}}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| search | string | optional | Search name/UID |
| page | integer | optional | Page |
| per_page | integer | optional | Rows per page |
curl "https://monitoring.xampah.com/api/scavenger-cards" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer (path) | required | Card ID |
curl "https://monitoring.xampah.com/api/scavenger-cards/{id}" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| search | string | optional | Search |
| page | integer | optional | Page |
| per_page | integer | optional | Rows per page |
curl "https://monitoring.xampah.com/api/card-members" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer (path) | required | Card ID |
curl "https://monitoring.xampah.com/api/card-members/{id}" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/getMember" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
A repeated tap within 1 minute is refused (429).
| Parameter | Type | Required | Description |
|---|---|---|---|
| uid | string | required | Card UID |
| operator_name | string | required | Operator name |
| timestamp | datetime | required | Tap time |
curl -X POST "https://monitoring.xampah.com/api/attendance" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"uid": "B29BCC4D", "operator_name": "Momoh", "timestamp": "2026-10-01 07:58:00"}'
{"uid": "B29BCC4D", "operator_name": "Momoh", "timestamp": "2026-10-01 07:58:00"}
{"success": true, "data": {"action": "time_in", ...}}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | date | optional | From |
| end_date | date | optional | Until |
| uid | string | optional | Filter by UID |
| page | integer | optional | Page |
| per_page | integer | optional | Rows per page |
curl "https://monitoring.xampah.com/api/attendance/list" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/attendance/today" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/attendance/present" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | date | optional | From |
| end_date | date | optional | Until |
curl "https://monitoring.xampah.com/api/attendance/stats" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| operator | string | required | Operator name |
| start_date | date | optional | From |
| end_date | date | optional | Until |
| limit | integer | optional | Max rows |
curl "https://monitoring.xampah.com/api/attendance/history?operator=Momoh" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| uid | string (path) | required | Card UID |
| limit | integer | optional | Max rows |
curl "https://monitoring.xampah.com/api/attendance/user/{uid}" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Jatisari API Endpoints
Biogas production monitoring and weight tracking for the Jatisari location
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| ph | float | required | pH of the digester liquid |
| temp_liquid | float | required | Liquid temperature (°C) |
| temp_ambien | float | required | Ambient temperature (°C) |
| weight | float | required | Feed weight (kg) |
| gas_prod | float | required | Gas production (L/h) |
| temp_gas_prod | float | required | Produced gas temperature (°C) |
| pressure_gas_prod | float | required | Produced gas pressure (bar) |
| gas_used | float | required | Gas consumed (L/h) |
| temp_gas_used | float | required | Used gas temperature (°C) |
| pressure_gas_used | float | required | Used gas pressure (bar) |
| balloon_level_1 | float | optional | Balloon 1 level (%) |
| balloon_level_2 | float | optional | Balloon 2 level (%) |
| storage | float | optional | Storage volume (m³) |
curl -X POST "https://monitoring.xampah.com/api/biogas/jatisari/push" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/biogas/jatisari/latest" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| hours | integer | optional (default: 24) | Look-back window in hours |
curl "https://monitoring.xampah.com/api/biogas/jatisari/history" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| days | integer | optional (default: 7) | Number of days to aggregate |
curl "https://monitoring.xampah.com/api/biogas/jatisari/stats" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| weight | float | required | Weight in kg (min: 0.01) |
curl -X POST "https://monitoring.xampah.com/api/weight/push" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/weight/latest" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| hours | integer | optional (default: 24) | Look-back window in hours |
curl "https://monitoring.xampah.com/api/weight/history" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| days | integer | optional (default: 7) | Number of days to aggregate |
curl "https://monitoring.xampah.com/api/weight/stats" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| weight | number | required | Weight (kg), at least 0.01 |
curl -X POST "https://monitoring.xampah.com/api/weight/jatisari/push" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"weight": 152.4}'
{"weight": 152.4}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/weight/jatisari/latest" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| hours | integer | optional (default: 24) | Look-back window (hours) |
| limit | integer | optional | Max rows |
curl "https://monitoring.xampah.com/api/weight/jatisari/history?hours=48" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| days | integer | optional (default: 7) | Number of days |
curl "https://monitoring.xampah.com/api/weight/jatisari/stats" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Indramayu API Endpoints
Biogas production and consumption monitoring for the Indramayu site
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| gas_prod | float | required | Gas production flow rate (L/h) |
| temp_gas_prod | float | required | Temperature at the production point (°C) |
| press_gas_prod | float | required | Pressure at the production point (bar) |
| gas_cons | float | required | Gas consumption flow rate (L/h) |
| temp_gas_cons | float | required | Temperature at the consumption point (°C) |
| press_gas_cons | float | required | Pressure at the consumption point (bar) |
curl -X POST "https://monitoring.xampah.com/api/biogas/indramayu/push" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
curl "https://monitoring.xampah.com/api/biogas/indramayu/latest" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| hours | integer | optional (default: 24) | Look-back window in hours |
| limit | integer | optional (default: 100) | Max rows returned (max 500) |
curl "https://monitoring.xampah.com/api/biogas/indramayu/history" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| days | integer | optional (default: 7) | Number of days to aggregate |
curl "https://monitoring.xampah.com/api/biogas/indramayu/stats" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | date (Y-m-d) | optional | Start date |
| end_date | date (Y-m-d) | optional | End date, not before start_date |
| per_page | integer | optional (default: 15) | Rows per page (max 200) |
| page | integer | optional (default: 1) | Page |
curl "https://monitoring.xampah.com/api/biogas/indramayu/paginated?start_date=2026-09-01&end_date=2026-09-30&per_page=50" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
| Parameter | Type | Required | Description |
|---|---|---|---|
| gas_prod | number | required | Gas produced |
| temp_gas_prod | number | required | Produced gas temperature (°C) |
| press_gas_prod | number | required | Produced gas pressure |
| gas_cons | number | required | Gas used |
| temp_gas_cons | number | required | Used gas temperature (°C) |
| press_gas_cons | number | required | Used gas pressure |
| location | string | optional | Must be "indramayu" when sent |
curl -X POST "https://monitoring.xampah.com/api/biogas/indramayu/push-with-location" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"gas_prod":120.5,"temp_gas_prod":45.2,"press_gas_prod":2.5,"gas_cons":85.3,"temp_gas_cons":42.1,"press_gas_cons":2.1,"location":"indramayu"}'
{"gas_prod":120.5,"temp_gas_prod":45.2,"press_gas_prod":2.5,"gas_cons":85.3,"temp_gas_cons":42.1,"press_gas_cons":2.1,"location":"indramayu"}
JakBar API Endpoints
Reactor telemetry (up to 20 reactors + 16 relays per gateway) and fleet management (OTA firmware rollout, MQTT debug log, remote commands) for the JakBar ESP32 gateways
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
curl -X POST "https://monitoring.xampah.com/api/reactor/jakbar/ingest" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"type":"telemetry","device_id":"gateway-01","fw":"1.3.0", "uptime_ms":3600000,"slot_ts":1788159600, "reactors":[{"id":1,"gas":123.45,"ph":7.21,"lt":35.40,"at":29.10, "dist_mm":620,"balloon":82,"bal_st":1, "health":"ONLINE","gas_health":"NOPOLL","node_health":"ONLINE", "age_s":2,"faults":0}], "relays":[{"n":1,"name":"Pompa Feed 1","on":true,"left_s":1740}]}'
{"type":"telemetry","device_id":"gateway-01","fw":"1.3.0",
"uptime_ms":3600000,"slot_ts":1788159600,
"reactors":[{"id":1,"gas":123.45,"ph":7.21,"lt":35.40,"at":29.10,
"dist_mm":620,"balloon":82,"bal_st":1,
"health":"ONLINE","gas_health":"NOPOLL","node_health":"ONLINE",
"age_s":2,"faults":0}],
"relays":[{"n":1,"name":"Pompa Feed 1","on":true,"left_s":1740}]}
{"success":true,"batch_id":42}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
curl -X POST "https://monitoring.xampah.com/api/reactor/jakbar/ingest" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"type":"event","uptime_ms":812345,"id":7, "event":"NODE_OFFLINE","detail":0}'
{"type":"event","uptime_ms":812345,"id":7,
"event":"NODE_OFFLINE","detail":0}
{"success":true}
Access: X-API-KEY header (scope * — read-only keys are refused with 403).
curl -X POST "https://monitoring.xampah.com/api/reactor/jakbar/ingest" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"type":"balloon","device_id":"gateway-01","fw":"1.4.0", "uptime_ms":3660000,"slot_ts":1788159660, "balloons":[{"id":16,"dist_mm":862,"balloon":58,"bal_st":0,"sol_temp":34.50, "health":"ONLINE","age_s":2,"faults":0}]}'
{"type":"balloon","device_id":"gateway-01","fw":"1.4.0",
"uptime_ms":3660000,"slot_ts":1788159660,
"balloons":[{"id":16,"dist_mm":862,"balloon":58,"bal_st":0,"sol_temp":34.50,
"health":"ONLINE","age_s":2,"faults":0}]}
{"success":true,"count":1}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| device_id | string | optional (default: gateway-01) | Which gateway to read |
curl "https://monitoring.xampah.com/api/reactor/jakbar/balloons/latest" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| reactor_id | integer | required | Balloon node address (16 at JakBar) |
| minutes | integer | optional (default: 60) | Look-back window (max 10080 = 7 days) |
| limit | integer | optional (default: 500) | Max rows (max 2000) |
curl "https://monitoring.xampah.com/api/reactor/jakbar/balloons/history?reactor_id=1" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| device_id | string | optional (default: gateway-01) | Which gateway to read |
curl "https://monitoring.xampah.com/api/reactor/jakbar/latest" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| reactor_id | integer | required | Reactor number (1-20) |
| start_date | date | optional | Y-m-d, needs end_date too |
| end_date | date | optional | Y-m-d, needs start_date too |
| limit | integer | optional (default: 200) | Max rows (max 500) |
curl "https://monitoring.xampah.com/api/reactor/jakbar/history?reactor_id=1" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| event_type | string | optional | Filter to one event type |
| hours | integer | optional (default: 24) | Look-back window (max 720) |
| limit | integer | optional (default: 100) | Max rows (max 500) |
curl "https://monitoring.xampah.com/api/reactor/jakbar/events" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| device_id | string | optional (default: gateway-01) | Which gateway to read |
curl "https://monitoring.xampah.com/api/reactor/jakbar/gas-meters" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
{"success":true,"count":3,"data":[{"addr":3,"role":"CONSUMPTION","reactor":null,"label":null,"health":"ONLINE","valve_code":2,"valve":"open","slot_ts":1793750400,"age_s":3,"volume_l":1200,"volume_m3":1.2,"volume_slot_ts":1793750400}]}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| addr | integer | optional | Meter Modbus address (1-247); this or role |
| role | REACTOR|PRODUCTION_TOTAL|CONSUMPTION | optional | Pick the meter by role when only one has it |
| interval | hour|day|month | optional (default: day) | Bucket size (range max 31 / 366 / 3660 days) |
| start_date | date | optional | Y-m-d, needs end_date too (default last 24 h / 30 days / 12 months) |
| end_date | date | optional | Y-m-d, inclusive |
| device_id | string | optional (default: gateway-01) | Which gateway to read |
curl "https://monitoring.xampah.com/api/reactor/jakbar/gas-meters/usage" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
{"success":true,"meter":{"addr":3,"role":"CONSUMPTION","reactor":null,"label":null},"interval":"day","timezone":"Asia/Jakarta","start":"2026-11-03 00:00:00","end":"2026-11-05 00:00:00","total_usage_l":1330,"total_usage_m3":1.33,"counter_resets":0,"count":2,"data":[{"period":"2026-11-03","start_ts":1793638800,"usage_l":1000,"readings":3,"usage_m3":1}]}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| addr | integer | optional | Meter Modbus address (1-247); this or role |
| role | REACTOR|PRODUCTION_TOTAL|CONSUMPTION | optional | Pick the meter by role when only one has it |
| minutes | integer | optional (default: 60) | Look-back window (max 1440) |
| device_id | string | optional (default: gateway-01) | Which gateway to read |
curl "https://monitoring.xampah.com/api/reactor/jakbar/gas-meters/minutes" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
{"success":true,"meter":{"addr":3,"role":"CONSUMPTION","reactor":null,"label":null},"minutes":60,"total_used_l":84,"count":60,"data":[{"slot_ts":1793858400,"volume_l":32890,"used_l":2,"flow_l_min":2,"valve_code":2,"health":"ONLINE"}]}
Access: X-API-KEY header with the read or * scope, or Authorization: Bearer token from POST /login.
| Parameter | Type | Required | Description |
|---|---|---|---|
| addr | integer | optional | Meter Modbus address (1-247); this or role |
| role | REACTOR|PRODUCTION_TOTAL|CONSUMPTION | optional | Pick the meter by role when only one has it |
| interval | day|month | optional (default: day) | Running total per day or per month |
| device_id | string | optional (default: gateway-01) | Which gateway to read |
curl "https://monitoring.xampah.com/api/reactor/jakbar/gas-meters/cumulative?role=PRODUCTION_TOTAL&interval=month" \
-H "Accept: application/json" \
-H "X-API-KEY: sk_xxxxxxxx"
{"success":true,"meter":{"addr":2,"role":"PRODUCTION_TOTAL","reactor":null,"label":null},"interval":"month","timezone":"Asia/Jakarta","first_reading_at":"2026-09-30 01:00:00","last_reading_at":"2026-11-09 21:30:00","lifetime_l":98120,"lifetime_m3":98.12,"this_month_l":32218,"this_month_m3":32.218,"today_l":3105,"today_m3":3.105,"counter_resets":0,"count":3,"data":[{"period":"2026-09","usage_l":400,"usage_m3":0.4,"cumulative_l":400,"cumulative_m3":0.4},{"period":"2026-10","usage_l":65502,"usage_m3":65.502,"cumulative_l":65902,"cumulative_m3":65.902},{"period":"2026-11","usage_l":32218,"usage_m3":32.218,"cumulative_l":98120,"cumulative_m3":98.12}]}
# Check the server (public)
curl https://monitoring.xampah.com/api/ping
# Read data: X-API-KEY (read scope)
curl -H "X-API-KEY: sk_xxxxxxxx" "https://monitoring.xampah.com/api/biogas-data/latest"
# Waste recap for September (Depok)
curl -H "X-API-KEY: sk_xxxxxxxx" "https://monitoring.xampah.com/api/recap/waste?start_date=2026-09-01&end_date=2026-09-30"
# Or with the admin dashboard login
TOKEN=$(curl -s -X POST https://monitoring.xampah.com/api/login -H "Content-Type: application/json" \
-d '{"username":"admin","password":"..."}' | jq -r .data.token)
curl -H "Authorization: Bearer $TOKEN" https://monitoring.xampah.com/api/getCustomer
# Send data from a device: device X-API-KEY
curl -X POST https://monitoring.xampah.com/api/reactor/jakbar/ingest \
-H "Content-Type: application/json" -H "X-API-KEY: sk_xxxxxxxx" \
-d '{"type":"telemetry","device_id":"gateway-01","reactors":[{"id":1,"gas":123.45,"ph":7.21,"lt":35.4,"at":29.1}]}'