Getting the content of a project

Use the GET project API command to get the content of a project.

Command

GET project

Purpose

You can use this command to get the content of a complete project and save it into an XML document. You can manually edit, archive, version, and import the XML document to create a project on another system. You can use this command, and the XML document that it creates, to exchange complete project information. You can also use it to create a project template that can be deployed in a new system with one command.

Parameters

projectName
The name of the project whose content you want to retrieve.

Available HTTP methods

Table 1. HTTP API for getting the content of a project
HTTP method URI pattern Data format Success code Error codes
GET project XML 200 400 (bad request) or 500 (server error)

Output returned in the XML document

The following information is returned when you issue this command:
  • The basic properties of the project, such as the project name and description
  • The list of the registered data sources, schemas, tables and columns, and the defined virtual columns and virtual tables
  • The list of the defined rule and rule set definitions including:
    • The basic properties of the rules, such as names and descriptions
    • The logical expression of the rules
    • The list of the variables of the rules, such as the name, type, and eventual default binding for each variable
  • The list of the data rules and rule sets including:
    • The basic properties of the data rules and rule sets, such as names and descriptions
    • The output definition of the rules
    • The binding of the variables
    • Eventual join conditions
    • Benchmarks
    • Metrics

Example HTTP request

The following example shows how to get the project project1 on the server myServer:
GET https://myServer:9443/ibm/iis/ia/api/project?projectName=project1  

Example return value

The following example shows the return value for getting the content of a project including confidence and baseline benchmarks for rule set definitions. This XML string describing a project contains elements of type ConfidenceBenchmark and BaselineComparisonBenchmark.
Note:
  • The registered data sources are listed at the beginning of the XML document under the element DataSources. All the columns registered in the project are listed hierarchically (database, schema, table). Eventual virtual columns and virtual tables are listed with the normal columns by using VirtualColumn and VirtualColumn elements (see XSD files).
  • The rule and ruleset definitions are listed under the RuleDefinitions element. The data rules and data rule sets are listed as subelements of the DataRuleDefinition element it refers. Several data rules are enclosed by ExecutableRules tags. The attributes of a single data rule are captured in the ExecutableRule element. A rule set is represented by a RuleSetDefinition element.
<?xml version="1.0" encoding="UTF-8"?>
<iaapi:Project xmlns:iaapi="http://www.ibm.com/investigate/api/iaapi" name="project1">
  <DataSources>
    <DataSource name="SOURCE1">
      <Schema name="SCHEMA1">
        <Table name="TABLE1">
          <Column name="COL1"/>
          <Column name="COL2"/>
(...)
          <VirtualColumn name="VC1">
            <Concatenation separator="|">
              <Column name="COL1"/>
              <Column name="COL2"/>
            </Concatenation>
          </VirtualColumn>
(...)
         </Table>
         <Table name="REFTABLE1">
           <Column name="COLA"/>
           <Column name="COLB"/>
         </Table>
(...)
  <DataRuleDefinitions>
    <DataRuleDefinition name="Rule1Def">
      <description>Description of Rule1Def</description>
      <expression>if col1='E' then col2 in_reference_column refcol</expression>
      <Variables>
        <Variable name="col1" dataType="string" defaultBinding="SOURCE1.SCHEMA1.TABLE1.COL1"/>
        <Variable name="col2" dataType="string"/>
        <Variable name="refcol" dataType="string"/
      </Variables>
      <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>

   <RuleSetDefinition name="RuleSet1Def">
      <description>Description of Rule1Def</description>
      <Benchmarks>
        <ConfidenceBenchmark percentRulesNotMetLimit=”0.5” percentRecordsAllowedOverLimit=”0.1”/>
        <BaselineComparisonBenchmark benchmarkType=”similarity” operator=”less_than” value=”0.15”/> 
      </Benchmarks>
   </RuleSetDefinition>
(...)
  </DataRuleDefinitions>
 
 <Metrics>
    <Metric name=”Unique_accounts”>
      <description>Account ID must be unique.</description>
      <expression>AccountID_Unique % Met</expression>
      <MetricBenchmark operator=”greater_or_equal” value=”100”/>
    </Metric>
(...)
  </Metrics>
</iaapi:Project>