I've managed to create a successful GET response from my Feature Layer.
What I really want to do is update the content of one of the attribute fields.
VBA
Reqeust.Open "POST" FL URL/updateFeatures&token=token from developer
Request.send(string that I created from a json response of the record I want to change, object ID and geometry included)
response says 404
am I barking up the wrong tree?
Thank you!
Solved! Go to Solution.
YES YOU CAN!
VBA
strUpdate = "edits=[{""id"":0,""updates"":[{""geometry"":{""x"":-79.404111000222429,""y"":36.07058000026683},""attributes"":{""FID"":1,""Site_ID"":""DC10001"",""Site_Name"":""New Name"",""Status"":""NFA""}}]}]"
Request.Open "POST", "featureLayerURL(no layer id #)/applyEdits?f=json&token=" & strToken, False
Request.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
Request.send (strUpdate)
Does anyone know if it is even possible change an AGOL feature layer attribute using REST?
YES YOU CAN!
VBA
strUpdate = "edits=[{""id"":0,""updates"":[{""geometry"":{""x"":-79.404111000222429,""y"":36.07058000026683},""attributes"":{""FID"":1,""Site_ID"":""DC10001"",""Site_Name"":""New Name"",""Status"":""NFA""}}]}]"
Request.Open "POST", "featureLayerURL(no layer id #)/applyEdits?f=json&token=" & strToken, False
Request.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
Request.send (strUpdate)