Jump to content

Jasper Rest Client for Jasper Server - Get All Reports


florian.johannssen

Recommended Posts

Hello Jasper friends,

I am using the JRS-REST Java Client to access the jasper server: https://github.com/Jaspersoft/jrs-rest-java-client 

I am looking for a service to get a List of all reports which are stored in my jasper server like:

OperationResult operationResult = session.reportingService() ......Get-All-Reports
Does anyone have an idea?
 
Best Regards
 
Florian

 

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Yes, I have already solved this problem by using the resourceService()

The code:

@Test
public void testGetAllReports() {
        OperationResult<ClientResourceListWrapper> result = session
                .resourcesService()
                .resources()
                .parameter(ResourceSearchParameter.FOLDER_URI, "/Velimo")
                .search();
        ClientResourceListWrapper resourceListWrapper = result.getEntity();
 
        assertNotNull(resourceListWrapper);
        assertTrue(resourceListWrapper.getResourceLookups().size() > 0);
        
        for (ClientResourceLookup resource : resourceListWrapper.getResourceLookups()) {
        logger.info("Report: " + resource);
        }
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...