Obtaining the Rule Template List
Function
This API is used to obtain the list of rule templates.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/quality/rule-templates
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain it, see Project ID and Account ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
category_id |
No |
Long |
Directory ID |
|
name |
No |
String |
Rule template name |
|
system_template |
No |
Boolean |
Whether to query only system templates |
|
creator |
No |
String |
Creator |
|
limit |
No |
Integer |
Number of records on each page. The maximum value is 100. |
|
offset |
No |
Integer |
Paging offset |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
workspace |
Yes |
String |
DataArts Studio workspace ID. For details about how to obtain the workspace ID, see Instance ID and Workspace ID. |
|
X-Auth-Token |
Yes |
String |
IAM token. For details about how to obtain the token, see Authentication. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
count |
Long |
Total number of records |
|
resources |
Array of RuleTemplateDetailVO objects |
Pagination data |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
Long |
Rule template ID |
|
name |
String |
Rule template name |
|
category_id |
Long |
Catalog ID |
|
dimension |
String |
Dimension, which can be Completeness, Uniqueness, Timeliness, Validity, Accuracy, or Consistency |
|
type |
String |
Rule type. Field indicates a field rule, Table indicates a table rule, Database indicates a database rule, Cross-field indicates a cross-field rule, and Customize indicates a custom rule. |
|
system_template |
Boolean |
Whether the template is a system template |
|
sql_info |
String |
SQL information |
|
abnormal_table_template |
String |
Abnormal table template |
|
result_description |
String |
Result description |
|
create_time |
Long |
Creation time. The value is a 13-digit timestamp accurate to millisecond. |
|
creator |
String |
Creator. Value System indicates that the creator is provided by the system. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, for example, DQC.0000 which indicates that the request was successfully processed |
|
error_msg |
String |
Error message |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, for example, DQC.0000 which indicates that the request was successfully processed |
|
error_msg |
String |
Error message |
Example Requests
None
Example Responses
Status code: 200
Success
{
"count" : 2,
"resources" : [ {
"id" : 1012384820829081600,
"name" : "test",
"dimension" : "Uniqueness",
"sql_info" : "select count(*) from ${Schema_Table1}",
"category_id" : 0,
"type" : "Table",
"system_template" : false,
"create_time" : 1661412950486,
"creator" : "ei",
"result_description" : "row : ${1}"
}, {
"id" : 1,
"name" : "Number of table rows",
"dimension" : "Accuracy",
"sql_info" : "select count(1) from ${Schema_Table1}",
"category_id" : 0,
"type" : "Table",
"system_template" : true,
"create_time" : 1571328000000,
"creator" : "System",
"result_description" : "Total number of rows: ${1}"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Success |
|
400 |
BadRequest |
|
500 |
INTERNAL SERVER ERROR |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.