The embedded content sample shows how to use the IBM®
Cognos® Analytics REST
API to sign in a user and then display embedded content.
Procedure
-
Copy the embedded_content folder from the
<installation_location>\samples folder to the
<installation_location>\webcontent folder.
-
Open the \webcontent\embedded_content\preLoginSample.html file in a text
editor, and locate the
<select>
element:
<select size="1" name="namespace">
<option value="CognosEx">CognosEx (Example)</option>
<option value="LDAP">LDAP (Example)</option>
</select>
-
For any of the configured namespaces that you want to see as a selection in the login page,
define the
<option>
element within the <select>
element,
using the following syntax:
<option value="namespace_ID">namespace_name</option>
The namespace_ID corresponds to the Namespace ID
property, as defined for the namespace in Cognos Configuration, under . The namespace_name can be any word; however, the name defined in
Cognos Configuration is preferred.
-
Open the \webcontent\embedded_content\iFrameSample.html file, and replace
the
iFrame
objects with Embed
iFrame
objects from your Cognos
Analytics
installation.
-
In a web browser, type
http://<server_name>:<port>/embedded_content/preLoginSample.html
Results
A sign-in web page is displayed. After you sign in, the embedded content objects are
shown.