Skip to main content

Status

This method returns selected sensor status

Request example:

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

Extra request parameters

ParameterPossible parameterPossible valuesAdditionRegister sensibility
startDate /
endDate
startDate /
endDate
  • 14.03.2025 13:00 / 14.03.2025 14:00
  • It's allowed to pass time with an accuracy of seconds, minutes or hours.
Parameters work only in pairs. Setting both start and end of time period is necessary.
from / tofrom / to
  • 2025-03-14T13:00:00 /
    2025-03-14T14:00:00
  • 2025-03-14 13:00:00 /
    2025-03-14 14:00:00
  • It's allowed to pass time with an accuracy of seconds, minutes or hours.
Parameters work only in pairs. Setting both start and end of time period is necessary.
timeZonetimeZone
  • default: Europe/Moscow
  • UTC
  • Chile/Continental
  • America/Indiana/Knox
As values, it's possible to use the full name of time zone or time zone abbreviations. It's allowed to pass only 1 value.
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.

The first variant will be received only when a user sent a request without time interval parameters. The second variant will be received for each request containing parameters of time period's start and end.

Response example:

[
{
"name": "144.A4.DT1",
"sensor_id": "3a9d31ae-4d9e-469e-99af-a2dca1a333d8",
"status": {
"sensor_id": "3a9d31ae-4d9e-469e-99af-a2dca1a333d8",
"current_status_code": 1,
"current_status_list": "ACTIVE, CONNECTED, READING"
}
}
]
{
"time_zone": "Europe/Moscow",
"message_id": "b12eb929-e270-3fe3-5900-1a0dbcdb641e",
"message_data": {
"sensors": [
{
"name": "144.A4.DT1",
"statuses": [
{
"status_code": 1,
"status_list": [
"ACTIVE",
"CONNECTED",
"READING"
],
"status_duration": "0000-00-00 03:00:00",
"status_duration_percent": 100.00
}
],
"sensor_id": "3a9d31ae-4d9e-469e-99af-a2dca1a333d8"
}
],
"range_end": "2025-03-06T16:00:00+03:00",
"range_start": "2025-03-06T13:00:00+03:00"
},
"protocol_version": "1.0"
}

status Json response data schema

Response parameterResponse data typeParameter definition
time_zonestringTimezone from user profile
message_idstring (format: uuid)Message unique identifier
message_dataarrayMessage body
protocol_versionstringAPI version
sensorsarrayarray of selected sensors' data
range_endstring (format: date-time)The end of time interval
range_startstring (format: date-time)The start of time interval
namestringSensor name
status/statusesarrayArray of sensor status data
sensor_idstring (format: uuid)Sensor unique identifier
current_status_codewhole numberSensor status code at transmission time
current_status_liststringSensor status list at transmission time
status_codewhole numberSensor status code by selected time interval
status_listarray of stringsThe list of sensor status by selected time interval
status_durationstringTime interval duration of given status
status_duration_percentstringTime interval duration of given status, percent

List of received codes/statuses

Status/codeDescription
0Sensor is not working
1Sensor is working
ACTIVESensor is participating in survey. Status sets while configuring adapter in multiadapter.json file, parameter SENSORS[].active
BLINDSensor is blind due to snow or ice build-ups on the antenna. It also may occur by nearby standing objects
BOOTLOADER_MODEDuring bootloader mode, sensor won't send objects or PVR
CONNECTEDAdapter is successfully connected to the sensor but hasn't started sharing data with the System yet
CONNECTINGAdapter is trying to connect to the sensor
CONNECTION_ERRORError occurred during connection process
DEAD_ADAPTERAdapter doesn't share any vehicle data for a certain period of time (2 minutes by default)
EXTENDED_MODESensor is working in extended mode, the adapter is receiving sensor's data. For users this is pretty similar to the ACTIVE status
HARDWARE_ERRORSensor's hardware error occurred. This may negatively affect the sensor workability
INTERFERENCEInterference was detected on the frequency channel of the sensor, affecting the detection of objects (usually, interference occurs due to the signal of another sensor located or installed nearby)
NO DATANo data found in database for selected period of time
NO_PVRThe sensor doesn't share vehicle data for a certain period of time (10 minutes by default)
RAINRain has been detected. This may negatively affect the sensor workability
READINGReceiving data from the sensor
TIMEOUTAdapter to sensor connection time was expired. The connection time length sets while configuring adapter in multiadapter.json file, parameter SENSORS[].timeout (100 ms by default)