Creating or adding data rule definitions and data rules
Use the POST create command to create data rule definitions and data rules and to add new executable rules to existing rule definitions in InfoSphere® Information Analyzer.
Command
POST create
Parameters
- projectContent
- A parameter that indicates there is an associated XML document that describes the data to create or update within the project.
Available HTTP methods
HTTP method | URI pattern | Data format | Success codes | Error codes |
---|---|---|---|---|
POST | create | XML | 200 | 400 (bad request) or 500 (server error) |
Example HTTP request
https://ServerName:9443/ibm/iis/ia/api/create
Example XML string
You can assign rule definitions, rule sets, and executable rules to a folder or to multiple folders. The value of the folder attribute can be a comma-separated list of folder names. Also, a folder name can be a folder path in the format <folder1>/<folder2>/ ... /<folderN>, where each folder is nested in the preceding one.
In the following example, the new rule newrule11 is created in the folder myFolder3. If folder="All", the rule is created under the ALL category. If folder="myFolder3/mySubFolder3", the rule is created under mySubFolder3.
The following example shows how to create a data rule
definition:
<?xml version="1.0" encoding="UTF-8"?>
<iaapi:Project xmlns:iaapi="http://www.ibm.com/investigate/api/iaapi" name="myProject">
<DataRuleDefinitions>
<DataRuleDefinition name="newRule11" folder=”myFolder3”>
<description>Description of newRule</description>
<expression>col exists</expression>
</DataRuleDefinition>
</DataRuleDefinitions>
</iaapi:Project>
Note: To add a new executable rule
to an existing rule definition, specify only the <DataRuleDefinition
name> element.
<?xml version="1.0" encoding="UTF-8"?>
<iaapi:Project xmlns:iaapi="http://www.ibm.com/investigate/api/iaapi" name="projectName">
<DataRuleDefinitions>
<DataRuleDefinition name="Rule1Def">
<ExecutableRules>
<ExecutableRule name="Rule1">
<description>Description of Rule1</description>
<OutputDefinition type="FailingRecords">
<OutputColumn name="col1" type="variable" value="col1"/>
<OutputColumn name="col2" type="variable" value="col2"/>
</OutputDefinition>
<Bindings>
<Binding var="col1"><Column name="SOURCE1.SCHEMA1.TABLE1.COL1"/></Binding>
<Binding var="col2"><Column name="SOURCE1.SCHEMA1.TABLE1.COL2"/></Binding>
<Binding var="refcol"><Column name="SOURCE1.SCHEMA1.REFTABLE1.COLA"/></Binding>
</Bindings>
</ExecutableRule>
</ExecutableRules>
</DataRuleDefinition>
</DataRuleDefinitions>
</iaapi:Project>