Developer Interface

This part of the documentation covers all class and methods of the module

REST Authentification

When using web services, the calling application must provide a valid user ID and password to JasperReports Server. The special login service that allows authentication using a POST request to create a session and return a session ID that is used with subsequent requests.

class jasperserver.rest.Client(url, username='jasperadmin', password='jasperadmin')[source]

Create a REST connection, with authentification This class implements Login service in JasperServer using the session cookie and the RESTful interface.

Administration service

The web services for administration consists to administers users and roles for searching, editing, deleting and creating. Only administrative users may access these REST services.

class jasperserver.admin.Role(js_connect)[source]

The role service allows administrators to view, create, edit, and delete role definitions. However, the role service does not define role membership

create(rolename)[source]

Create a new role

delete(rolename)[source]

Delete an existent role, if not found return 404 not found

modify(rolename)[source]

Modify an existent role

search(query='')[source]

The Search method for the role service returns a list of roles that match the search string. Without query, all roles are listed.

class jasperserver.admin.User(js_connect)[source]

Manage user inside the JasperServer

create(name, login, password, roles=['ROLE_USER'])[source]

Create a new user, if exists it return status 403

delete(login)[source]

Delete user with the specied login.

modify(name, login, password, roles=['ROLE_USER'])[source]

Modify an existent user, if not found return 404 not found

search(query='')[source]

The GET method for the user service returns descriptors for all users that match the search string

Resources service

This service lets you browse or search the repository in JasperServer. The resources service is a read only service.

Resource service

The resource service supports several HTTP methods to view, create, and modify resources in the repository.

Report service

This service simplifies the API for obtaining report output such as PDF or XLS.

Synchronization

Synchronization allow update (create, modify, delete) all local JRXML files into JRXML Resource and report unit Resource to JasperServer.