Vai al contenuto
GET /v1/level

Dipstick depth for a target

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/tank-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/tank-api/v1/level" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/tank-api/v1/level", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/tank-api/v1/level");
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/tank-api/v1/level",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "note": "Dipstick depth for the target fill, found by bisection (exact for the linear shapes).",
        "depth": 1.404,
        "input": {
            "unit": "m",
            "shape": "horizontalcylinder",
            "length": 5,
            "radius": 1
        },
        "target": {
            "m3": 11.78097,
            "litres": 11780.97,
            "us_gallons": 3112.2
        },
        "depth_m": 1.40397,
        "depth_unit": "m",
        "percent_full": 75
    },
    "meta": {
        "timestamp": "2026-06-03T17:41:57.470Z",
        "request_id": "3eef9a21-bdeb-42e5-b6ba-33525c8f24ab"
    },
    "status": "ok",
    "message": "Dipstick depth for target",
    "success": true
}