Hi. I am trying to add an existing user to an existing group.
[python]
import requests
data = ‘className=XWiki.XWikiGroups&property#member=XWiki.User’
headers = {‘Content-type’: ‘application/xml’,}
response = requests.post(‘http://local:8080/xwiki/rest/wikis/xwiki/spaces/XWiki/pages/MyGroupPage/objects’, headers=headers, data=data,auth=(‘admin’, ‘pass’))
But I get a 405 error: {“code”:405,“contactEmail”:null,“description”:“The method specified in the request is not allowed for the resource identified by the request URI”,“homeRef”:"/",“reasonPhrase”:“Method Not Allowed”,“uri”}
10.4.6 405 Method Not Allowed
The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource.
Help me, please. What am I doing wrong?