@Override
    public Response exportData(String download) throws NotAuthorizedException {
        securityContext.checkAdminPermissions();

        if (BooleanUtils.toBoolean(download)) {
            try {
                DownloadBean dbean = downloadManager.createDownload(DownloadType.exportJson, "/system/export"); //$NON-NLS-1$
                return Response.ok(dbean, MediaType.APPLICATION_JSON).build();
            } catch (StorageException e) {
                throw new SystemErrorException(e);
            }
        } else {
            return exportData();
        }
    }
@see ISystemResource#exportData(java.lang.String)
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/SystemResourceImpl.java