Creating a project

Use the POST create command to create an empty project or a project that contains content 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.
Note:
  • The projectName defined in the XML document cannot contain any of the following characters: % (percent sign), \ (backslash), " (double quote), ' (single quote).
  • You must enclose any parameter that contains a space in double quotation marks.

Available HTTP methods

Table 1. HTTP API for creating a project
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: Creating an empty project

The following XML string creates an empty project that has the name newProject:
<?xml version="1.0" encoding="UTF-8"?>
<iaapi:Project xmlns:iaapi="http://www.ibm.com/investigate/api/iaapi" 
  name="newProject"/>

Example XML string: Creating a project with registered columns

The following XML string creates the project newProject and the columns COL1 and COL2:
<?xml version="1.0" encoding="UTF-8"?>
<iaapi:Project xmlns:iaapi="http://www.ibm.com/investigate/api/iaapi" 
	name="newProject">
  <description>Description of the project</description>
  <DataSources>
    <DataSource name="SOURCE1">
      <Schema name="SCHEMA1">
        <Table name="TABLE1">
          <Column name="COL1"/>
          <Column name="COL2"/>
        </Table>
      </Schema>
    </DataSource>
  </DataSources>
</iaapi:Project>

Example XML string: Creating a project and running tasks

The following XML string creates the project newProject; registers the data source SOURCE1, which contains the schema SCHEMA1 and the tables TABLE1 and TABLE2; and runs a column analysis on all columns of all tables of the schema:
<?xml version="1.0" encoding="UTF-8"?>
<iaapi:Project xmlns:iaapi="http://www.ibm.com/investigate/api/iaapi" name
  ="newProject">
  <description>Description of the project</description>
  <DataSources>
    <DataSource name="SOURCE1">
      <Schema name="SCHEMA1">
        <Table name="TABLE1">
          <Column name="COL1"/>
          <Column name="COL2"/>
        </Table>
        <Table name="TABLE2">
          <Column name="COLA"/>
          <Column name="COLB"/>
        </Table>
      </Schema>
    </DataSource>
  </DataSources>
  <Tasks>
    <RunColumnAnalysis>
      <Column name="SOURCE1.SCHEMA1.*.*"/>
    </RunColumnAnalysis>
  </Tasks>
</iaapi:Project>

Example XML string: Creating virtual tables and columns

The following XML string creates the project newProject and registers the data source SOURCE1. The SOURCE1 data source contains the schema SCHEMA1 and the tables TABLE1 and TABLE2. The XML string then creates a virtual column COL1_COL2 from the columns COL1 and COL2, and creates a virtual table VIRTUALTABLE1 consisting of those rows for which the value of COL1 is M.
<?xml version="1.0" encoding="UTF-8"?>
<iaapi:Project xmlns:iaapi="http://www.ibm.com/investigate/api/iaapi" 
		 name="newProject">
  <description>Description of the project</description>
  <DataSources>
    <DataSource name="SOURCE1">
      <Schema name="SCHEMA1">
        <Table name="TABLE1">
          <Column name="COL1"/>
          <Column name="COL2"/>
        </Table>
	   <Table name="TABLE2">
          <Column name="COL1"/>
          <Column name="COL2"/>
		<VirtualColumn name="COL1_COL2">
            <Concatenation nullValueReplacement="^" padChar=" " 
quoteChar="\"" separator="|">
              <Column name="COL1"/>
              <Column name="COL2"/>
            </Concatenation>
          </VirtualColumn>
        </Table>
	   <VirtualTable name="VIRTUALTABLE1" baseTable="TABLE1" >
		<WhereCondition> COL1 = 'M' </WhereCondition> 
          <Column name="COL1"/>
          <Column name="COL2"/>
        </VirtualTable>
      </Schema>
    </DataSource>
  </DataSources>
</iaapi:Project>