| lang | string Validation default: en | required |
| user_api_hash | string Validation default: $2y$10$5RACGMNxUdz3h1ug9yAttu95U2acugM0YG1K5wx01ZrNMvpL6BWMS | required |
| device_id | integer | required |
Sensor
GET
/add_sensor_data
Definition
Query String
Responses application/json
| object | ||
| sensors |
object
Validation
{sensorTypes} |
optional |
| key | string | optional |
| device_id | integer | optional |
| route | string | optional |
| status | integer | optional |
{
"sensors": {
"acc": "ACC ON/OFF",
"battery": "Battery",
"door": "Door Open/Close",
"engine": "Engine ON/OFF",
"engine_hours": "Engine hours",
"fuel_tank": "Fuel tank",
"fuel_tank_calibration": "Fuel tank (with calibration)",
"gsm": "GSM",
"harsh_acceleration": "Harsh acceleration ",
"harsh_breaking": "Harsh breaking",
"ignition": "Ignition ON/OFF",
"odometer": "Odometer",
"satellites": "Satellites",
"tachometer": "Tachometer",
"temperature": "Temperature"
},
"device_id": 1,
"route": "sensors.store",
"status": 1
}
| object | ||
| status | integer | optional |
| errors | object | optional |
{
"status": 0,
"errors": {}
}
| object | ||
| status | integer | optional |
| error | string | optional |
{
"status": 0,
"error": "No language selected."
}
POST
/add_sensor
The fields depends on the sensor type, which can see the web version.
Definition
Query String
| lang | string Validation default: en | required |
| user_api_hash | string Validation default: $2y$10$5RACGMNxUdz3h1ug9yAttu95U2acugM0YG1K5wx01ZrNMvpL6BWMS | required |
| device_id | integer | required |
Request Body multipart/form-data
|
object
Validation
{sensorPost} |
||
| device_id | integer | required |
| sensor_type | string | required |
| sensor_name | string | required |
| unit_of_measurement | string | required |
| show_in_popup | integer | optional |
| tag_name | string | optional |
| shown_value_by | string | optional |
| min_value | string | optional |
| max_value | string | optional |
| formula | string | optional |
| odometer_value_by | string | optional |
| odometer_value | string | optional |
| calibrations | array[object] | optional |
| key | integer | optional |
| on_value | string | optional |
| off_value | string | optional |
GET
/edit_sensor_data
Definition
Query String
| lang | string Validation default: en | required |
| user_api_hash | string Validation default: $2y$10$5RACGMNxUdz3h1ug9yAttu95U2acugM0YG1K5wx01ZrNMvpL6BWMS | required |
| sensor_id | integer | required |
Responses application/json
| object | ||
| sensors |
object
Validation
{sensorTypes} |
optional |
| key | string | optional |
| device_id | integer string | optional |
| item |
object
Validation
{Sensor} |
optional |
| id | integer string | optional |
| user_id | integer string | optional |
| device_id | integer string | optional |
| name | string | optional |
| type | string | optional |
| tag_name | string | optional |
| add_to_history | integer string | optional |
| on_value | string | optional |
| off_value | string | optional |
| shown_value_by | null string | optional |
| fuel_tank_name | null string | optional |
| full_tank | null string | optional |
| full_tank_value | null string | optional |
| min_value | null string | optional |
| max_value | null string | optional |
| formula | null string | optional |
| odometer_value_by | null string | optional |
| odometer_value | null string | optional |
| odometer_value_unit | string | optional |
| temperature_max | null string | optional |
| temperature_max_value | null string | optional |
| temperature_min | null string | optional |
| temperature_min_value | null string | optional |
| value | string | optional |
| value_formula | string | optional |
| show_in_popup | string | optional |
| unit_of_measurement | string | optional |
| on_tag_value | null string | optional |
| off_tag_value | null string | optional |
| on_type | null string | optional |
| off_type | null string | optional |
| calibrations | null array[object] | optional |
| key | integer | optional |
| route | string | optional |
| status | integer string | optional |
{
"sensors": {
"acc": "ACC ON/OFF",
"battery": "Battery",
"door": "Door Open/Close",
"engine": "Engine ON/OFF",
"engine_hours": "Engine hours",
"fuel_tank": "Fuel tank",
"fuel_tank_calibration": "Fuel tank (with calibration)",
"gsm": "GSM",
"harsh_acceleration": "Harsh acceleration ",
"harsh_breaking": "Harsh breaking",
"ignition": "Ignition ON/OFF",
"odometer": "Odometer",
"satellites": "Satellites",
"tachometer": "Tachometer",
"temperature": "Temperature"
},
"device_id": "3",
"item": {
"id": "2",
"user_id": "2",
"device_id": "3",
"name": "test acc",
"type": "acc",
"tag_name": "tag",
"add_to_history": "0",
"on_value": "on",
"off_value": "off",
"shown_value_by": null,
"fuel_tank_name": null,
"full_tank": null,
"full_tank_value": null,
"min_value": null,
"max_value": null,
"formula": null,
"odometer_value_by": null,
"odometer_value": null,
"odometer_value_unit": "km",
"temperature_max": null,
"temperature_max_value": null,
"temperature_min": null,
"temperature_min_value": null,
"value": "-",
"value_formula": "0",
"show_in_popup": "1",
"unit_of_measurement": "nn",
"on_tag_value": null,
"off_tag_value": null,
"on_type": null,
"off_type": null,
"calibrations": null
},
"route": "sensors.update",
"status": 1
}
| object | ||
| status | integer | optional |
| errors | object | optional |
{
"status": 0,
"errors": {}
}
| object | ||
| status | integer | optional |
| error | string | optional |
{
"status": 0,
"error": "No language selected."
}
POST
/edit_sensor
Definition
Query String
| lang | string Validation default: en | required |
| user_api_hash | string Validation default: $2y$10$5RACGMNxUdz3h1ug9yAttu95U2acugM0YG1K5wx01ZrNMvpL6BWMS | required |
| sensor_id | integer | required |
Request Body application/json
|
object
Validation
{sensorPost} |
||
| device_id | integer | required |
| sensor_type | string | required |
| sensor_name | string | required |
| unit_of_measurement | string | required |
| show_in_popup | integer | optional |
| tag_name | string | optional |
| shown_value_by | string | optional |
| min_value | string | optional |
| max_value | string | optional |
| formula | string | optional |
| odometer_value_by | string | optional |
| odometer_value | string | optional |
| calibrations | array[object] | optional |
| key | integer | optional |
| on_value | string | optional |
| off_value | string | optional |
GET
/destroy_sensor
Definition
Query String
| lang | string Validation default: en | required |
| user_api_hash | string Validation default: $2y$10$5RACGMNxUdz3h1ug9yAttu95U2acugM0YG1K5wx01ZrNMvpL6BWMS | required |
| sensor_id | integer | required |
MODEL
sensorPost
| object | ||
| device_id | integer | required |
| sensor_type | string | required |
| sensor_name | string | required |
| unit_of_measurement | string | required |
| show_in_popup | integer | optional |
| tag_name | string | optional |
| shown_value_by | string | optional |
| min_value | string | optional |
| max_value | string | optional |
| formula | string | optional |
| odometer_value_by | string | optional |
| odometer_value | string | |
| calibrations | array[object] | optional |
| key | integer | optional |
| on_value | string | optional |
| off_value | string | optional |
MODEL
sensorTypes
| object | ||
| key | string | optional |
{
"acc": "ACC ON/OFF",
"battery": "Battery",
"door": "Door Open/Close",
"engine": "Engine ON/OFF",
"engine_hours": "Engine hours",
"fuel_tank": "Fuel tank",
"fuel_tank_calibration": "Fuel tank (with calibration)",
"gsm": "GSM",
"harsh_acceleration": "Harsh acceleration ",
"harsh_breaking": "Harsh breaking",
"ignition": "Ignition ON/OFF",
"odometer": "Odometer",
"satellites": "Satellites",
"tachometer": "Tachometer",
"temperature": "Temperature"
}
MODEL
Sensor
| object | ||
| id | integer string | optional |
| user_id | integer string | optional |
| device_id | integer string | optional |
| name | string | optional |
| type | string | optional |
| tag_name | string | optional |
| add_to_history | integer string | optional |
| on_value | string | optional |
| off_value | string | optional |
| shown_value_by | null string | optional |
| fuel_tank_name | null string | optional |
| full_tank | null string | optional |
| full_tank_value | null string | optional |
| min_value | null string | optional |
| max_value | null string | optional |
| formula | null string | optional |
| odometer_value_by | null string | optional |
| odometer_value | null string | optional |
| odometer_value_unit | string | optional |
| temperature_max | null string | optional |
| temperature_max_value | null string | optional |
| temperature_min | null string | optional |
| temperature_min_value | null string | optional |
| value | string | optional |
| value_formula | string | optional |
| show_in_popup | string | optional |
| unit_of_measurement | string | optional |
| on_tag_value | null string | optional |
| off_tag_value | null string | optional |
| on_type | null string | optional |
| off_type | null string | optional |
| calibrations | null array[object] | optional |
| key | integer | optional |
{
"id": "2",
"user_id": "2",
"device_id": "3",
"name": "test acc",
"type": "acc",
"tag_name": "tag",
"add_to_history": "0",
"on_value": "on",
"off_value": "off",
"shown_value_by": null,
"fuel_tank_name": null,
"full_tank": null,
"full_tank_value": null,
"min_value": null,
"max_value": null,
"formula": null,
"odometer_value_by": null,
"odometer_value": null,
"odometer_value_unit": "km",
"temperature_max": null,
"temperature_max_value": null,
"temperature_min": null,
"temperature_min_value": null,
"value": "-",
"value_formula": "0",
"show_in_popup": "1",
"unit_of_measurement": "nn",
"on_tag_value": null,
"off_tag_value": null,
"on_type": null,
"off_type": null,
"calibrations": null
}
© TeraTrack. All Rights Reserved