As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
update_site (name,login,password,url_backend,url_alfresco): s = requests.Session() data = {'username':login, 'password':password} url = url_backend+"/share/page/dologin" r = s.post(url, data=data) if (r.status_code != 200) : print "Incorrect login or password " url1='http://127.0.0.1:8080/alfresco/service/api/sites' print url_alfresco jsonString = JSONEncoder().encode({ "shortName": url_alfresco, "title" : name }) headers = {'content-type': 'application/json',"Accept":"application/json"} site = s.put(url1,headers=headers,data=jsonString) if (site.status_code != 200) : print " Error while creating site" print site.status_code return True;
s = requests.Session() data = {'username':"admin", 'password':"admin"} url = "http://127.0.0.1:8080/share/page/dologin" r = s.post(url, data=data) if (r.status_code != 200) : print "Incorrect login or password " url1="http://127.0.0.1:8080/alfresco/service/api/sites/OdooSite50" print url_alfresco jsonString = JSONEncoder().encode({ "title" : name }) headers = {'content-type': 'application/json',"Accept":"application/json"} site = s.put(url1,headers=headers,data=data) if (site.status_code != 200) : print " Error while creating site" print site.status_code