ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Query Report Instances on Jaspersoft Server

book

Article ID: 227505

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

Is there a way to query the Jaspersoft schema in order to clean up or remove/delete excessive report instances on the server?

Environment

Jaspersoft 7.1

Resolution

Per Tibco, review the TIBCO JASPERREPORTS® SERVER REST API REFERENCE RELEASE 7.1 document CHAPTER 6 "THE resources SERVICE" for reference of the following detail steps:

1) Issue the following JRS REST GET request to search the repository database to get all report unit details.

GET http://<host>:<port>/jasperserver[-pro]/rest_v2/resources?type=reportUnit

(refer to: https://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v710/resources-service#Searching_the_Repository)

2) Process the response body of the above request. For each resourceLookup items, review its "creationDate" to determine the eligibility for the report unit removal;

3) For those report units that need to be deleted, issue the following JRS REST DELETE request to remove it from the repository database:

DELETE http://<host>:<port>/jasperserver[-pro]/rest_v2/resources/path/to/resource

where the /path/to/resource information is from the "uri" field in the response body of the search in step 1.

(refer to https://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v710/resources-service#Deleting_Resources)