Something like this did the trick using applyEdits
def writeFeatures(self, url, where, attributeDict):
query = "?where={}&outFields=*&returnGeometry=false&f=json&token={}".format(where, self.token)
fsURL = self.protocol + self.serverName + ':' + self.serverPort + url + query
fs = arcpy.RecordSet()
fs.load(fsURL)
cursor = arcpy.SearchCursor(fs)
for row in cursor:
print('updating ' + row.getValue('AREAID'))
features = { 'attributes': {} }
for key in attributeDict.iterkeys():
if attributeDict[key] != None:
features['attributes'][key] = attributeDict[key]
else:
features['attributes'][key] = None
pass
features['attributes']['OBJECTID'] = row.getValue('OBJECTID')
params = urllib.urlencode({'updates': json.dumps([features]), 'f': 'pjson', 'token': self.token})
headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}
httpConn = httplib.HTTPConnection(self.serverName, self.serverPort)
httpConn.request("POST", self.applyEditsUrl, params, headers)
response = httpConn.getresponse()
Thanks a lot Filip