Last updated: July 22, 2025
DQOps REST API sensors operations
Operations for managing custom data quality sensor definitions in DQOps. The custom sensors are stored in the DQOps user home folder.
create_sensor
Creates (adds) a new sensor given sensor information.
Follow the link to see the source code on GitHub.
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
Execution
curl -X POST http://localhost:8888/api/sensors/sample_target/sample_category/table/volume/row_count^
-H "Accept: application/json"^
-H "Content-Type: application/json"^
-d^
"{\"full_sensor_name\":\"sample_target/sample_category/table/volume/row_count\",\"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}"
Execution
from dqops import client
from dqops.client.api.sensors import create_sensor
from dqops.client.models import ParameterDefinitionsListSpec, \
ProviderSensorModel, \
SensorDefinitionSpec, \
SensorModel
dqops_client = client.Client(
'http://localhost:8888/'
)
request_body = SensorModel(
full_sensor_name='sample_target/sample_category/table/volume/row_count',
sensor_definition_spec=SensorDefinitionSpec(
fields=ParameterDefinitionsListSpec(),
requires_event_timestamp=False,
requires_ingestion_timestamp=False,
default_value=0.0
),
provider_sensor_list=[
],
custom=False,
built_in=False,
can_edit=True
)
call_result = create_sensor.sync(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client,
json_body=request_body
)
Execution
from dqops import client
from dqops.client.api.sensors import create_sensor
from dqops.client.models import ParameterDefinitionsListSpec, \
ProviderSensorModel, \
SensorDefinitionSpec, \
SensorModel
dqops_client = client.Client(
'http://localhost:8888/'
)
request_body = SensorModel(
full_sensor_name='sample_target/sample_category/table/volume/row_count',
sensor_definition_spec=SensorDefinitionSpec(
fields=ParameterDefinitionsListSpec(),
requires_event_timestamp=False,
requires_ingestion_timestamp=False,
default_value=0.0
),
provider_sensor_list=[
],
custom=False,
built_in=False,
can_edit=True
)
call_result = await create_sensor.asyncio(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client,
json_body=request_body
)
Execution
from dqops import client
from dqops.client.api.sensors import create_sensor
from dqops.client.models import ParameterDefinitionsListSpec, \
ProviderSensorModel, \
SensorDefinitionSpec, \
SensorModel
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token
)
request_body = SensorModel(
full_sensor_name='sample_target/sample_category/table/volume/row_count',
sensor_definition_spec=SensorDefinitionSpec(
fields=ParameterDefinitionsListSpec(),
requires_event_timestamp=False,
requires_ingestion_timestamp=False,
default_value=0.0
),
provider_sensor_list=[
],
custom=False,
built_in=False,
can_edit=True
)
call_result = create_sensor.sync(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client,
json_body=request_body
)
Execution
from dqops import client
from dqops.client.api.sensors import create_sensor
from dqops.client.models import ParameterDefinitionsListSpec, \
ProviderSensorModel, \
SensorDefinitionSpec, \
SensorModel
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token
)
request_body = SensorModel(
full_sensor_name='sample_target/sample_category/table/volume/row_count',
sensor_definition_spec=SensorDefinitionSpec(
fields=ParameterDefinitionsListSpec(),
requires_event_timestamp=False,
requires_ingestion_timestamp=False,
default_value=0.0
),
provider_sensor_list=[
],
custom=False,
built_in=False,
can_edit=True
)
call_result = await create_sensor.asyncio(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client,
json_body=request_body
)
delete_sensor
Deletes a custom sensor definition
Follow the link to see the source code on GitHub.
DELETE
Parameters of this method are described below
Property name | Description | Data type | Required |
---|---|---|---|
full_sensor_name |
Full sensor name | string |
Usage examples
Execution
Execution
Execution
Execution
Execution
from dqops import client
from dqops.client.api.sensors import delete_sensor
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token
)
call_result = await delete_sensor.asyncio(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client
)
get_all_sensors
Returns a flat list of all sensors available in DQOps, both built-in sensors and user defined or customized sensors.
Follow the link to see the source code on GitHub.
GET
Return value
Property name | Description | Data type |
---|---|---|
sensor_list_model |
List[SensorListModel] |
Usage examples
Execution
Execution
Execution
Execution
get_sensor
Returns a sensor model
Follow the link to see the source code on GitHub.
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
Execution
curl http://localhost:8888/api/sensors/sample_target/sample_category/table/volume/row_count^
-H "Accept: application/json"
Expand to see the returned result
{
"full_sensor_name" : "sample_target/sample_category/table/volume/row_count",
"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
}
Execution
from dqops import client
from dqops.client.api.sensors import get_sensor
dqops_client = client.Client(
'http://localhost:8888/',
raise_on_unexpected_status=True
)
call_result = get_sensor.sync(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client
)
Expand to see the returned result
SensorModel(
full_sensor_name='sample_target/sample_category/table/volume/row_count',
sensor_definition_spec=SensorDefinitionSpec(
fields=ParameterDefinitionsListSpec(),
requires_event_timestamp=False,
requires_ingestion_timestamp=False,
default_value=0.0
),
provider_sensor_list=[
],
custom=False,
built_in=False,
can_edit=True
)
Execution
from dqops import client
from dqops.client.api.sensors import get_sensor
dqops_client = client.Client(
'http://localhost:8888/',
raise_on_unexpected_status=True
)
call_result = await get_sensor.asyncio(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client
)
Expand to see the returned result
SensorModel(
full_sensor_name='sample_target/sample_category/table/volume/row_count',
sensor_definition_spec=SensorDefinitionSpec(
fields=ParameterDefinitionsListSpec(),
requires_event_timestamp=False,
requires_ingestion_timestamp=False,
default_value=0.0
),
provider_sensor_list=[
],
custom=False,
built_in=False,
can_edit=True
)
Execution
from dqops import client
from dqops.client.api.sensors import get_sensor
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token,
raise_on_unexpected_status=True
)
call_result = get_sensor.sync(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client
)
Expand to see the returned result
SensorModel(
full_sensor_name='sample_target/sample_category/table/volume/row_count',
sensor_definition_spec=SensorDefinitionSpec(
fields=ParameterDefinitionsListSpec(),
requires_event_timestamp=False,
requires_ingestion_timestamp=False,
default_value=0.0
),
provider_sensor_list=[
],
custom=False,
built_in=False,
can_edit=True
)
Execution
from dqops import client
from dqops.client.api.sensors import get_sensor
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token,
raise_on_unexpected_status=True
)
call_result = await get_sensor.asyncio(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client
)
Expand to see the returned result
SensorModel(
full_sensor_name='sample_target/sample_category/table/volume/row_count',
sensor_definition_spec=SensorDefinitionSpec(
fields=ParameterDefinitionsListSpec(),
requires_event_timestamp=False,
requires_ingestion_timestamp=False,
default_value=0.0
),
provider_sensor_list=[
],
custom=False,
built_in=False,
can_edit=True
)
get_sensor_folder_tree
Returns a tree of all sensors available in DQOps, both built-in sensors and user defined or customized sensors.
Follow the link to see the source code on GitHub.
GET
Return value
Property name | Description | Data type |
---|---|---|
sensor_folder_model |
SensorFolderModel |
Usage examples
Execution
Execution
Execution
Execution
Execution
from dqops import client
from dqops.client.api.sensors import get_sensor_folder_tree
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token,
raise_on_unexpected_status=True
)
call_result = await get_sensor_folder_tree.asyncio(
client=dqops_client
)
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
Follow the link to see the source code on GitHub.
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
Execution
curl -X PUT http://localhost:8888/api/sensors/sample_target/sample_category/table/volume/row_count^
-H "Accept: application/json"^
-H "Content-Type: application/json"^
-d^
"{\"full_sensor_name\":\"sample_target/sample_category/table/volume/row_count\",\"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}"
Execution
from dqops import client
from dqops.client.api.sensors import update_sensor
from dqops.client.models import ParameterDefinitionsListSpec, \
ProviderSensorModel, \
SensorDefinitionSpec, \
SensorModel
dqops_client = client.Client(
'http://localhost:8888/'
)
request_body = SensorModel(
full_sensor_name='sample_target/sample_category/table/volume/row_count',
sensor_definition_spec=SensorDefinitionSpec(
fields=ParameterDefinitionsListSpec(),
requires_event_timestamp=False,
requires_ingestion_timestamp=False,
default_value=0.0
),
provider_sensor_list=[
],
custom=False,
built_in=False,
can_edit=True
)
call_result = update_sensor.sync(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client,
json_body=request_body
)
Execution
from dqops import client
from dqops.client.api.sensors import update_sensor
from dqops.client.models import ParameterDefinitionsListSpec, \
ProviderSensorModel, \
SensorDefinitionSpec, \
SensorModel
dqops_client = client.Client(
'http://localhost:8888/'
)
request_body = SensorModel(
full_sensor_name='sample_target/sample_category/table/volume/row_count',
sensor_definition_spec=SensorDefinitionSpec(
fields=ParameterDefinitionsListSpec(),
requires_event_timestamp=False,
requires_ingestion_timestamp=False,
default_value=0.0
),
provider_sensor_list=[
],
custom=False,
built_in=False,
can_edit=True
)
call_result = await update_sensor.asyncio(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client,
json_body=request_body
)
Execution
from dqops import client
from dqops.client.api.sensors import update_sensor
from dqops.client.models import ParameterDefinitionsListSpec, \
ProviderSensorModel, \
SensorDefinitionSpec, \
SensorModel
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token
)
request_body = SensorModel(
full_sensor_name='sample_target/sample_category/table/volume/row_count',
sensor_definition_spec=SensorDefinitionSpec(
fields=ParameterDefinitionsListSpec(),
requires_event_timestamp=False,
requires_ingestion_timestamp=False,
default_value=0.0
),
provider_sensor_list=[
],
custom=False,
built_in=False,
can_edit=True
)
call_result = update_sensor.sync(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client,
json_body=request_body
)
Execution
from dqops import client
from dqops.client.api.sensors import update_sensor
from dqops.client.models import ParameterDefinitionsListSpec, \
ProviderSensorModel, \
SensorDefinitionSpec, \
SensorModel
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token
)
request_body = SensorModel(
full_sensor_name='sample_target/sample_category/table/volume/row_count',
sensor_definition_spec=SensorDefinitionSpec(
fields=ParameterDefinitionsListSpec(),
requires_event_timestamp=False,
requires_ingestion_timestamp=False,
default_value=0.0
),
provider_sensor_list=[
],
custom=False,
built_in=False,
can_edit=True
)
call_result = await update_sensor.asyncio(
'sample_target/sample_category/table/volume/row_count',
client=dqops_client,
json_body=request_body
)