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
Parameter | Possible parameter | Possible values | Addition | Register sensibility |
---|---|---|---|---|
startDate / endDate | startDate / endDate | Parameters work only in pairs. Setting both start and end of time period is necessary. | ✘ | |
from / to | from / to | 2025-03-14T14:00:00 2025-03-14 14:00:00 | Parameters work only in pairs. Setting both start and end of time period is necessary. | ✘ |
timeZone | timeZone | 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_id | project_id | 00112233-4455-6677-8899-aabbccddeeff | It's allowed to pass only 1 value. | ✘ |
sensorId | 00112233-4455-6677-8899-aabbccddeeff | It's allowed to pass more than 1 value. Values are divided by comma with no gaps. | ✘ | |
sensorName | example | It'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 parameter | Response data type | Parameter definition |
---|---|---|
time_zone | string | Timezone from user profile |
message_id | string (format: uuid) | Message unique identifier |
message_data | array | Message body |
protocol_version | string | API version |
sensors | array | array of selected sensors' data |
range_end | string (format: date-time) | The end of time interval |
range_start | string (format: date-time) | The start of time interval |
name | string | Sensor name |
status/statuses | array | Array of sensor status data |
sensor_id | string (format: uuid) | Sensor unique identifier |
current_status_code | whole number | Sensor status code at transmission time |
current_status_list | string | Sensor status list at transmission time |
status_code | whole number | Sensor status code by selected time interval |
status_list | array of strings | The list of sensor status by selected time interval |
status_duration | string | Time interval duration of given status |
status_duration_percent | string | Time interval duration of given status, percent |
List of received codes/statuses
Status/code | Description |
---|---|
0 | Sensor is not working |
1 | Sensor is working |
ACTIVE | Sensor is participating in survey. Status sets while configuring adapter in multiadapter.json file, parameter SENSORS[].active |
BLIND | Sensor is blind due to snow or ice build-ups on the antenna. It also may occur by nearby standing objects |
BOOTLOADER_MODE | During bootloader mode, sensor won't send objects or PVR |
CONNECTED | Adapter is successfully connected to the sensor but hasn't started sharing data with the System yet |
CONNECTING | Adapter is trying to connect to the sensor |
CONNECTION_ERROR | Error occurred during connection process |
DEAD_ADAPTER | Adapter doesn't share any vehicle data for a certain period of time (2 minutes by default) |
EXTENDED_MODE | Sensor is working in extended mode, the adapter is receiving sensor's data. For users this is pretty similar to the ACTIVE status |
HARDWARE_ERROR | Sensor's hardware error occurred. This may negatively affect the sensor workability |
INTERFERENCE | Interference 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 DATA | No data found in database for selected period of time |
NO_PVR | The sensor doesn't share vehicle data for a certain period of time (10 minutes by default) |
RAIN | Rain has been detected. This may negatively affect the sensor workability |
READING | Receiving data from the sensor |
TIMEOUT | Adapter 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) |