Սահմանի եղանակային պայմանների API Offline
Ճանապարհային վտանգը անցակետում մեկ 0–5 սանդղակով՝ մաքուր ճանապարհ, մառախուղ, ձյուն, անձրև, մերկասառույց կամ ուժեղ քամի — ձեր լեզվով, վտանգի աստիճանով, տվյալի տարիքով և աղբյուրով՝ վարորդ կամ մեր մոդելը։
GET https://nakordoni.eu/api/v1/data/weather
— քվոտայի դաս: cheap
| Պարամետր | Նկարագրություն |
|---|---|
ppid | Հսկիչ կետի ID, օրինակ id_13 (տես /api/v1/data/checkpoints) |
lang | Պայմանի և վտանգի աստիճանի անվանումների լեզուն (25 լեզու; լռելյայն en) |
sources | all (լռելյայն) | community — միայն վարորդների հաղորդումները | model — միայն մեր դասակարգումը |
max_age_minutes | Դեռ հաշվի առնվող տվյալի առավելագույն տարիքը (լռելյայն 180, նվազ. 15, առավ. 1440 րոպե) |
Պատասխանի դաշտերը — պատասխանի ծրարի data օբյեկտի ներսում։ []-ը ցույց է տալիս ցուցակ, ուստի data.items[].name-ը յուրաքանչյուր տարրի name դաշտն է։ Դաշտը լինում է null, բացակայում է կամ դատարկ ցուցակ է, երբ արժեք չունենք․ լցոնող արժեք երբեք չենք դնում։
| Դաշտ | Նկարագրություն |
|---|---|
data.condition.code | The marker, 0..5, with key the stable machine name (good, fog, snow, rain, ice, wind) and name the same thing in the requested language, worded for a driver ("Slippery!", not "freezing precipitation"). null when nothing was reported inside the window — see data.no_data. |
data.condition.severity | none | low | moderate | major, the same severity vocabulary road-conditions uses, with severity_name in the requested language. |
data.condition.severity_rank | Danger order when you sort several checkpoints: 1 ice, 2 fog, 3 snow, 4 rain, 5 wind, 6 clear. Lower is worse — the codes themselves are NOT an order. |
data.condition.hazard | true for anything but a clear road, so a client can gate an alert on one field. |
data.observed_at | When the marker was written (Europe/Kyiv), with observed_ts as a Unix timestamp. |
data.data_age_minutes | Age of that marker in minutes, with is_fresh true when it is under 3 hours old. Read it before treating the answer as current. |
data.source_type | community when a driver reported it, model when our weather model classified it. null when there is no marker. |
data.no_data | true when no marker exists for this checkpoint inside the window — an honest gap, not a clear road. Widen max_age_minutes or drop the sources filter. |
data.scale | The whole 0..5 vocabulary as an array indexed by code, so you can label a value without hardcoding our wording. |
data.sources | The filters actually applied, with window_minutes — both echoed back after clamping. |
curl "https://nakordoni.eu/api/v1/data/weather?ppid=id_13&lang=en" \ -H "Authorization: Bearer NKD-DEV-XXXX-XXXX-XXXX"
🔑 Մուտք գործեք որպես ծրագրավորող՝ այս endpoint-ը ուղիղ Sandbox-ում փորձելու համար — օրական 50 անվճար թեստային կանչ։ Մուտք