Question & Answer
Question
If a path from Cognos Mashup Services (CMS)/wsil is returned like this: Public%20Folders/sales_and_marketing what is the methodology for supplying this path to the standard Software Development Kit (SDK) for content store queries?
Cause
wsil returns the path to a resource:
path
The source is a resource that is referenced by its simplified path. The path can have as its root:
*
Public%20Folders for objects contained in "Public Folders"
*
~ for the "My Folders" of the current user
*
CAMID(user) for the "My Folders" of another user
A sample URL using a path is shown below.
http://localhost/ibmcognos/cgi-bin/cognos.cgi/rds/reportData/path/
Public%20Folders/Samples/Models/GO%20Sales%20(query)/Report%20Studio%20Report%20Samples/Order%20Invoices%20-%20Donald%20Chow%2c%20Sales%20Person
The SDK requires either a storeID or a searchPath as below:
searchPath
The source is a resource that is referenced by its search path.
A sample URL using a search path is shown below.
http://localhost/ibmcognos/cgi-bin/cognos.cgi/rds/reportData/searchPath
/content/folder[@name='Samples']/folder[@name='Models']/package[@name='GO Sales (query)']/folder[@name='Report Studio Report Samples']/report[@name='Order Invoices - Donald Chow, Sales Person']
Answer
You can use the cognosurl resource type passing the path you get from wsil which will give you back a storeID to the report.
Using the storeID with the SDK you can get the searchPath.
For example:
Request:
http://localhost/c10GA/cgi-bin/cognos.cgi/rds/cognosurl/path/
Public%20Folders/sales_and_marketing
Response:
<rds:GetCognosURLResponse>
−
<rds:url>
http://localhost:80/c10GA/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object
=storeID("i1AF39CBEFEBC488685DE6AE050384A9F")
</rds:url>
</rds:GetCognosURLResponse>
Please note that for Cognos Analytics (Cognos 11) this syntax can be used to retrieve the cognosurl given the ID of the report (ie: i500956E6C3AF4158A97B78B6A6BB09EB):
http://hostname:9300/bi/v1/disp/rds/cognosurl/report/i500956E6C3AF4158A97B78B6A6BB09EB
For more information, please refer to the following documentation, which is available when the IBM Cognos SDK is installed:
IBM Cognos Mashup Service Developer Guide
IBM Cognos Software Development Kit Developer Guide
Related Information
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21500891