tom.beckman Posted May 10, 2023 Share Posted May 10, 2023 Hello,Running jasperserver 8.02We can import/export reports without any issue from the Jasper UI, but when trying to publish/import via the REST API we are receiving the error message "import.decode.failed" when checking the status of the job.We have tried doing the export from the UI with both options on the "Import-Export Key" fields ("Server Key" and "Legacy Key") during the export to no avail. Same message about decoding failing.There are no custom keys created at this point, so I am at a bit of a loss as to what to use for the REST calls to publish correctly. I've looked at the Jasper docs, and they don't include any example references related to Keys. Only a generic HTML form example at the bottom of this import/export page...no reference to using encoding.I'm sure it is something simple that we're missing, so any help is greatly appreciated. Link to comment Share on other sites More sharing options...
anish.rai Posted May 10, 2023 Share Posted May 10, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
Badr Draifi Posted May 11, 2023 Share Posted May 11, 2023 You should be using the keyalias=deprecatedImportExportEncSecret argument in your RestAPI import/export to exchange resources from different instances with different keystore using RestAPI. See documentation here This is an example : curl --location --request POST 'http://localhost:8080/jasperserver/rest_v2/import?keyalias=deprecatedImportExportEncSecret' --header 'Accept: application/json' --header 'Content-Type: application/zip' --header 'Authorization: Basic ckljsqdlkjlkqsjd2lkqjscg==' --header 'Cookie: userLocale=en_US; JSESSIONID=10CD33082811F8778C8533F00B0FF405' --form 'file=@"/C:/export.zip"' Link to comment Share on other sites More sharing options...
tom.beckman Posted May 17, 2023 Author Share Posted May 17, 2023 Thank you for that info...I was able to get the reports exported from one server into another using the /buildomatic/ scripts with that keyalias, but I am still unable to perform the import using the REST api. I created the same headers/payload that you gave in the example, but every time I check the status of the import process, I get the "import.decode.failed" message. any suggestions? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now