Docker XWiki REST Api

Is there a way to enable the PUT method for the XWiki docker image? I have tried modifying a few things with no success. I am hoping someone could shed some light on this.

curl -u admin:admin -X PUT --data-binary "@newpage.xml" -H "Content-Type: application/xml" http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/NewPage

<!doctype html><html lang="en"><head><title>HTTP Status 405 – Method Not Allowed</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 405 – Method Not Allowed</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> HTTP method PUT is not supported by this URL</p><p><b>Description</b> The method received in the request-line is known by the origin server but not supported by the target resource.</p><hr class="line" /><h3>Apache Tomcat/8.5.55</h3></body></html>%

Hello! Normally, no enabling is needed for HTTP methods for Docker environments since you are exposing the port to the host machine.
However, I was able to reproduce your problem when accessing the rest api from a container with XWiki running a Tomcat server (, but surprising the request worked well on a 10.11 with jetty.

Is it possible to not support PUT method when using Tomcat, @vmassol? Maybe I miss something.

Yeah, that what I assumed as well since the regular non-docker installation of XWiki worked just fine when using the API with PUT.

I have tried multiple things to resolve this issue like connecting directly in the container to call the API or modifying the tomcat config, but nothing seems to work. I also attempted to use POST instead of PUT and that didn’t work either as it was being treated like a GET request and return the content of the page.