updateFeatures fails on Feature Layer

10-25-2015 09:46 PM
New Contributor


I have set up a feature service which is meant to be edited via the server REST API. The addFeatures endpoint works perfectly, however when I try to use updateFeatures, I get the following response:


"error": {

  "code": 400,

  "message": "Unable to complete operation.",

  "details": [

  "Object is Missing."




The feature layer is versioned and ownership based permissions are on, however anyone is allowed to update. This seems to me more like I'm missing an attribute.

The features I send look like this:

[{"geometry":{"rings":[[[-96.35172843933105,39.999470750892826],[-96.35172843933105,39.99966389309993],[-96.35117590427399,39.99966389309993],[-96.35117590427399,39.999470750892826],[-96.35172843933105,39.999470750892826]]],"spatialReference":{"wkid":4326}},"attributes":{"OBJECTID ":32943,"proragis_id":"eqerqer","parkid":"Null","park_id":null,"featurename":"Null","address":"Null","citymuni":"Null","county":"Null","state":"Null","streetnum":"Null","streetname":"Null","streettype":"Null","zip":"Null","reference":"Null","refcomment":"Null","park_acres":null,"acresource":"Null","yearopen":null,"parkstatus":"Null","statuscmnt":"Null","parktype":"Null","servicarea":"Null","mgtpriorty":"Null","landowner":"Null","ownertype":"Null","agencyname":"Null","agencytype":"Null","acqsource":"Null","acqmethod":"Null","acqcomment":"Null","devsource":"Null","devcomment":"Null","restricts":"Null","lwcfprot":"Null","otherprot":"Null","resprtcmnt":"Null","editor":"3153-46330","unit":"Null","unit_id":"Null","unit_acres":null,"lasteditor":"3153-46330","id":null}}]

0 Kudos
1 Reply
by MVP

I realize this is an old thread and most likely not helpful for you, but posting for the community what we ran into..

We have a server side utility that uses the feature server 'apply edits' operations and that utility crafts a JSON payload based on the Esri API Spec.  

We ran into a similar response at v10.8.1 but there was an extended error code - 

https://server:443/arcgis/rest/services/folder/service/FeatureServer/6/applyEdits?f=json, STATUS_CODE 200, 47 ms, POST

Buffer="{"addResults":[],"updateResults":[{"objectId":15468,"success":false,"error":{"code":1011,"extendedCode":-2147467259,"description":"Object is Missing."}}],"deleteResults":[]}"

In this case, the server side utility had a bug where it was posting to the wrong layer ID (layer ID 6 in this case... it should have been layer id 0).  I think the error message "Object is Missing" is really saying that the underlying "Object ID" in that layer is missing...  

Just some feedback.  

REF Feature service error codes—ArcGIS REST API | ArcGIS for Developers 


0 Kudos