### IBM Cognos Web Services Developer Guide 7.5.0 Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=specification-isaggregate A guide for developers on how to use the IBM Cognos Web Services API. It covers essential concepts, setup, and examples for integrating Cognos functionality into custom applications. ```APIDOC ## IBM Cognos Web Services Developer Guide ### Description This guide provides instructions and best practices for developers using the IBM Cognos Web Services API. It covers topics such as setting up the development environment, authentication, making requests, and handling responses. ### Method N/A (This is a guide, not an executable endpoint) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## Key Topics: - Introduction to Cognos Web Services - Authentication and Authorization - Making SOAP Requests - Handling Responses - Error Handling - Sample Code Examples ``` -------------------------------- ### VizSample Command-Line Execution Examples Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=samples-java-api-xml-based-rpc-jax-rpc Illustrates various ways to execute the VizSample application using command-line arguments. These examples demonstrate how to run all tests, specific tests, and how to override the URL for RPC or literal encoding. ```bash VizSample # Runs all tests using the URL specified by the URL attribute in the XML file. VizSample MyTest # Runs only MyTest using the URL specified by the URL attribute in the XML file. VizSample all # Same as running ppwasample with no arguments. VizSample MyTest http://localhost:8080/xts/cws/literal # Runs only MyTest using the URL specified as a command-line argument. VizSample all http://localhost:8080/xts/cws/rpc # Runs all tests using the URL specified as a command-line argument. ``` -------------------------------- ### Run NoticeCast Sample (Java) Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=samples-java-api-xml-based-rpc-jax-rpc This sample uses the NoticeCast adapter to demonstrate common operations including login, listing NewsBoxes, selecting agents, and running agents. It requires jar files from the specified location to be in the CLASSPATH. The sample involves compiling and running NCSample.java and AgentBrowserForm.java. ```bash java NCSample ``` -------------------------------- ### Oracle tnsnames.ora Configuration Example Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=sources-generate-sample-databases-using-oracle An example configuration for the tnsnames.ora file, which defines Oracle Net service names and their corresponding connection details. This enables clients to connect to Oracle databases. ```ini ORASMPL8.WORLD = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = server_name)(PORT = 1521)) (CONNECT_DATA = (SID = ORASMPL8)) ) ``` -------------------------------- ### Find and Describe Access Manager Server Ports with ConfigCP Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=startup-findnext-command This example shows how to use the 'configcp' command-line tool to first select the Access Manager - Server component, then find its associated ports, and finally describe the details of each port found. It sequentially lists the commands and their outputs. ```bash configcp ->select "computername.Services.Access Manager - Server" Current object is Access Manager - Server configcp ->find "port" Current object is Port configcp ->describe Property Port Name: ASPort Location: WOTTPRINGLEP2K1 - Services - Access Manager - Server - General - Authentication Service - Port Description: The port number to be used for the Authentication Service. Datatype: Integer Is Readonly: False Is a Template: False Is linked: False Current Value: 8070 Default Value: 8070 Computer Value: 8070 configcp ->findnext Current object is Port configcp ->describe Property Port Name: TSPort Location: WOTTPRINGLEP2K1 - Services - Access Manager - Server - General - Ticket Service - Port Description: The port number to be used for the Ticket Service. Datatype: Integer Is Readonly: False Is a Template: False Is linked: False Current Value: 9010 Default Value: 9010 Computer Value: 9010 configcp ->exit ``` -------------------------------- ### Set ORACLE_HOME Environment Variable (Bash) Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=sources-generate-sample-databases-using-oracle This snippet demonstrates how to set the ORACLE_HOME environment variable in a Unix-like shell. This variable is crucial for Oracle client tools and applications to locate the Oracle installation. ```bash export ORACLE_HOME=/path/to/your/oracle/installation ``` -------------------------------- ### Start amserver Daemon Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=environment-start-stop-unix-daemons Starts the amserver daemon. The default start script is 'rc.amserver start' and is located in the installation's bin directory. ```shell rc.amserver start ``` -------------------------------- ### Visualizer Sample Command Line Execution Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=samples-java-api-xml-messaging-jaxm Demonstrates how to run the vizsample utility with different command-line arguments to execute tests defined in VizTests.xml. It covers running all tests, specific tests, and specifying an alternate URL. ```bash vizsample ``` ```bash vizsample MyTest ``` ```bash vizsample all ``` ```bash vizsample MyTest http://localhost:8080/xts/cws/rpc ``` ```bash vizsample all http://localhost:8080/xts/cws/rpc ``` -------------------------------- ### Add Products Database and Signon with Password for User Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=commands-adddatabasetouser-command This example demonstrates adding a 'Products' database, creating a database signon named 'SignonA' with a password 'ABC12', and associating both the database and signon with the user 'Bill Gibbons'. The Access Manager Batch Maintenance tool handles namespace login/logout automatically. ```batch //Adds a database signon and sets a password. AddDatabase,"Products" //Adds a database signon and sets a password. AddDatabaseSignon,"Products","SignonA" //Set a password for the database signon. SetDatabaseSignonProperty,"Products","SignonA","Password","ABC12" //Associate the database to the user. AddDatabaseToUser,"Products","Bill Gibbons" //Associate a database signon to a user. AddDatabaseSignonToUser,"Products","SignonA","Bill Gibbons" ``` -------------------------------- ### Unattended Configuration of IBM Cognos Components on Windows Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=suui-set-up-unattended-configuration-cognos-components-windows This guide explains how to configure IBM Cognos components on Windows without user interaction using Configuration Manager to create an environment script file (.ccp). This allows for pre-specifying settings and applying them to multiple computers. It's recommended to read the Configuration Manager User Guide first. The command provided applies current and default property values for existing and new components and starts services. ```cmd configcp -u ``` -------------------------------- ### SQL Server Database Connection URL Example Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=components-prepare-database This example shows the format for specifying the driver information and URL to connect to a SQL Server database. Ensure that 'server_name' and 'database_name' are replaced with your actual database details. ```java jdbc:JSQLConnect://server_name/database_name ``` -------------------------------- ### Start UpfDispatcherService Daemon Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=environment-start-stop-unix-daemons Starts the UpfDispatcherService daemon using the start-dispatcher script. This script is located in the installation's bin directory. ```shell start-dispatcher ``` -------------------------------- ### Start upfserver Daemon Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=environment-start-stop-unix-daemons Starts the upfserver daemon using the start-dbserv script. This script is located in the installation's bin directory. ```shell start-dbserv ``` -------------------------------- ### Launch Sales Visualization Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=application-construct-visualization-url This example demonstrates how to launch the 'sales' visualization, select the 'worldchart' map hierarchy, and display the 'germany' map visualization using the vizcgi.exe endpoint. ```APIDOC ## GET /cognos/cgi-bin/vizcgi.exe ### Description Launches a specified visualization with hierarchy and map drill-down options. ### Method GET ### Endpoint /cognos/cgi-bin/vizcgi.exe ### Query Parameters - **TARGET** (string) - Required - The name of the visualization to launch. - **FORMAT** (string) - Required - The output format, typically 'CLIENT' for web client. - **MAPCHART** (string) - Optional - Specifies the map hierarchy to select. - **MAPDRILL** (string) - Optional - Specifies the map visualization to display after selection. ### Request Example ``` http://localhost/cognos/cgi-bin/vizcgi.exe?TARGET=sales.regional&FORMAT=CLIENT&MAPCHART=worldchart,MAPDRILL=germany ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success or failure of the request. - **message** (string) - Provides details about the response. #### Response Example ```json { "status": "success", "message": "Visualization launched successfully." } ``` ``` -------------------------------- ### Start UpfAdmin Daemon Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=environment-start-stop-unix-daemons Starts the UpfAdmin daemon using the start-upfadmin script. This script is typically found in the installation's bin directory. ```shell start-upfadmin ``` -------------------------------- ### Add Products Database and Signon to Namespace Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=commands-adddatabasesignontouser-command This snippet demonstrates adding a 'Products' database to the namespace and creating a database signon named 'SignonA' for it. It also shows how to set the password for the database signon. ```Batch AddDatabase,"Products" AddDatabaseSignon,"Products","SignonA" SetDatabaseSignonProperty,"Products","SignonA","Password","ABC12" ``` -------------------------------- ### IBM Cognos Web Services Developer Guide 7.5.0 Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=specification-xaxis A guide for developers on how to use the IBM Cognos Web Services, providing instructions and examples for integration. ```APIDOC ## IBM Cognos Web Services Developer Guide ### Description This guide provides developers with the necessary information to effectively utilize the IBM Cognos Web Services. It covers topics such as accessing data, executing reports, and integrating Cognos functionalities into custom applications. ### Method N/A (Developer Guide) ### Endpoint N/A (Developer Guide) ### Parameters N/A (Developer Guide) ### Request Example N/A ### Response #### Success Response (200) N/A (Developer Guide) #### Response Example N/A ``` -------------------------------- ### Transformer Command Line Syntax Examples Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=sbst7-command-line-options Demonstrates basic command line syntax for the Transformer executable, including combining options and handling arguments with spaces. Assumes Transformer is in the system's PATH. ```shell Trnsfrmr -n -i Sales.py? ``` ```shell Trnsfrmr -i -t2006 Sales.py? ``` ```shell Trnsfrmr -n -k"field three=CarlosR/pw462" Field3.mdl ``` -------------------------------- ### Start ns-admin Daemon Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=environment-start-stop-unix-daemons Starts the ns-admin daemon (Sun One Directory Server administration). The script is located in the directory where Sun One Directory Server was installed. ```shell start-admin ``` -------------------------------- ### Database Connection String Example (isql) Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=sources-generate-sample-databases-using-sybase This example demonstrates the format of an isql command for connecting to a Sybase database. Users must replace placeholder values with their specific environment settings, including username, password, server name, and database name. Note that for some Sybase versions, '-D' might need to be changed to '-d' to avoid syntax errors. ```bash isql -U****username****-P****userpassword****-S****servername****-D****databasename****-i drop.sql -o drop.log ``` -------------------------------- ### Create Package Definition, Auth File, and Pack Settings File Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=interface-define-command-cdmdefine Creates a package definition, an authentication file, and a pack settings file in a specified directory. This command allows for custom locations and configurations. ```bash cdmdefine -d name -dl dir -u server -ca -a file -cd ``` -------------------------------- ### IBM Cognos Web Services Developer Guide 7.5.0 Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=m-activate-method-1 This guide provides instructions and examples for developing applications using the IBM Cognos Web Services API. ```APIDOC ## IBM Cognos Web Services Developer Guide ### Description Developer guide for using the IBM Cognos Web Services API, including development best practices and examples. ### Method N/A (Developer Guide) ### Endpoint N/A (Developer Guide) ### Parameters N/A ### Request Example N/A ### Response N/A #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### IBM Cognos Web Services Developer Guide Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=ps-use-parameter-catalog-picklist-1 A guide for developers on how to use the IBM Cognos Web Services API, including tutorials, best practices, and code examples. ```APIDOC ## IBM Cognos Web Services Developer Guide ### Description This developer guide assists users in effectively utilizing the IBM Cognos Web Services API. It covers essential concepts, practical examples, and guidance on building robust integrations with Cognos. ### Method N/A (Guide document) ### Endpoint N/A (Guide document) ### Parameters N/A (Guide document) ### Request Example N/A (Guide document) ### Response N/A (Guide document) ``` -------------------------------- ### Add Directory Server and Display Configuration (VBScript) Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=automation-parent-property This VBScript example demonstrates how to add a new directory server named 'GOWest' to the DSConfigurations collection using the AutoConfiguration.Application object. It then displays the 'grandparent' name, application name, host, port, base DN, and timeout of the newly added configuration. ```vbscript Sub Main() Dim objAutoConfigApp as Object Dim objDSConfig as Object Set objAutoConfigApp = CreateObject("AutoConfiguration.Application") Set objDSConfig = objAutoConfigApp.DSConfigurations.Add _ ("GOWest", 389, "o=Great Outdoors, c=CA", 60) Msgbox "Parent : " & objDSConfig.Parent.Name & _ Chr$(10) & "Application : " & _ objDSConfig.Application.Name & Chr$(10) & "Name : " & objDSConfig.Name & Chr$(10) & "Host : " & objDSConfig.Host & Chr$(10) & "Port : " & objDSConfig.Port & Chr$(10) & "Base DN : " & objDSConfig.BaseDN & Chr$(10) & "Timeout : " & objDSConfig.Timeout & Chr$(10) Set objDSConfig = Nothing Set objAutoConfigApp = Nothing End Sub ``` -------------------------------- ### Convert Characters to Integer - Example Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=tf-characters-integer Provides a practical example of using the 'characters-to-integer' function. It shows how to extract a substring from 'Cognos' starting at the first character and taking four characters, then converting this to an integer. ```cognos-example characters-to-integer ('Cognos', 1, 4) ``` -------------------------------- ### File Dialog Example Implementation Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=functions-dlgcontrolid-function This code demonstrates the creation and management of a file dialog box, similar to a 'File Open' dialog. It includes the definition of the dialog layout, variable declarations, and the FileDlgFunction which handles various dialog events like initialization, control changes, and user input. The ListFiles subroutine populates list boxes with file information. ```BASIC Declare Sub ListFiles(str1$) Declare Function FileDlgFunction _ (identifier$, action, suppvalue) Sub main Dim identifier$ Dim action as Integer Dim suppvalue as Integer Dim filetypes as String Dim exestr$() Dim button as Integer Dim x as Integer Dim directory as String filetypes="Program files " _ & "(*.exe)"+Chr$(9)+"All Files (*.*)" Begin Dialog newdlg 230, 145, "Open", .FileDlgFunction '$CStrings Save Text 8, 6, 60, 11, "&Filename:" TextBox 8, 17, 76, 13, .TextBox1 ListBox 9, 36, 75, 61, exestr$(), .ListBox1 Text 8, 108, 61, 9, "List Files of &Type:" DropListBox 7, 120, 78, 30, filetypes, _ .DropListBox1 Text 98, 7, 43, 10, "&Directories:" Text 98, 20, 46, 8, "c:\windows" ListBox 99, 34, 66, 66, "", .ListBox2 Text 98, 108, 44, 8, "Dri&ves:" DropListBox 98, 120, 68, 12, "", .DropListBox2 OKButton 177, 6, 50, 14 CancelButton 177, 24, 50, 14 PushButton 177, 42, 50, 14, "&Help" '$CStrings Restore End Dialog Dim dlg As newdlg button = Dialog(dlg) End Sub Sub ListFiles(str1$) DlgText 1,str1$ x=0 Redim exestr$(x) directory=Dir$("c:\windows\" & str1$,16) If directory<>"" then Do exestr$(x)=LCase$(directory) x=x+1 Redim Preserve exestr$(x) directory=Dir Loop Until directory="" End If DlgListBoxArray 2,exestr$() End Sub Function FileDlgFunction(identifier$, action, suppvalue) Select Case action Case 1 str1$="*.exe" 'dialog box initialized ListFiles str1$ Case 2 'button or control value changed If DlgControlId(identifier$) = 4 Then If DlgText(4)="All Files (*.*)" then str1$="*.*" Else str1$="*.exe" End If ListFiles str1$ End If Case 3 'text or combo box changed str1$=DlgText$(1) ListFiles str1$ Case 4 'control focus changed Case 5 'idle End Select End Function ``` -------------------------------- ### DescribeTheme Submit Example - XML Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=commands-describetheme An example of submitting the DescribeTheme command with no parameters, which results in retrieving all themes from the Upfront data store. ```XML ``` -------------------------------- ### Start vizwebsrv Daemon (Bourne Shell) Source: https://www.ibm.com/docs/en/cognos-series-7/7.5.0/index_topic=environment-start-stop-unix-daemons Starts the IBM Cognos Visualizer Web server daemon using the start_viz.sh script. This script is typically located in the installation's bin directory and is executed from a UNIX shell. ```shell start_viz.sh ```