Where is API generated reports stored
Posted on February 7, 2018 at 4:47pm
Report can be generated with /rest_v2/reportExecutions. After that it can be downloaded with /rest_v2/reportExecutions/<requestId>/exports/<id>/outputResource, and after that it becames unavailable. My question is - where it is stored between creating and downloading? And follow ups - how lond it'll be stored, do I have to worry about cleaning procedures if API will be revealed to enduser, and downloading not guaranted?
UPD: Experimentally proved that this reports stored roughly for an hour. So no cleaning procedures required. But question persists - where they stored and how storage time regulated?
Joined: Jan 2 2018 - 10:13am
Last seen: 2 years 12 months ago
Posted on February 14, 2018 at 3:36pm
When using reportExecutions the report stays in memory on the server, similar to the filled JRPrint object that gets filled before being flushed out during an export in JRS UI use-cases, for example from the UI ReportViewer to PDF. The JRPrints stay in memory entirely unless they are so huge page-wise that virtualization kicks in (and you can search wiki/community for details on virtualization if needed).
It stays for the duration of the user-session which made the reportExecutions call. (see web.xml for session timeout)
Joined: Oct 30 2012 - 12:51pm
Last seen: 1 year 11 months ago
Posted on February 14, 2018 at 8:16pm
Thank you. I think by "memory" you mean RAM to be exact. And about session timeout - it's bit wierd when we talk about asynchronus call. But anyway it resolves my needs.
P.S. And what if session timeout set to 0 (not expiring)?
Joined: Jan 2 2018 - 10:13am
Last seen: 2 years 12 months ago
Posted on February 15, 2018 at 7:40am
yes - the JVM's ram/memory/heap
It is asynchronous and are parts are session-bound. For example the specific IDs in /<requestId>/exports/<id> are only accessible via the user-session which originated the request.
Session expiration set to zero would be bad, don't do that or you'll eventually encounter an out of memory exception (and wonky stuff will occur prior).
Joined: Oct 30 2012 - 12:51pm
Last seen: 1 year 11 months ago