This issue has been created
 
 
XWiki Rest Server / cid:jira-generated-image-avatar-321c514d-2cf8-482c-b21b-359df95ecc8a XREST-20 Open

Upload of XAR file by REST API not working any longer in 16.x and 17.x

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-549ee70f-6394-4652-8be9-4419a47fe935 Ralf created this issue on 30/Apr/25 17:33
 
Summary: Upload of XAR file by REST API not working any longer in 16.x and 17.x
Issue Type: cid:jira-generated-image-avatar-321c514d-2cf8-482c-b21b-359df95ecc8a Bug
Assignee: Unassigned
Created: 30/Apr/25 17:33
Environment: Ubuntu/WSL, XWiki 16.10.6 + 17.3.0
Priority: cid:jira-generated-image-static-major-50e6568b-7af3-4cde-8634-82a43b5d8fe4 Major
Reporter: Ralf
Description:

It seems that the REST API for uploading XAR files (= POST on "...rest/wikis/xwiki") is not working properly since 16.x.
The following is working fine with XWiki v15.10.16, but not with v16.10.6 and also not with v17.3.0 (while in all three cases XWiki responses with "200 OK"):

Let's assume your username is "Admin" and your password is "admin".
Also, let's assume the current XWiki form token is "5OJMPDtpV5NiV8zIfOgBNA".
Last but not least, let's assume that your XWiki Server is running on http://localhost:8080/xwiki/

  • Please create a page "Test" with content "Hello!".
  • Export page "Test" to "Test.WebHome.xar".
  • Now, delete page "Test" and make sure it is really deleted.
  • Then open a terminal and run:
      curl -v -u Admin:admin -H "XWiki-Form-Token: 5OJMPDtpV5NiV8zIfOgBNA" -F "file=@./Test.WebHome.xar" localhost:8080/xwiki/rest/wikis/xwiki
  • Now page "Test" should exist again in your XWiki.

Like said, working with 15.x, but not with 16.x and 17.x

Is this a bug or am I just using wrong API calls?

Thank you very much in advance.