Skip to main content

Sensor data

This method returns a list of selected sensor's main settings

Request example:

<url_smartroad>/api/<version>/sensors?login=<login>&password=<password>&sensor_id=<sensor_id>

Extra request parameters

ParameterPossible parameterPossible valuesAdditionRegister sensibility
project_idproject_id00112233-4455-6677-8899-aabbccddeeffIt's allowed to pass only 1 value.
sensorId
  • sensorId
  • sensorID
  • sensor_id
  • 00112233-4455-6677-8899-aabbccddeeffIt's allowed to pass more than 1 value. Values are divided by comma with no gaps.
    sensorName
  • sensorName
  • name
  • exampleIt's allowed to pass more than 1 value. When adding multiple sensors in request, it's important for sensors to be from the same project, otherwise request response will be 400 Bad Request.

    Data schema

    By receiving a correct request, the System generates a response message in JSON format.

    Response example:

    {
    "sensor_id": "67052a06-1075-4576-a328-598e2ef550d5",
    "name": "Олимпийский Т-35",
    "ip": "178.176.55.216",
    "place_name": "Олимпийский Т-35",
    "picket_name": "0+000",
    "gps_latitude": 55.779055,
    "gps_longitude": 37.622355,
    "gps_latitude_x": 55.7815,
    "gps_longitude_x": 37.62362,
    "serial_number": "30054691950",
    "lanes_count": 2,
    "lanes": [
    {
    "lane_index": 0,
    "lane_width": 3.8,
    "lane_direction_sensor": -1,
    "lane_direction_zkm": 0,
    "zones": [
    {
    "zone_index": 0,
    "zone_width": 3.8,
    "zone_direction_sensor": -1,
    "zone_classes": 15,
    "zone_segments_count": 2,
    "zone_segments": [
    {
    "x": 60.00,
    "y": 4.00,
    "index": 0
    },
    {
    "x": 60.00,
    "y": 4.00,
    "index": 1
    }
    ]
    }
    ]
    },
    {
    "lane_index": 1,
    "lane_width": 3.8,
    "lane_direction_sensor": 1,
    "lane_direction_zkm": 1,
    "zones": [
    {
    "zone_index": 3,
    "zone_width": 3.8,
    "zone_direction_sensor": 1,
    "zone_classes": 15,
    "zone_segments_count": 2,
    "zone_segments": [
    {
    "x": 100.00,
    "y": 4.00,
    "index": 0
    },
    {
    "x": 100.00,
    "y": 4.00,
    "index": 1
    }
    ]
    }
    ]
    }
    ]
    }

    sensors Json response data schema

    Response parameterResponse data typeParameter definition
    sensor_idstring (format: uuid)Sensor unique identifier
    namestringSensor name
    ipstringSensor IP-address
    place_namestringInstallation site geographical name
    picket_namestringPicket name
    gps_latitudenumberLatitude
    gps_longitudenumberLongitude
    gps_latitude_xnumberPoint latitude by Х
    gps_longitude_xnumberPoint longitude by X
    serial_numberstringSensor serial number
    lanes_countwhole numberLane amount
    lanesarraySensor lanes parameters
    lane_indexwhole numberLane index
    lane_widthnumberLane width
    lane_direction_sensorwhole numberLane direction by sensor
    lane_direction_zkmwhole numberLane direction from 0 kilometer
    zonesarraySensor zones parameters
    zone_indexwhole numberZone index
    zone_widthnumberZone width
    zone_direction_sensorwhole numberZone direction by sensor
    zone_segments_countwhole numberSegment amount
    zone_segmentsarrayZone segments parameters