Zum Inhalt springen
GET /v1/fill

Volume & % full at a depth

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/tank-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

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

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "note": "Filled volume at the given depth. Horizontal cylinders and spheres use the exact circular-segment / spherical-cap formulas.",
        "input": {
            "unit": "m",
            "depth": 1,
            "shape": "horizontalcylinder",
            "length": 5,
            "radius": 1
        },
        "filled": {
            "m3": 7.85398,
            "litres": 7853.98,
            "us_gallons": 2074.8
        },
        "capacity": {
            "m3": 15.70796,
            "litres": 15707.96,
            "us_gallons": 4149.6
        },
        "remaining": {
            "m3": 7.85398,
            "litres": 7853.98,
            "us_gallons": 2074.8
        },
        "percent_full": 50
    },
    "meta": {
        "timestamp": "2026-06-03T17:41:57.364Z",
        "request_id": "306a4a6f-72c9-451b-ae1c-bc0d9fa1e9be"
    },
    "status": "ok",
    "message": "Filled volume at depth",
    "success": true
}