Trying to use applyEdits to a hosted feature service in ArcGIS Online. I went to the query endpoint for the individual layer and queried out a feature which returned the features json for a single feature.
"features" : [
{
"attributes" : {
"OBJECTID" : 62428,
"ADDID" : 63649,
"LONGITUDE" : "-20.39381937",
"LATITUDE" : "57.21860018",
"geoy" : 111.95,
"geox" : 170,
"ISSHELLADDRESS" : 0,
"SHELLID" : 0,
"DuplexID" : 63650,
"ADDRESSWITHUNIT" : "WhAt NOW MaN",
"ISSHFA" : 0
},
"geometry" :
{
"x" : 170.00002741069,
"y" : 111.9500441551
}
}
]
I can take this, minus the "features" tag, and stick it in the updateFeatures for that individual feature layer and it works.
Then I put the same content in a format for the applyEdits like below, and it fails.
[
{
"id" : 0,
"adds" : [],
"updates": [
{
"geometry": {
"x" : 170.0069,
"y" : 11.9500
},
"attributes": {
"OBJECTID": 62428,
"ADDID": 63649,
"LONGITUDE": -80.39381937,
"LATITUDE": 27.21860018,
"geoy": 111.95,
"geox": 970,
"ISSHELLADDRESS": 0,
"SHELLID": 0,
"DuplexID": 63650,
"ADDRESSWITHUNIT": "It's Me I am the problem",
"ISSHFA": 0
}
}
],
"deletes": []
}
]
I have tried multiple permutations with the larger format by removing the adds and deletes leaving just the updates and it's the same thing. I get back "code" : 400... Unable to apply edits. Other times it will show the Invalid JSON Primitive in "edit"
I'm sure, like most times, I'm just missing something simple here.
Thanks as always!