Skip to content
GET /v1/rectangular

Rectangular weir

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/weir-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

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

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "note": "Q = (2/3)·Cd·b·√(2g)·H^1.5. Sharp-crested suppressed weir; Cd≈0.62.",
        "type": "rectangular",
        "head_m": 0.3,
        "inputs": {
            "gravity": 9.81,
            "crest_width": 2,
            "discharge_coefficient": 0.62
        },
        "solved_for": null,
        "discharge_l_s": 601.67478,
        "discharge_m3_s": 0.60167478
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:27.998Z",
        "request_id": "d5c18d04-70d5-479d-9471-8a21cb356b6a"
    },
    "status": "ok",
    "message": "Rectangular weir",
    "success": true
}