Rest API 5.0

Data Quality Rule Services

Data Quality Rule API

DQR common request parameters description for APIs:

  • alert: This parameter takes the boolean value either true or false. When it is set as true then the user who created this rule gets notifications of respected Data Quality rule Updates.
  • createTicket: This parameter takes the boolean value either true or false. If the createTicket parameter is set to true it will create a ticket when the Data Quality Rule execution is failed.
  • dimension: This parameter takes a valid dimension value starting with an Uppercase letter like Completeness, Validity.
  • domainName: This parameter takes a valid domain name value.
  • function: This parameter takes a valid function name in Uppercase like  TOTAL ROW COUNT(TB), DENSITY PERCENT.
  • isAutoTerm: This parameter takes a boolean value either true or false. When the value is true it automatically assigns the objects of respected published terms added to Data Quality Rule.
  • lowerRange : This parameter takes numeric value.
  • purpose : This parameter takes a string value.
  • ruleName : This parameter takes a string which is a Unique value while creating the Data Quality Rule.
  • tagId : This parameter takes a valid tagId as a value.
  • upperRange : This parameter takes a numeric value.
  • values : This parameter takes a string value containing any text.
  • mainObjectId : This parameter takes valid ObjectId as a value based on the mainObjectType.
  • mainObjectType : This parameter takes a string based on the Function of the respected Data Quality Rule.

1. addDQRule

Description: This API creates a Data Quality Rule by taking ruleName , domainName, purpose as input values.

Mandatory Fields: alert, createTicket, dimension, domainName, dqPolicyId, lowerRange, objectFormat, queryforStats, tagId, termId, dqRuleObjectList.

Method URL

addDQRule

http://localhost:8080/ovaledge/api-docs#/24/addDQRuleUsingPOST

Request Body

[

  {

    "alert": "string",

    "createTicket": "string",

    "dimension": "string",

    "domainName": "Games",

    "function": "string",

    "isAutoTerm": "string",

    "lowerRange": 0,

    "purpose": "test",

    "ruleName": "test.Games.rule",

    "tagId": 1,

    "termId": 1000,

    "upperRange": 0,

    "values": "string",

    "dqRuleObjectList": [

      {

        "mainObjectId": 0,

        "mainObjectType": "string"

      }

    ]

  }

]

Response Body

{

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "dqrule": {

      "dqRuleId": 225,

      "ruleName": "test.Games.rule",

      "domainId": 1000,

      "dimension": null,

      "function": null,

      "purpose": "test",

      "termId": 1000,

      "status": "DRAFT",

      "lowerRange": 0,

      "upperRange": 0,

      "ticket": 0,

      "alerts": 0,

      "isAutoTerm": false,

      "dqRuleObjectList": [],

      "values": "string",

      "businessImpact": 0,

      "comments": null,

      "createDate": "2021-08-24 13:31:10",

      "createdBy": "admin",

      "isWatcherSearch": null,

      "lastRunTime": 0,

      "priority": 0,

      "rating": 0,

      "ruleCondition": null,

      "ruleLevel": null,

      "ruleType": null,

      "datasetId": 0,

      "statuscd": 0,

      "steward": "admin",

      "updateDate": "2021-08-24 13:31:10",

      "updatedBy": "admin",

      "useScore": 4,

      "version": 1,

      "tagNames": [

        "Games"

     ]

    }

  }

}

2. updateRule

Description: This API updates the contents of a Data Quality Rule such as function, dimension, alert, create Ticket, isAutoTerm, lowerRange, UpperRange, termId, tagId, values  Associate Objects etc.

Mandatory Fields:  alert, createTicket, dimension, domainName, dqPolicyId, lowerRange, objectFormat, queryforStats, tagId, termId, dqRuleObjectList.

Method URL

updateRule

http://localhost:8080/ovaledge/api-docs#/24/updateRuleUsingPUT

Request Body

  {

  "alert": "true",

  "createTicket": "true",

  "dimension": "completeness",

  "domainName": "Games",

  "function": "VALIDATE EMAIL(TC)",

  "isAutoTerm": "true",

  "lowerRange": "1",

  "purpose": "testing",

  "ruleName": "test5",

  "tagId": 2,

  "termId": 1002,

  "upperRange": "100",

  "values": "ruleTest",

  "dqRuleObjectList": [

    {

      "mainObjectId": 6496,

      "mainObjectType": "oecolumn"

    }

  ]

}

Response Body

{

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "DQRule": {

      "dqRuleId": 8,

      "ruleName": "test5",

      "domainId": 1000,

      "dimension": "completeness",

      "function": "topvaluescontains",

      "purpose": "testing",

      "termId": 1002,

      "status": "DRAFT",

      "lowerRange": "1",

      "upperRange": "100",

      "ticket": 1,

      "alerts": 1,

      "isAutoTerm": true,

      "dqRuleObjectList": [

        {

          "dqRuleObjectId": 159,

          "dqRuleId": 8,

          "assObjectType": "oetable",

          "assObjectId": 1406,

          "mainObjectType": "oecolumn",

          "mainObjectId": 6486,

          "lastResultValue": 1,

          "lastResultValueText": null,

          "lastRunTime": "2021-09-01 11:08:40",

          "statuscd": 3,

          "runId": 2,

          "ticketId": 0

        },

        {

          "dqRuleObjectId": 160,

          "dqRuleId": 8,

          "assObjectType": "oetable",

          "assObjectId": 1882,

          "mainObjectType": "oecolumn",

          "mainObjectId": 13208,

          "lastResultValue": 0,

          "lastResultValueText": null,

          "lastRunTime": null,

          "statuscd": 0,

          "runId": 0,

          "ticketId": 0

        },

        {

          "dqRuleObjectId": 161,

          "dqRuleId": 8,

          "assObjectType": "oetable",

          "assObjectId": 1887,

          "mainObjectType": "oecolumn",

          "mainObjectId": 13253,

          "lastResultValue": 0,

          "lastResultValueText": null,

          "lastRunTime": null,

          "statuscd": 0,

          "runId": 0,

          "ticketId": 0

        },

        {

          "dqRuleObjectId": 162,

          "dqRuleId": 8,

          "assObjectType": "oetable",

          "assObjectId": 1406,

          "mainObjectType": "oecolumn",

          "mainObjectId": 6496,

          "lastResultValue": 0,

          "lastResultValueText": null,

          "lastRunTime": null,

          "statuscd": 0,

          "runId": 0,

          "ticketId": 0

        }

      ],

      "values": "ruleTest",

      "businessImpact": 0,

      "comments": null,

      "createDate": "2021-09-01 16:36:04",

      "createdBy": "admin",

      "isWatcherSearch": null,

      "lastRunTime": 0,

      "priority": 0,

      "rating": 0,

      "ruleCondition": "",

      "ruleLevel": "FIELD_LEVEL",

      "ruleType": null,

      "datasetId": 0,

      "statuscd": 0,

      "steward": "admin",

      "updateDate": "2021-09-02 11:24:26",

      "updatedBy": "admin",

      "useScore": 0,

      "version": 0,

      "tagNames": [

        "Tag1"

      ]

    }

  }

}

3. addObjectstoRule

Description: This API adds Associate Objects to Data Quality Rule the input parameters are ruleName, mainObjectId, mainObjectType.

Mandatory Fields: mainObjectId, mainObjectType.

Method URL

addObjectstoRule

http://localhost:8080/ovaledge/api-docs#/24/addObjectstoRuleUsingPOST

Request Body 

ruleName: test9;

 [

  {

    "mainObjectId": 1086,

    "mainObjectType": "oetable"

  }

]

 Response Body

 {

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "dqRuleObject": {

      "dqRuleObjectId": 165,

      "dqRuleId": 12,

      "assObjectType": "oetable",

      "assObjectId": 1086,

      "mainObjectType": "oetable",

      "mainObjectId": 1086,

      "lastResultValue": 0,

      "lastResultValueText": null,

      "lastRunTime": null,

      "statuscd": 0,

      "runId": 0,

      "ticketId": 0

    }
 }
}

4. updateRuleStatus

 Description: This API updates status of the Data Quality Rule.

Mandatory Fields: dqRuleName, status.

Method URL

UpdateRuleStatus

http://localhost:8080/ovaledge/api-docs#/24/updateRuleStatusUsingPUT

Request Body

ruleName : test9

Status : ACTIVE

Response Body 

 {

  "status": true,

  "statusCode": "",

  "statusMsg": "DQRule status updated as ACTIVE",

  "response": {}
}

5. addRuleSchedule

 Description: This API Schedules the Data Quality Rule the input values are ruleName, cronEntry.

Mandatory Fields: dqRuleName, CronEntry.

Method URL

addRuleSchedule 

http://localhost:8080/ovaledge/api-docs#/24/addRuleScheduleUsingPOST

Request Body

CronEntry : 0 0 10 ? * 2

ruleName: test9

Response Body

{

  "status": true,

  "statusCode": "",

  "statusMsg": "Data Quality Rule test9 Scheduled with [cronEntry]= 0 0 10 ? * 2",

  "response": {}

 }

6. runDQRule

Description: This API runs the Data Quality Rule.

Mandatory Fields: dqRuleName.

Method URL

runDQRule

http://localhost:8080/ovaledge/api-docs#/24/runDQRuleUsingPOST

Request Body

dqRuleName: test9

Response Body 

{

  "status": true,

  "statusCode": "",

  "statusMsg": "Job submitted.",

  "response": {

    "jobId": 1460
}
}

LIST API’s

1. getDQRule

Description: This API returns the Data Quality Rule.

Mandatory Fields: ruleId

Method URL

getDQRule

http://localhost:8080/ovaledge/api-docs#/24/getDQRuleUsingGET

Request Body

ruleId: 12

Response Body 

{

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "dqRule": {

      "dqRuleId": 12,

      "ruleName": "test9",

      "domainId": 1000,

      "dimension": "completeness",

      "function": "rowcountrange",

      "purpose": "test",

      "termId": 0,

      "status": "ACTIVE",

      "lowerRange": "0",

      "upperRange": "0",

      "ticket": 0,

      "alerts": 0,

      "isAutoTerm": false,

      "dqRuleObjectList": [

        {

          "dqRuleObjectId": 165,

          "dqRuleId": 12,

          "assObjectType": "oetable",

          "assObjectId": 1086,

          "mainObjectType": "oetable",

          "mainObjectId": 1086,

          "lastResultValue": 3,

          "lastResultValueText": null,

          "lastRunTime": "2021-09-02 13:36:25",

          "statuscd": 1,

          "runId": 33,

          "ticketId": 0

        }

      ],

      "values": "",

      "businessImpact": 0,

      "comments": null,

      "createDate": "2021-09-02 18:33:17",

      "createdBy": "admin",

      "isWatcherSearch": null,

      "lastRunTime": 0,

      "priority": 0,

      "rating": 0,

      "ruleCondition": "",

      "ruleLevel": "OBJECT_LEVEL",

      "ruleType": null,

      "datasetId": 0,

      "statuscd": 0,

      "steward": "admin",

      "updateDate": "2021-09-06 12:14:17",

      "updatedBy": "admin",

      "useScore": 13,

      "version": 1,

      "tagNames": []

    }

  }

}

2. getDQRuleObjects

Description: This API returns the List of Data Quality Rule Objects.

Mandatory Fields: dqRuleName

Method URL

 getDQRuleObjects

 http://localhost:8080/ovaledge/api-docs#/24/getDQRuleObjectsUsingGET

Request Body

dqRuleName: test9

Response Body

{

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "ObjectList": [

      {

        "dqRuleObjectId": 165,

        "dqRuleId": 12,

        "assObjectType": "oetable",

        "assObjectId": 1086,

        "mainObjectType": "oetable",

        "mainObjectId": 1086,

        "lastResultValue": 3,

        "lastResultValueText": null,

        "lastRunTime": "2021-09-02 13:36:25",

        "statuscd": 1,

        "runId": 33,

        "ticketId": 0

      },

      {

        "dqRuleObjectId": 166,

        "dqRuleId": 12,

        "assObjectType": "oetable",

        "assObjectId": 1817,

        "mainObjectType": "oetable",

        "mainObjectId": 1817,

        "lastResultValue": 0,

        "lastResultValueText": null,

        "lastRunTime": null,

        "statuscd": 0,

        "runId": 0,

        "ticketId": 0

      }

    ]

  }

}

3. getDQRules

Description: This API returns the List of Data Quality Rules by taking limit and offset as input. Here the offset is an index of the Data Quality Rule and limit is the count of Data Quality Rules.

Mandatory Fields: limit, offset.

Method URL

getDQRules

http://localhost:8080/ovaledge/api-docs#/24/getDQRulesUsingGET.

Request Body 

Limit : 5

Offset : 2

Response Body

 {

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "dqRuleList": [

      {

        "dqRuleId": 4,

        "ruleName": "test2",

        "domainId": 1000,

        "dimension": "completeness",

        "function": "validateemail",

        "purpose": "test",

        "termId": 1002,

        "status": "DRAFT",

        "lowerRange": "1",

        "upperRange": "100",

        "ticket": 1,

        "alerts": 1,

        "isAutoTerm": true,

        "dqRuleObjectList": [

          {

            "dqRuleObjectId": 150,

            "dqRuleId": 4,

            "assObjectType": "oetable",

            "assObjectId": 1882,

            "mainObjectType": "oecolumn",

            "mainObjectId": 13208,

            "lastResultValue": 0,

            "lastResultValueText": null,

            "lastRunTime": null,

            "statuscd": 0,

            "runId": 0,

            "ticketId": 0

          },

          {

            "dqRuleObjectId": 151,

            "dqRuleId": 4,

            "assObjectType": "oetable",

            "assObjectId": 1887,

            "mainObjectType": "oecolumn",

            "mainObjectId": 13253,

            "lastResultValue": 0,

            "lastResultValueText": null,

            "lastRunTime": null,

            "statuscd": 0,

            "runId": 0,

            "ticketId": 0

          }

        ],

        "values": "string",

        "businessImpact": 0,

        "comments": null,

        "createDate": "2021-09-01 13:11:27",

        "createdBy": "admin",

        "isWatcherSearch": null,

        "lastRunTime": 0,

        "priority": 0,

        "rating": 0,

        "ruleCondition": "",

        "ruleLevel": "FIELD_LEVEL",

        "ruleType": null,

        "datasetId": 0,

        "statuscd": 0,

        "steward": "admin",

        "updateDate": "2021-09-01 16:27:18",

        "updatedBy": "admin",

        "useScore": 3,

        "version": 0,

        "tagNames": []

      },

      {

        "dqRuleId": 6,

        "ruleName": "test3",

        "domainId": 1000,

        "dimension": "validity",

        "function": "validateemail",

        "purpose": "test",

        "termId": 0,

        "status": "DRAFT",

        "lowerRange": "0",

        "upperRange": "0",

        "ticket": 1,

        "alerts": 0,

        "isAutoTerm": false,

        "dqRuleObjectList": [],

        "values": "",

        "businessImpact": 0,

        "comments": null,

        "createDate": "2021-09-01 14:56:59",

        "createdBy": "admin",

        "isWatcherSearch": null,

        "lastRunTime": 0,

        "priority": 0,

        "rating": 0,

        "ruleCondition": "",

        "ruleLevel": "FIELD_LEVEL",

        "ruleType": null,

        "datasetId": 0,

        "statuscd": 0,

        "steward": "admin",

        "updateDate": "2021-09-01 16:27:13",

        "updatedBy": "admin",

        "useScore": 18,

        "version": 1,

        "tagNames": []

      },

      {

        "dqRuleId": 8,

        "ruleName": "test5",

        "domainId": 1000,

        "dimension": "completeness",

        "function": "topvaluescontains",

        "purpose": "testing",

        "termId": 0,

        "status": "DRAFT",

        "lowerRange": "string",

        "upperRange": "string",

        "ticket": 0,

        "alerts": 0,

        "isAutoTerm": true,

        "dqRuleObjectList": [

          {

            "dqRuleObjectId": 159,

            "dqRuleId": 8,

            "assObjectType": "oetable",

            "assObjectId": 1406,

            "mainObjectType": "oecolumn",

            "mainObjectId": 6486,

            "lastResultValue": 1,

            "lastResultValueText": null,

            "lastRunTime": "2021-09-01 11:08:40",

            "statuscd": 3,

            "runId": 2,

            "ticketId": 0

          },

          {

            "dqRuleObjectId": 160,

            "dqRuleId": 8,

            "assObjectType": "oetable",

            "assObjectId": 1882,

            "mainObjectType": "oecolumn",

            "mainObjectId": 13208,

            "lastResultValue": 0,

            "lastResultValueText": null,

            "lastRunTime": null,

            "statuscd": 0,

            "runId": 0,

            "ticketId": 0

          },

          {

            "dqRuleObjectId": 161,

            "dqRuleId": 8,

            "assObjectType": "oetable",

            "assObjectId": 1887,

            "mainObjectType": "oecolumn",

            "mainObjectId": 13253,

            "lastResultValue": 0,

            "lastResultValueText": null,

            "lastRunTime": null,

            "statuscd": 0,

            "runId": 0,

            "ticketId": 0

          },

          {

            "dqRuleObjectId": 162,

            "dqRuleId": 8,

            "assObjectType": "oetable",

            "assObjectId": 1406,

            "mainObjectType": "oecolumn",

            "mainObjectId": 6496,

            "lastResultValue": 0,

            "lastResultValueText": null,

            "lastRunTime": null,

            "statuscd": 0,

            "runId": 0,

            "ticketId": 0

          }

        ],

        "values": "string",

        "businessImpact": 0,

        "comments": null,

        "createDate": "2021-09-01 16:36:04",

        "createdBy": "admin",

        "isWatcherSearch": null,

        "lastRunTime": 0,

        "priority": 0,

        "rating": 0,

        "ruleCondition": "",

        "ruleLevel": "FIELD_LEVEL",

        "ruleType": null,

        "datasetId": 0,

        "statuscd": 0,

        "steward": "admin",

        "updateDate": "2021-09-02 12:42:41",

        "updatedBy": "admin",

        "useScore": 1,

        "version": 0,

        "tagNames": [

          "Tag1"

        ]

      }

    ]

  }

}

DELETE API’s

1. deleteRule

Description: This API deletes the Data quality Rule.

Mandatory Fields: ruleId

Method URL

deleteRule

 http://localhost:8080/ovaledge/api-docs#/24/deleteRuleUsingDELETE 

Request Body

ruleId: 12

Response Body 

{

  "status": true,

  "statusCode": "Deleted DQRule [ruleId] = 12",

  "statusMsg": "",

  "response": {}

}

2. deleteRuleObjects

Description: This API deletes the List of Associate Objects.

Mandatory Fields:  dqRuleObjectIds

Method URL

deleteRuleObjects

 http://localhost:8080/ovaledge/api-docs#/24/deleteRuleObjectsUsingDELETE

Request Body

 dqRuleObjectIds[

  28,

  31,

 60]

Response Body 

{

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "Deleted ObjectsIdList": [

      28,

      31,

      60

    ]

  }

}

3. deleteRuleSchedule

Description: This API deletes the schedule of the Data Quality Rule.

Mandatory Fields: cronEntry, dqRuleName

Method URL

deleteRuleSchedule

 http://localhost:8080/ovaledge/api-docs#/24/deleteRuleScheduleUsingDELETE 

Request Body

cronEntry: 0 0 10 ? * 2

dqRuleName: test7

Response Body

{

  "status": true,

  "statusCode": "",

  "statusMsg": "Deleted the Schedule successfully with [cronEntry] = 0 0 10 ? * 2",

  "response": {}

}