/v1/moisture
Water for a target moisture
Live testen
10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.
Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.
API-Key holenCode-Snippets
curl "https://api.oanor.com/compost-api/v1/moisture" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/compost-api/v1/moisture", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/compost-api/v1/moisture");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/compost-api/v1/moisture",
headers={"x-oanor-key": "oanor_test_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.
{
"data": {
"note": "A compost pile wants ~50–60 % moisture — damp like a wrung-out sponge. Water to add = dry mass ÷ (1 − target) − current mass, holding the dry matter constant. A negative result means it is too wet; turn it and mix in dry browns. Same unit in and out (kg or lb).",
"inputs": {
"mass": 100,
"target_moisture_pct": 55,
"current_moisture_pct": 30
},
"dry_mass": 70,
"direction": "add water",
"water_to_add": 55.56,
"new_total_mass": 155.56
},
"meta": {
"timestamp": "2026-06-06T15:30:45.955Z",
"request_id": "34aee6a9-954d-4cfb-8b51-449bfdcc8c0e"
},
"status": "ok",
"message": "Moisture",
"success": true
}