Identifying reports programmatically

SOAP applications can discover reports in a content store by using methods from the IBM® Cognos® Software Development Kit. The Content Store Explorer sample program included with the IBM Cognos Software Development Kit demonstrates the use of these methods. See the IBM Cognos Software Development Kit Developer Guide for more information.

REST applications can use the Web Service Inspection Language (WSIL) to recursively explore a content store and reveal reports within it. Typing http://localhost/ibmcognos/bi/v1/disp/rds/wsil in a Web browser will generate the XML output shown here.

...
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
    xmlns:wsilwsdl="http://schemas.xmlsoap.org/ws/2001/10/inspection/wsdl/">
  <link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
    location="http://localhost:80/ibmcognos/bi/v1/disp/rds/wsil
    /path/Public%20Folders/sales_and_marketing">
    <abstract>sales_and_marketing</abstract>
  </link>
  <link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
    location="http://localhost:80/ibmcognos/bi/v1/disp/rds/wsil
   /path/Public%20Folders/Samples">
    <abstract>Samples</abstract>
  </link>
</inspection>

This XML output lists the subfolders of the Public Folder" folder of the IBM Cognos installation. Copying the Web address for the Samples folder into the Web browser address bar will generate the following output.

...
  <link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
    location="http://localhost:80/ibmcognos/bi/v1/disp/rds/wsil
    /path/Public%20Folders/Samples/Metrics">
    <abstract>Metrics</abstract>
  </link>
  <link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
      location="http://localhost:80/ibmcognos/bi/v1/disp/rds/wsil
      /path/Public%20Folders/Samples/Models">
    <abstract>Models</abstract>
  </link>
  ...

This procedure can be repeated until the contents of a subfolder are not other subfolders, but are reports, as shown here.

...
  <service>
    <name>2005 Quarterly Sales Forecast</name>
    <abstract>IBM Cognos Content service</abstract>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
      location="http://localhost:80/ibmcognos/bi/v1/disp
    /rds/wsdl/path/Public%20Folders/Samples/Models/GO%20Sales%20%28analysis%29
    /Report%20Studio%20Report%20Samples/2005%20Quarterly%20Sales%20Forecast"/>
  </service>
  <service>
    <name>2005 Sales Summary</name>
    <abstract>IBM Cognos Content service</abstract>
    <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
    location="http://localhost:80/ibmcognos/bi/v1/disp
    /rds/wsdl/path/Public%20Folders/Samples/Models/GO%20Sales%20%28analysis%29
    /Report%20Studio%20Report%20Samples/2005%20Sales%20Summary"/>
  </service>
  ...

The paths of these reports can now be used to retrieve report outputs from these reports.

The URLs used previously are examples of the wsil and wsdl resource types.

The cmsExplorer JavaScript sample program uses the methods described to navigate a content store and run selected reports.