The v2/export Service

The export service works asynchronously: first you request the export with the desired options, then you monitor the state of the export, and finally you request the output file. Each step requires a different service call. You must be authenticated as the system admin (superuser) for the export services.

Method

URL

POST

http://<host>:<port>/jasperserver[-pro]/rest_v2/export/

Content-Type

Content

application/json

A JSON object that describes the export options.

Return Value on Success

Typical Return Values on Failure

200 OK – Returns a JSON object that gives the ID of the started export operation.

401 Unauthorized – Export is available only to the system admin user (superuser).

The content to send describes the export options, for example:

{
  roles: ["ROLE_USER","organization_1|ROLE_MANAGER"],
  users: ["jasperadmin","organization_1|joe"],
  uris: ["path/to/resource/1", "organizations/organization_1/path/to/resource/2"]
  parameters: ["role-users", "repository-permissions"]
}

As shown above, commercial editions must use the organization syntax for all roles, users, and URIs. The following table describes the export parameters:

Export Options

everything

Export everything except audit and monitoring: all repository resources, permissions, report jobs, users, roles, and server settings.

role-users

When this option is present, each role export triggers the export of all users belonging to the role. This option should only be used if roles are specified

repository-permissions

When this option is present, repository permissions are exported along with each exported folder and resource. This option should only be used if uris are specified.

include-access-events

When this option is present, access events (date, time, and user name of last modification) are exported along with each exported folder and resource. This option should only be used if uris are specified.

include-audit-events

Include audit data for all resources and users in the export. The audit feature must be enabled in the server configuration.

include-monitoring-events

Include monitoring events. The monitoring feature must be enabled in the server configuration.

The body of the response contains the ID of the export operation needed to check its status and later download the file:

{
  id: "njkhfs8374",
  state: {
    phase: "inprogress",
    message: "Progress..."
  }
}
Version: 
Feedback