Skip to content

checks

Data quality check definition management


create_check

Creates (adds) a new custom check that is a pair of a sensor name and a rule name.
Source code

POST

http://localhost:8888/api/checks/{fullCheckName}  

Parameters of this method are described below

 Property name   Description                       Data type   Required 
full_check_name Full check name string

Request body

 Description                       Data type   Required 
Check model CheckDefinitionModel

Usage examples

curl -X POST http://localhost:8888/api/checks/sample_target/sample_category/sample_check^
    -H "Accept: application/json"^
    -H "Content-Type: application/json"^
    -d^
    "{\"check_name\":\"sample_check\",\"sensor_name\":\"sample_target/sample_category/sample_sensor\",\"rule_name\":\"sample_target/sample_category/sample_rule\",\"help_text\":\"Sample help text\",\"custom\":false,\"built_in\":false,\"can_edit\":true}"

delete_check

Deletes a custom check definition
Source code

DELETE

http://localhost:8888/api/checks/{fullCheckName}  

Parameters of this method are described below

 Property name   Description                       Data type   Required 
full_check_name Full check name string

Usage examples

curl -X DELETE http://localhost:8888/api/checks/sample_target/sample_category/sample_check^
    -H "Accept: application/json"

get_all_checks

Returns a flat list of all checks available in DQOps, both built-in checks and user defined or customized checks.
Source code

GET

http://localhost:8888/api/checks  

Return value

 Property name   Description                       Data type 
check_definition_list_model List[CheckDefinitionListModel]

Usage examples

curl http://localhost:8888/api/checks^
    -H "Accept: application/json"

get_check

Returns a check definition
Source code

GET

http://localhost:8888/api/checks/{fullCheckName}  

Return value

 Property name   Description                       Data type 
check_definition_model CheckDefinitionModel

Parameters of this method are described below

 Property name   Description                       Data type   Required 
full_check_name Full check name string

Usage examples

curl http://localhost:8888/api/checks/sample_target/sample_category/sample_check^
    -H "Accept: application/json"

get_check_folder_tree

Returns a tree of all checks available in DQOps, both built-in checks and user defined or customized checks.
Source code

GET

http://localhost:8888/api/definitions/checks  

Return value

 Property name   Description                       Data type 
check_definition_folder_model CheckDefinitionFolderModel

Usage examples

curl http://localhost:8888/api/definitions/checks^
    -H "Accept: application/json"

update_check

Updates an existing check, making a custom check definition if it is not present
Source code

PUT

http://localhost:8888/api/checks/{fullCheckName}  

Parameters of this method are described below

 Property name   Description                       Data type   Required 
full_check_name Full check name string

Request body

 Description                       Data type   Required 
List of check definitions CheckDefinitionModel

Usage examples

curl -X PUT http://localhost:8888/api/checks/sample_target/sample_category/sample_check^
    -H "Accept: application/json"^
    -H "Content-Type: application/json"^
    -d^
    "{\"check_name\":\"sample_check\",\"sensor_name\":\"sample_target/sample_category/sample_sensor\",\"rule_name\":\"sample_target/sample_category/sample_rule\",\"help_text\":\"Sample help text\",\"custom\":false,\"built_in\":false,\"can_edit\":true}"