All Products
Search
Document Center

DataWorks:GetDataQualityTemplate

Last Updated:Jan 12, 2026

Queries the details of a data quality rule template by ID.

Operation description

This API operation is available for all DataWorks editions.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:GetDataQualityTemplateget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
IdstringNo

The data quality rule template ID.

a7ef0634-20ec-4a7c-a214-54020f91XXXX

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The API request ID, which is generated as a UUID.

0bc14115***159376359
DataQualityTemplateobject

The data quality rule template.

Idstring

The ID of the data quality rule template.

10001
ProjectIdlong

The project ID.

97535
CreateTimelong

The time when the data quality rule template was created.

1606724043000
ModifyTimelong

The time when the data quality rule template was updated.

1606724043000
CreateUserstring

The creator of the data quality rule template.

238428342865
ModifyUserstring

The last updater of the data quality rule template.

238428342865
Specstring

Specific configurations of the data quality rule template. For more information, see Data quality Spec configuration description.

{ "assertion": "anomaly detection fro id_not_null_cnt", "id_not_null_cnt": { "query": "SELECT COUNT(*) AS cnt FROM ${tableName} WHERE dt = '$[yyyymmdd-1]';" }, "identity": "819cf1f8-29be-4f94-a9d0-c5c06c0c3d2a" }
Ownerstring

The owner of the data quality rule template.

238428342865

Examples

Sample success responses

JSONformat

{
  "RequestId": "0bc14115***159376359",
  "DataQualityTemplate": {
    "Id": 10001,
    "ProjectId": 97535,
    "CreateTime": 1606724043000,
    "ModifyTime": 1606724043000,
    "CreateUser": 238428342865,
    "ModifyUser": 238428342865,
    "Spec": {
      "assertion": "anomaly detection fro id_not_null_cnt",
      "id_not_null_cnt": {
        "query": "SELECT COUNT(*) AS cnt FROM ${tableName} WHERE dt = '$[yyyymmdd-1]';"
      },
      "identity": "819cf1f8-29be-4f94-a9d0-c5c06c0c3d2a"
    },
    "Owner": 238428342865
  }
}

Error codes

For a list of error codes, visit the Service error codes.