Sastrēgumu serviss
Serviss ļauj iegūt informāciju par sastrēgumiem.
Servisa URL
Servisa saitei jāatbilst šādai formai:
https://api.kartes.lv/v3//trafficjam?
Noklusētais atgriezto datu formāts ir JSON.
HTTP metode ir GET.
Atbilde
Atbildē tiek atgriezti sastrēgumi GeoJSON formātā.
{
"type": "Feature",
"properties": {
"width": 3,
"r": 200,
"g": 255,
"b": 30,
"opacity": 90,
"name": "Pērkona iela (Rīgas – Viestura)",
"auto_count": 3,
"normal_drive_time": 65,
"drive_time": 68,
"date": "2024-05-29 17:15:52",
"level": 2,
"line_id": "",
"last_drive_time": null,
"drive_time_diff": 3,
"info": [
{
"id": "name",
"value": "Pērkona iela (Rīgas – Viestura)"
},
{
"id": "drive_time",
"value": 68
},
{
"id": "drive_time_diff",
"value": 3
},
{
"id": "last_drive_time",
"value": null
},
{
"id": "level",
"value": 2
},
{
"id": "normal_drive_time",
"value": 65
},
{
"id": "date",
"value": "2024-05-29 17:15:52"
}
]
},
"geometry": {
"type": "LineString",
"coordinates": [
[
23.851476425,
56.975837196
],
[
23.852984163,
56.975772535
],
...
]
}
}
Kļūdu kodi
Kods | Skaidrojums |
---|---|
200 | Wrong input data. Tiek atgriezts, ja vaicājumā nav ievadīti vai nav korekti ievadīti pieprasījuma parametri. |
404 | No location found. Tiek atgriezts, ja nekas nav ticis atrasts. |
5xx | Servera kļūda. |