Obtaining the Quality Report Rules
Function
This API is used to obtain quality report rules.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/quality/report/rules
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Project ID and Account ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
data_connection_id |
No |
String |
Data connection ID. If you want to obtain the technical report rule score, set data_connection_id, database_name and table_name. |
|
database_name |
No |
String |
Name of the database. If you want to obtain the score of the technical report rule, you must set data_connection_id, database_name and table_name. |
|
table_name |
No |
String |
Table name. If you want to obtain the score of the technical report rule, you must set data_connection_id, database_name and table_name. |
|
table_object_name |
No |
String |
Data table object name (data connection.database.schema table/table). If the service report rule score is obtained, you do not need to set data_connection_id, database_name and table_name. You only need to set table_object_name. |
|
start_timestamp |
No |
Long |
Start timestamp. |
|
end_timestamp |
No |
Long |
End timestamp. |
|
limit |
No |
Long |
Number of records on each page. The value range is [0,100]. |
|
offset |
No |
Long |
Pagination offset. The minimum value is 0. |
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 |
Integer |
Number of data records |
|
rules |
Array of BusinessScoreRuleVO objects |
Number of business score rules |
|
Parameter |
Type |
Description |
|---|---|---|
|
rule_name |
String |
Rule name |
|
type |
Integer |
Rule type. The value can be 0 (custom) or 1 (system). |
|
score |
Double |
Rule score |
|
rule_id |
String |
Rule ID, which is used to switch to the rule details page |
|
instance_id |
String |
Rule instance ID, which is used to switch to the result page |
|
scoring_weight |
Integer |
Rule weight |
|
rule_type_name |
String |
Rule type name |
|
dimension_name |
String |
Rule dimension |
|
sub_rule_instance_id |
String |
Sub-rule instance ID |
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
GET /v2/0833a5737480d53b2f25c010dc1a7b88/quality/report/rules?data_connection_id=2d9dcb2076b34bbab1c675f070d6af9d&database_name=postgres&table_name=public.test
Example Responses
Status code: 200
Success
{
"count" : 1,
"rules" : [ {
"rule_name" : "test",
"type" : 0,
"score" : 0.0,
"rule_id" : "1044554894322835457",
"instance_id" : "1047298515736334336",
"scoring_weight" : 5,
"rule_type_name" : "Data table null value scan",
"dimension_name" : "Completeness",
"sub_rule_instance_id" : "1047298617787944960"
} ]
}
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.