Use the rest_v2/import service to upload a catalog as a zip file and import it into the server with the given options. Specify options as arguments in the format <argument>=true. Arguments that are omitted are assumed to be false. You must be authenticated as the system admin (superuser) to import into root, but organization admins may import into their organizations or suborganizations.
Jaspersoft does not recommend uploading files greater than 2 gigabytes.
Method | URL | |||||||||||
POST | http://<host>:<port>/jasperserver[-pro]/rest_v2/import?<arguments> | |||||||||||
Argument | Value | Description | ||||||||||
update? | true | Resources in the catalog replace those in the repository if their URIs and types match. | ||||||||||
skipUserUpdate? | true | When used with update=true, users in the catalog are not imported or updated. Use this option to import catalogs without overwriting currently defined users. | ||||||||||
broken | skip | Defines the strategy when importing a resource with broken dependencies. The default value is fail.
| ||||||||||
organization? | orgID | Destination organization for importing. The file being imported must have been exported from an organization, not the root of the server. If this argument is not specified, the organization of the user performing the operation is used. | ||||||||||
merge Organization? | true | When importing from one organization into a different organization, specify this argument. The resulting organization takes its ID from the import file. If organization IDs of import and destination do not match, and this argument is not specified, the operation stops with an error. | ||||||||||
skipThemes? | true | When this argument is specified, any themes in the import other than the default theme is ignored. Use this argument when importing catalogs from servers before release 5.5 whose themes are incompatible. | ||||||||||
includeAccess Events? | true | Restores the date, time, and user name of last modification if they are included in the catalog to import. | ||||||||||
includeAudit Events? | true | Imports audit events if they are included in the catalog. | ||||||||||
includeMonitoring Events? | true | Imports audit events if they are included in the catalog. | ||||||||||
includeServer Setting? | true | Imports server settings if they are included in the catalog. | ||||||||||
Content-Type | Content | |||||||||||
application/zip | The catalog file to import. | |||||||||||
Return Value on Success | Typical Return Values on Failure | |||||||||||
200 OK – Returns a JSON object that indicates the import was a success. | 401 Unauthorized – Import is available only to the system admin user (superuser). |
The body of the response contains the ID of the import operation needed to check its status:
To check the status of the import, use its ID in the following method:
Method | URL | ||
GET | http://<host>:<port>/jasperserver[-pro]/rest_v2/import/<import-id>/state | ||
Return Value on Success | Typical Return Values on Failure | ||
200 OK – The body of the response gives the current state of the import operation. | 404 Not Found – When the specified import ID is not found. |
Recommended Comments
There are no comments to display.