Upload new jrxml file via REST API

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

Hello. I would like to use REST API for Jasperreports server. I have there already created reportunits. Now I made some changes to jrxml files and wants to upload them via REST API.

When I use POST method, new reportunit with new jrxml file is created. If I use PUT with "overwrite?=true" than my existing reportunit is completely overwritten. But, it's not suitable for me as I need to have all images and inputControl files left intouched. I would use PATCH method, but it seems not be supported by Jasperreports anymore. Any advice if my main goal is possible to achieve? To sum up, I need to update only one jrxml file, nothing else. 

 

valeriya0606's picture
Joined: May 25 2021 - 2:49am
Last seen: 4 months 2 weeks ago

1 Answer:

Don't mess with the descriptor.  Just upload the new JRXML file using the resources API to the files directory:

    /public/Samples/Reports/<some report uri>_files/

Or upload your JRXML files separately then reference them in your report descriptors instead of storing local.  This way you can simply replace the referenced JRXML file.

jonmcano's picture
292
Joined: Sep 20 2016 - 8:21am
Last seen: 7 months 4 weeks ago
Feedback
randomness