COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => SDK => Topic started by: v6shah on 20 Dec 2023 09:41:00 AM

Title: Download XML report using API
Post by: v6shah on 20 Dec 2023 09:41:00 AM
Hi, I would like to download the XML for various packages from CA server using any kind of API (Similar to MetaManager's download option. The only difference is that I would like to do it programmatically so I can automate few tasks). I would like to know if this is possible.

I went through documentation of the REST API, got the id for the package I needed to download. So, the question is how should I go about downloading or exporting a package given its id?
Title: Re: Download XML report using API
Post by: jackson.eyton on 16 Apr 2024 02:29:20 PM
Ever find an answer to this? Seems awfully quiet on how to pull XML/ReportSpec from the API. Pretty sure its possible, Motio does it... *sigh*
Title: Re: Download XML report using API
Post by: jackson.eyton on 17 Apr 2024 11:42:25 AM
Seems like its not a possibility.... yet...
https://ibm-data-and-ai.ideas.ibm.com/ideas/CA-I-4313

I've got my team voting on this, all 5 of us! 😂
Title: Re: Download XML report using API
Post by: dougp on 18 Apr 2024 01:55:45 PM
Not a lot specifically helpful here because the basic answer from the current REST API is, "Nope."

The question is confusing.  The title days reports, but the question says packages.  Which is it?

IBM stated recently at a AMA (Ask Me Anything) presentation that the REST API should replace the SDK in a year or two, but I don't see differences between the 11.0 API and the 12.0 API.

I think report specifications can be obtained by using the Cognos Analytics SDK.  The REST API doesn't include that capability yet.

You can also get report specs from the Content Store database.  Good luck.  Querying the Content Store database is not supported.  If you break something, you're on your own.

The xml for a Framework Manager model is in the model.xml file in the folder for that model.  A package is more specific than that.

I remember extracting a package from Cognos at one point, but I don't remember the process.  It may involve enabling certain logging features and running a report.  Not something I would do on a busy production server.  And it may be possible using the SDK.
Title: Re: Download XML report using API
Post by: cognostechie on 19 Apr 2024 04:16:05 PM
Quote from: jackson.eyton on 16 Apr 2024 02:29:20 PMEver find an answer to this? Seems awfully quiet on how to pull XML/ReportSpec from the API. Pretty sure its possible, Motio does it... *sigh*

What's the objective? Why would you want to do this? XML is hard to read and understand whereas FM is easier to understand. Moreover, report XML does NOT depend on what is done in FM but on how the report is made. The same package could produce different XMLs for different reports even if the same query subjects are used.