sensors
Sensors definition management
create_sensor
Creates (adds) a new sensor given sensor information.
Source code
POST
Parameters of this method are described below
Property name | Description | Data type | Required |
---|---|---|---|
full_sensor_name | Full sensor name | string |
Request body
Description | Data type | Required |
---|---|---|
Dictionary of sensor definitions | SensorModel |
Usage examples
curl -X POST http://localhost:8888/api/sensors/sample_target/sample_category/sample_sensor^
-H "Accept: application/json"^
-H "Content-Type: application/json"^
-d^
"{\"full_sensor_name\":\"sample_target/sample_category/sample_sensor\",\"sensor_definition_spec\":{\"fields\":[{\"field_name\":\"sample_string_param\",\"data_type\":\"string\"},{\"field_name\":\"sample_double_param\",\"data_type\":\"double\"}],\"default_value\":0.0},\"provider_sensor_list\":[],\"custom\":false,\"built_in\":false,\"can_edit\":true}"
delete_sensor
Deletes a custom sensor definition
Source code
DELETE
Parameters of this method are described below
Property name | Description | Data type | Required |
---|---|---|---|
full_sensor_name | Full sensor name | string |
Usage examples
get_all_sensors
Returns a flat list of all sensors available in DQOps, both built-in sensors and user defined or customized sensors.
Source code
GET
Return value
Property name | Description | Data type |
---|---|---|
sensor_list_model | List[SensorListModel] |
Usage examples
get_sensor
Returns a sensor model
Source code
GET
Return value
Property name | Description | Data type |
---|---|---|
sensor_model | SensorModel |
Parameters of this method are described below
Property name | Description | Data type | Required |
---|---|---|---|
full_sensor_name | Full sensor name | string |
Usage examples
get_sensor_folder_tree
Returns a tree of all sensors available in DQOps, both built-in sensors and user defined or customized sensors.
Source code
GET
Return value
Property name | Description | Data type |
---|---|---|
sensor_folder_model | SensorFolderModel |
Usage examples
update_sensor
Updates an existing sensor, making a custom sensor definition if it is not present.
Removes sensor if custom definition is same as Dqo Home sensor
Source code
PUT
Parameters of this method are described below
Property name | Description | Data type | Required |
---|---|---|---|
full_sensor_name | Full sensor name | string |
Request body
Description | Data type | Required |
---|---|---|
Dictionary of sensor definitions | SensorModel |
Usage examples
curl -X PUT http://localhost:8888/api/sensors/sample_target/sample_category/sample_sensor^
-H "Accept: application/json"^
-H "Content-Type: application/json"^
-d^
"{\"full_sensor_name\":\"sample_target/sample_category/sample_sensor\",\"sensor_definition_spec\":{\"fields\":[{\"field_name\":\"sample_string_param\",\"data_type\":\"string\"},{\"field_name\":\"sample_double_param\",\"data_type\":\"double\"}],\"default_value\":0.0},\"provider_sensor_list\":[],\"custom\":false,\"built_in\":false,\"can_edit\":true}"