Last updated: July 22, 2025
DQOps REST API rules operations
Operations for managing custom data quality rule definitions in DQOps. The custom rules are stored in the DQOps user home folder.
create_rule
Creates (adds) a new custom rule given the rule definition.
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_rule_name |
Full rule name | string |
Request body
Description | Data type | Required |
---|---|---|
Rule model | RuleModel |
Usage examples
Execution
curl -X POST http://localhost:8888/api/rules/sample_target/sample_category/sample_rule^
-H "Accept: application/json"^
-H "Content-Type: application/json"^
-d^
"{\"rule_name\":\"sample_rule\",\"type\":\"python\",\"java_class_name\":\"com.dqops.execution.rules.runners.python.PythonRuleRunner\",\"mode\":\"current_value\",\"custom\":false,\"built_in\":false,\"can_edit\":true}"
Execution
from dqops import client
from dqops.client.api.rules import create_rule
from dqops.client.models import RuleModel, \
RuleRunnerType, \
RuleTimeWindowMode
dqops_client = client.Client(
'http://localhost:8888/'
)
request_body = RuleModel(
rule_name='sample_rule',
type=RuleRunnerType.PYTHON,
java_class_name='com.dqops.execution.rules.runners.python.PythonRuleRunner',
mode=RuleTimeWindowMode.CURRENT_VALUE,
custom=False,
built_in=False,
can_edit=True
)
call_result = create_rule.sync(
'sample_target/sample_category/sample_rule',
client=dqops_client,
json_body=request_body
)
Execution
from dqops import client
from dqops.client.api.rules import create_rule
from dqops.client.models import RuleModel, \
RuleRunnerType, \
RuleTimeWindowMode
dqops_client = client.Client(
'http://localhost:8888/'
)
request_body = RuleModel(
rule_name='sample_rule',
type=RuleRunnerType.PYTHON,
java_class_name='com.dqops.execution.rules.runners.python.PythonRuleRunner',
mode=RuleTimeWindowMode.CURRENT_VALUE,
custom=False,
built_in=False,
can_edit=True
)
call_result = await create_rule.asyncio(
'sample_target/sample_category/sample_rule',
client=dqops_client,
json_body=request_body
)
Execution
from dqops import client
from dqops.client.api.rules import create_rule
from dqops.client.models import RuleModel, \
RuleRunnerType, \
RuleTimeWindowMode
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token
)
request_body = RuleModel(
rule_name='sample_rule',
type=RuleRunnerType.PYTHON,
java_class_name='com.dqops.execution.rules.runners.python.PythonRuleRunner',
mode=RuleTimeWindowMode.CURRENT_VALUE,
custom=False,
built_in=False,
can_edit=True
)
call_result = create_rule.sync(
'sample_target/sample_category/sample_rule',
client=dqops_client,
json_body=request_body
)
Execution
from dqops import client
from dqops.client.api.rules import create_rule
from dqops.client.models import RuleModel, \
RuleRunnerType, \
RuleTimeWindowMode
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token
)
request_body = RuleModel(
rule_name='sample_rule',
type=RuleRunnerType.PYTHON,
java_class_name='com.dqops.execution.rules.runners.python.PythonRuleRunner',
mode=RuleTimeWindowMode.CURRENT_VALUE,
custom=False,
built_in=False,
can_edit=True
)
call_result = await create_rule.asyncio(
'sample_target/sample_category/sample_rule',
client=dqops_client,
json_body=request_body
)
delete_rule
Deletes a custom rule 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_rule_name |
Full rule name | string |
Usage examples
Execution
Execution
Execution
Execution
Execution
get_all_rules
Returns a flat list of all rules available in DQOps, both built-in rules and user defined or customized rules.
Follow the link to see the source code on GitHub.
GET
Return value
Property name | Description | Data type |
---|---|---|
rule_list_model |
List[RuleListModel] |
Usage examples
Execution
Expand to see the returned result
[ {
"rule_name" : "sample_rule",
"full_rule_name" : "sample_target/sample_category/sample_rule",
"custom" : false,
"built_in" : true,
"can_edit" : true
}, {
"rule_name" : "sample_rule",
"full_rule_name" : "sample_target/sample_category/sample_rule",
"custom" : false,
"built_in" : true,
"can_edit" : true
}, {
"rule_name" : "sample_rule",
"full_rule_name" : "sample_target/sample_category/sample_rule",
"custom" : false,
"built_in" : true,
"can_edit" : true
} ]
Execution
from dqops import client
from dqops.client.api.rules import get_all_rules
dqops_client = client.Client(
'http://localhost:8888/',
raise_on_unexpected_status=True
)
call_result = get_all_rules.sync(
client=dqops_client
)
Expand to see the returned result
[
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
)
]
Execution
from dqops import client
from dqops.client.api.rules import get_all_rules
dqops_client = client.Client(
'http://localhost:8888/',
raise_on_unexpected_status=True
)
call_result = await get_all_rules.asyncio(
client=dqops_client
)
Expand to see the returned result
[
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
)
]
Execution
from dqops import client
from dqops.client.api.rules import get_all_rules
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token,
raise_on_unexpected_status=True
)
call_result = get_all_rules.sync(
client=dqops_client
)
Expand to see the returned result
[
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
)
]
Execution
from dqops import client
from dqops.client.api.rules import get_all_rules
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token,
raise_on_unexpected_status=True
)
call_result = await get_all_rules.asyncio(
client=dqops_client
)
Expand to see the returned result
[
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
)
]
get_rule
Returns a rule definition
Follow the link to see the source code on GitHub.
GET
Return value
Property name | Description | Data type |
---|---|---|
rule_model |
RuleModel |
Parameters of this method are described below
Property name | Description | Data type | Required |
---|---|---|---|
full_rule_name |
Full rule name | string |
Usage examples
Execution
Execution
Execution
Execution
from dqops import client
from dqops.client.api.rules import get_rule
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token,
raise_on_unexpected_status=True
)
call_result = get_rule.sync(
'sample_target/sample_category/sample_rule',
client=dqops_client
)
Execution
from dqops import client
from dqops.client.api.rules import get_rule
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token,
raise_on_unexpected_status=True
)
call_result = await get_rule.asyncio(
'sample_target/sample_category/sample_rule',
client=dqops_client
)
get_rule_folder_tree
Returns a tree of all rules available in DQOps, both built-in rules and user defined or customized rules.
Follow the link to see the source code on GitHub.
GET
Return value
Property name | Description | Data type |
---|---|---|
rule_folder_model |
RuleFolderModel |
Usage examples
Execution
Expand to see the returned result
{
"rules" : [ {
"rule_name" : "sample_rule",
"full_rule_name" : "sample_target/sample_category/sample_rule",
"custom" : false,
"built_in" : true,
"can_edit" : true
}, {
"rule_name" : "sample_rule_1",
"full_rule_name" : "sample_target/sample_category/sample_rule_1",
"custom" : false,
"built_in" : true,
"can_edit" : true
}, {
"rule_name" : "sample_rule_2",
"full_rule_name" : "sample_target/sample_category/sample_rule_2",
"custom" : false,
"built_in" : true,
"can_edit" : true
}, {
"rule_name" : "sample_rule_3",
"full_rule_name" : "sample_target/sample_category/sample_rule_3",
"custom" : false,
"built_in" : true,
"can_edit" : true
} ],
"all_rules" : [ {
"rule_name" : "sample_rule",
"full_rule_name" : "sample_target/sample_category/sample_rule",
"custom" : false,
"built_in" : true,
"can_edit" : true
}, {
"rule_name" : "sample_rule_1",
"full_rule_name" : "sample_target/sample_category/sample_rule_1",
"custom" : false,
"built_in" : true,
"can_edit" : true
}, {
"rule_name" : "sample_rule_2",
"full_rule_name" : "sample_target/sample_category/sample_rule_2",
"custom" : false,
"built_in" : true,
"can_edit" : true
}, {
"rule_name" : "sample_rule_3",
"full_rule_name" : "sample_target/sample_category/sample_rule_3",
"custom" : false,
"built_in" : true,
"can_edit" : true
} ]
}
Execution
from dqops import client
from dqops.client.api.rules import get_rule_folder_tree
dqops_client = client.Client(
'http://localhost:8888/',
raise_on_unexpected_status=True
)
call_result = get_rule_folder_tree.sync(
client=dqops_client
)
Expand to see the returned result
RuleFolderModel(
folders={
},
rules=[
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule_1',
full_rule_name='sample_target/sample_category/sample_rule_1',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule_2',
full_rule_name='sample_target/sample_category/sample_rule_2',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule_3',
full_rule_name='sample_target/sample_category/sample_rule_3',
custom=False,
built_in=True,
can_edit=True
)
]
)
Execution
from dqops import client
from dqops.client.api.rules import get_rule_folder_tree
dqops_client = client.Client(
'http://localhost:8888/',
raise_on_unexpected_status=True
)
call_result = await get_rule_folder_tree.asyncio(
client=dqops_client
)
Expand to see the returned result
RuleFolderModel(
folders={
},
rules=[
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule_1',
full_rule_name='sample_target/sample_category/sample_rule_1',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule_2',
full_rule_name='sample_target/sample_category/sample_rule_2',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule_3',
full_rule_name='sample_target/sample_category/sample_rule_3',
custom=False,
built_in=True,
can_edit=True
)
]
)
Execution
from dqops import client
from dqops.client.api.rules import get_rule_folder_tree
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token,
raise_on_unexpected_status=True
)
call_result = get_rule_folder_tree.sync(
client=dqops_client
)
Expand to see the returned result
RuleFolderModel(
folders={
},
rules=[
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule_1',
full_rule_name='sample_target/sample_category/sample_rule_1',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule_2',
full_rule_name='sample_target/sample_category/sample_rule_2',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule_3',
full_rule_name='sample_target/sample_category/sample_rule_3',
custom=False,
built_in=True,
can_edit=True
)
]
)
Execution
from dqops import client
from dqops.client.api.rules import get_rule_folder_tree
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token,
raise_on_unexpected_status=True
)
call_result = await get_rule_folder_tree.asyncio(
client=dqops_client
)
Expand to see the returned result
RuleFolderModel(
folders={
},
rules=[
RuleListModel(
rule_name='sample_rule',
full_rule_name='sample_target/sample_category/sample_rule',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule_1',
full_rule_name='sample_target/sample_category/sample_rule_1',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule_2',
full_rule_name='sample_target/sample_category/sample_rule_2',
custom=False,
built_in=True,
can_edit=True
),
RuleListModel(
rule_name='sample_rule_3',
full_rule_name='sample_target/sample_category/sample_rule_3',
custom=False,
built_in=True,
can_edit=True
)
]
)
update_rule
Updates an existing rule, making a custom rule definition if it is not present
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_rule_name |
Full rule name | string |
Request body
Description | Data type | Required |
---|---|---|
Rule model | RuleModel |
Usage examples
Execution
curl -X PUT http://localhost:8888/api/rules/sample_target/sample_category/sample_rule^
-H "Accept: application/json"^
-H "Content-Type: application/json"^
-d^
"{\"rule_name\":\"sample_rule\",\"type\":\"python\",\"java_class_name\":\"com.dqops.execution.rules.runners.python.PythonRuleRunner\",\"mode\":\"current_value\",\"custom\":false,\"built_in\":false,\"can_edit\":true}"
Execution
from dqops import client
from dqops.client.api.rules import update_rule
from dqops.client.models import RuleModel, \
RuleRunnerType, \
RuleTimeWindowMode
dqops_client = client.Client(
'http://localhost:8888/'
)
request_body = RuleModel(
rule_name='sample_rule',
type=RuleRunnerType.PYTHON,
java_class_name='com.dqops.execution.rules.runners.python.PythonRuleRunner',
mode=RuleTimeWindowMode.CURRENT_VALUE,
custom=False,
built_in=False,
can_edit=True
)
call_result = update_rule.sync(
'sample_target/sample_category/sample_rule',
client=dqops_client,
json_body=request_body
)
Execution
from dqops import client
from dqops.client.api.rules import update_rule
from dqops.client.models import RuleModel, \
RuleRunnerType, \
RuleTimeWindowMode
dqops_client = client.Client(
'http://localhost:8888/'
)
request_body = RuleModel(
rule_name='sample_rule',
type=RuleRunnerType.PYTHON,
java_class_name='com.dqops.execution.rules.runners.python.PythonRuleRunner',
mode=RuleTimeWindowMode.CURRENT_VALUE,
custom=False,
built_in=False,
can_edit=True
)
call_result = await update_rule.asyncio(
'sample_target/sample_category/sample_rule',
client=dqops_client,
json_body=request_body
)
Execution
from dqops import client
from dqops.client.api.rules import update_rule
from dqops.client.models import RuleModel, \
RuleRunnerType, \
RuleTimeWindowMode
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token
)
request_body = RuleModel(
rule_name='sample_rule',
type=RuleRunnerType.PYTHON,
java_class_name='com.dqops.execution.rules.runners.python.PythonRuleRunner',
mode=RuleTimeWindowMode.CURRENT_VALUE,
custom=False,
built_in=False,
can_edit=True
)
call_result = update_rule.sync(
'sample_target/sample_category/sample_rule',
client=dqops_client,
json_body=request_body
)
Execution
from dqops import client
from dqops.client.api.rules import update_rule
from dqops.client.models import RuleModel, \
RuleRunnerType, \
RuleTimeWindowMode
token = 's4mp13_4u7h_70k3n'
dqops_client = client.AuthenticatedClient(
'http://localhost:8888/',
token=token
)
request_body = RuleModel(
rule_name='sample_rule',
type=RuleRunnerType.PYTHON,
java_class_name='com.dqops.execution.rules.runners.python.PythonRuleRunner',
mode=RuleTimeWindowMode.CURRENT_VALUE,
custom=False,
built_in=False,
can_edit=True
)
call_result = await update_rule.asyncio(
'sample_target/sample_category/sample_rule',
client=dqops_client,
json_body=request_body
)