webMethods, OneData, and Terracotta  10.2 | Managing Master Data with webMethods OneData | webMethods OneData Consolidation MDM Guide | Using REST APIs for Data Quality Consolidation | Data Quality APIs | API to Cleanse External Data
 
API to Cleanse External Data
Use this REST call to cleanse a dataset by using the pre-defined JSON format. You can include as many input rows as required for the particular dataset.
The call results in cleansing of all input rows and the output is returned in a single response output. The output includes a header, the list of input rows cleansed, MESSAGE, and The output also includes an additional row, MESSAGE, which includes the information about the success or failure of the cleansing API call. In case of failure, the reasons for the failure are described in detail.
REST URL
http://host:port/OneData_application_name/rest/Standard/OneData project name/DQ/API function
Example: http://apktn121:223/wmonedata/rest/wmmedata/companypartners/DQ/cleanse
Input Attributes
attributeName
Name of the cleanser used.
columnName
Name of the column in the dataset.
inputDataSet
Consisting of the following attributes for each row columns:
*name. Column name.
*value. Value contained within the column.
pkIdentifier
Unique row identifier.
Required:
attributeName, columnName, inputDataSet
Optional:
pkIdentifier
Output Attributes
attributeName
Name of the cleanser used.
columnName
Name of the column in the dataset.
Syntax for Data Cleansing API Request
{
"dqConfig" : {
"additionalConfig" : {
"<key1>":"<value1>",
"<key1>":"<value1>"

}
},
"inputAttributes" : [ {
"attributeName" : ""
"columnName" : ""
}, ........... ],
"outputAttributes" : [ {
"attributeName" : ""
"columnName" : ""
}, ........... ],
"inputDataSet" : {
"rows" : [ {
"columns" : [ {
"name" : "<name of column >",
"value" : "<Value>"
}, ........ ],
"pkIdentifier" : ""
},...........]
}
}

Example for Data Cleansing API Request
{
"dqConfig" : {
"additionalConfig" : {
}
},
"inputAttributes" : [ {
"attributeName" : "IN_Organization",
"columnName" : "Organization"
}, {
"attributeName" : "IN_Address",
"columnName" : "Address"
}, {
"attributeName" : "IN_PostalCode",
"columnName" : "PostalCode"
}, {
"attributeName" : "IN_Country",
"columnName" : "Country"
} ],
"outputAttributes" : [ {
"attributeName" : "OUT_Organization",
"columnName" : "CleansedOrganization"
}, {
"attributeName" : "OUT_Address",
"columnName" : "CleansedAddress"
}, {
"attributeName" : "OUT_PostalCode",
"columnName" : "CleansedPostalCode"
}, {
"attributeName" : "OUT_Locality",
"columnName" : "CleansedCity"
} ],
"inputDataSet" : {
"rows" : [ {
"columns" : [ {
"name" : "Organization",
"value" : "SoftwareAg"
}, {
"name" : "Address",
"value" : "300 Concord Road"
}, {
"name" : "PostalCode",
"value" : "01821"
}, {
"name" : "Country",
"value" : "US"
} ],
"pkIdentifier" : "111"
},
{
"columns" : [ {
"name" : "Organization",
"value" : "SAG"
}, {
"name" : "Address",
"value" : "433 Hakensack Avenue"
}, {
"name" : "PostalCode",
"value" : "07601"
}, {
"name" : "Country",
"value" : "US"
} ],
"pkIdentifier" : "222"
},
{
"columns" : [ {
"name" : "Organization",
"value" : "Software"
}, {
"name" : "Address",
"value" : "1246 Everett Avenue"
}, {
"name" : "PostalCode",
"value" : "40204"
}, {
"name" : "Country",
"value" : "US"
} ],
"pkIdentifier" : "333"
} ]
}
}


Copyright © 2011-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release