Run LiveReports and get return data in JSON using REST API in Content Server

Hello,

Wondering how can we run LiveReports and get the return data in JSON using REST API. I see there is no action to run a LR in Content Server REST API. Any other approaches or do we need to extent the REST?

Appreciate your thoughts.

Mahesh

Comments

  • Is there an update for this request?

    Is it possible or not?

  • It may be best to re-post this in the Content Server category...

  • This probably belongs in the WebReports forum, but I'll answer here. With LiveReports, it's not possible out-of-box. However, with a WebReport wrapping your LiveReport, you can accomplish this easily. The WebReport that serves your data can serve regular HTML but it can also serve JSON. Alternatively, with a bit of experimentation with the webreports API, you can even get a WebReport that returns regular HTML to be encapsulated in a JSON response. If you visit the WebReports forum you might see more posts on this subject.
    Admittedly this won't help you if you don't have a licence for WebReports, but I simply don't see OpenText putting a JSON parser into the LiveReports engine anytime soon - rather LiveReports are merely a data source (like a search query or a folder content set) to be exploited by WebReports.
    -Hugh

  • @joshua.spade@associates.hq.dhs.gov - Did not see it as an option in either the documentation or the code. WR can be run from REST but did not want to bother with consuming a WR license so I ended up extending REST (using oScript).
    Cheers...

  • @John Simon said:
    @joshua.spade@associates.hq.dhs.gov - Did not see it as an option in either the documentation or the code. WR can be run from REST but did not want to bother with consuming a WR license so I ended up extending REST (using oScript).
    Cheers...

    of course there is the brute force approach (Oscript). I've done this a few times back in the day but rarely get an opportunity as most of my clients are government and have been scared away from anything smelling like Customization. It's a shame. A few bad developers end up ruining it for the rest of us :/ And the REST API is (comparatively) easy to extend and a relatively safe customization at that. I'm guessing the approach in this case would be to call the LiveReport LLNode directly to get a hold of the RecArray that has the SQL data and return that as JSON.
    -Hugh

  • @Hugh Ferguson - The tricky part of this extension was allowing parameters...as in how do you even know which parameters are needed?!? But yes, get the node, validate the parameters, run the report, then convert to JSON. Luckily there is the WR REST call to use as a model. Really wasn't that difficult, surprising OT has not included it.
    Cheers...

  • I'm not surprised in the least. Remember, WR is a massive revenue generator, LR is not. It would make zero business sense to expend development effort on something that has the potential to reduce licensing revenue while generating none of its own.
    -Hugh