Cognos Analytics

 View Only

Java SDK app to query Content Store data - suggestions

  • 1.  Java SDK app to query Content Store data - suggestions

    Posted Mon September 16, 2024 12:35 PM
    Edited by Andrei Istomine Mon September 16, 2024 12:42 PM

    I'm working on a Java SDK app for querying Content Store data.

    Ideally, it should be configurable and allow retrieval of any Classes and Properties available via SDK.

    Basic functionality: 

    • Rest API is used for the authentication ( either Namespace/Username/Password OR API Key)   
    • Environment Parameter file in JSON format specifies Control parameters  and Cognos connection/authentication
    • Query parameters specify SearchPath and Class/Prosperities for the required objects. Object Name, Type, SearchPath are returned for each object by default.
    • Java Reflection is used to retrieve/initialize required Properties.
    • The program can be run as a command line utility.

    Can you please suggest any other functionality for this utility ?

    Specify Filters for selected Properties

    Provide Query Templates for common objects

    Parameter files:

    environment.json  

    {
    	"environment": {
    		"control": {
    			"max-error-count": "10",
    			"verbose": "false"
    		},
    		"connection": {
    			"uri": "https://congos-url.domain",
    			"authentication": {
    				"parameters": [
    					{
    						"name": "CAMAPILoginKey",
    						"value": "yourapikey"
    					}
    				]
    			}
    		}
    	}
    }

    query_parameters.json

    {
    	"queries": [
    		{
    			"id": "query1",
    			"searchPath": "//Schedule",
    			"class": "schedule",
    			"properties": [
    				"disabled",
    				"defaultDescription",
    				"active",
    				"everyNPeriods",
    				"intradayRecurrenceInterval"
    			],
    			"output": {
    				"file": "<output-path/filename1>",
    				"format": "TXT|CSV|JSON"
    			}
    		},
    		{
    			"id": "query2",
    			"searchPath": "//Report",
    			"class": "report",
    			"properties": [
    				"disabled",
    				"defaultDescription",
    				"active",
    				"defaultOutputFormat",
    				"defaultPortalAction"
    			],
    			"output": {
    				"file": "<output-path/filename2>",
    				"format": "TXT|CSV|JSON"
    			}
    		}
    	]
    }



    ------------------------------
    Andrei Istomine
    Open to work - anything Cognos
    https://www.linkedin.com/in/andreii/
    ------------------------------