Jump to content
We've recently updated our Privacy Statement, available here ×

Access Jasper repository from outside application


PrasannaKate

Recommended Posts

Hi All,

 

We need a way to do following in Jasper Server programatically:

A. Create folder

B. Create datasource

C. Create Ad Hoc reports

D. Create users

E. Create roles

F. Create Analysis views

G. Assign role and access permissions to reports and datasource

 

We are evaluating three approaches:

 

1. Web service APIs There are NO web service APIs for D,E,F and G so we are planning to implement the corresponding Java APIs and add wrapper Web Service APIs for these.

 

2. Using js-import utils We will copy the required resources (folder structure and XML files) to Jasper server machine and add a Web service in Jasper that will execute js-import util on these resources.

 

3. Modify database directly We are trying to see if it is possible to update the database directly to create these resources.

 

Has any one tried doing this? Or does any one have a better solution?

 

Thanks,

Prasanna

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

#1

It may be the hardest thing to do but getting to work on it should be the better in the long term. Broadening up the web-service API will make your solution client language agnostic and would be a good addition to the project if you could contribute back.

 

#2

Since you want to do it programatically using this solution you'd have to do manually do the operations you want and then export those xmls which seems not feasible for your purpose. Getting those xmls done using some programming is possible but then you'd need to keep up with how dev team updates xml schemas (it might be not that often). Still, you'd be left to the problem of accessing the server and uploading those xmls which might be a problem on your network security.

 

#3

Would demand very specific and not-so-straight-forward hacking to the version you are using and might *not* be any portable trough newer versions.

 

So I'd pick #1 and would ask for some support of the community to get it fully implemented and back into the open source.

Link to comment
Share on other sites

  • 8 months later...

The export/import approach seems the easiest to me to achieve:

D. Create users
E. Create roles
F. Create Analysis views
G. Assign role and access permissions to reports and datasource
 

The export APIs are there. Have a look at the unit tests to see how they can be used. The general approach would be:

 

  1. Create the objects you want in a working area of the repository.
  2. Use the export APIs to create a dump of the users, roles, analysis views and permissions you want.
  3. Use the import process on the exported data.

Sherman

Jaspersoft

Link to comment
Share on other sites

  • 2 years later...

Is there any new info on this? We're still on jasperserver 3.5.1, but if newer versions have SOAP interface for users/roles, then we could migrate.

> The export APIs are there. Have a look at the unit tests to see how they can be used.

I don't like this API. It requires database connection instead of http. However, another test (HttpUnitCreateRoleTest) looks promising.

 

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...