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/<klienta_atslega>/trafficjam?

Noklusētais atgriezto datu formāts ir JSON.

HTTP metode ir GET.

  • klienta_atslega: klienta atslēga, kura tika Jums piešķirta.

Pieprasījuma parametri

Iespējams padot sekojošus GET parametrus:

Parametrs Skaidrojums
cs koordinātu formāts (wgs84 vai lks)

Atbildes parametri

Atbildē tiek atgriezti sastrēgumi GeoJSON formātā.

{
  "type": "Feature",
  "geometry": {
    "type": "LineString",
    "coordinates": [
      [
        24.141023,
        56.946954
      ],
      [
        24.14071,
        56.946955
      ],
      ...
    ]
  },
  "properties": {
    "width": 3,
    "r": 192,
    "g": 192,
    "b": 192,
    "opacity": 90,
    "name": "Valmieras iela (Ģertrūdes – Lāčplēša)",
    "auto_count": "0",
    "normal_drive_time": "76",
    "drive_time": "0",
    "date": "2019-05-27 17:37:37",
    "level": 0,
    "line_id": "399",
    "last_drive_time": "0",
    "info": [
      {
        "id": "name",
        "value": "Valmieras iela (Ģertrūdes – Lāčplēša)"
      },
      {
        "id": "drive_time",
        "value": "0"
      },
      {
        "id": "last_drive_time",
        "value": "0"
      },
      {
        "id": "level",
        "value": 0
      },
      {
        "id": "normal_drive_time",
        "value": "76"
      },
      {
        "id": "date",
        "value": "2019-05-27 17:37:37"
      }
    ]
  }
}