Can anyone point me to a cognos API document and some example code? The best for me is that the API can be access thru python. But examples in other languages are good also.
You haven't indicated which version of Cognos you're seeking assistance for, but if it's for Cognos 8, you should have the full API docs and sample code if you have the Cognos 8 SDK.
The SDK samples are provided mostly in Java, though some are .NET.
The SDK Developer Guide (again, Cognos 8) should contain enough information to help you get started on putting your own library together.
The Cognos SDK for .net is horrible; I know because I just spent 3+ days trying to get even basic functionality working. Its clear that the person who developed the sample applications has no idea how to work with Web Services or .net.
I managed to find a Cognos.WSDL file that you can try to use to generate your own proxy classes; but; its not WS-I compatible and thus won't work with wsdl.exe
The cognosdotnet.dll and cognosdotnetassembly's are overbloated. There are nearly 1000 classes defined in there. They basically wrapped up their entire API set into a single assembly.
Cognosdotnet.dll defines all the types; and many of them are confusing to work with; but all the raw materials you need are there.
Cognosdotnetassembly.dll defines the serializers. Why they even include them is beyond me. This file is huge (46MB) and provides zero value. The problem is that there is a dependency on this assembly with the type definitions (cognosdotnet.dll).
What I ended up doing was taking Refelector; and code generating the cognosdotnet.dll; then removed the dependency on the serializers. I then created my own wrappers around it to make the API more friendly.
I would recomend starting with the reportrunner example as a starting point; to at least try and get your connectivity working etc..
Can you please tell me, how do i get the cognos 8 SDK? I checked the ibm developer website but couldn't find there. Do i need to purchase Cogons 8, in order to get the SDK?
Thanks.
download the Developer Edition here: http://www.ibm.com/developerworks/downloads/im/cognosbi/index.html