Error 500 Update Feature

2341
1
03-02-2011 02:25 PM
ShannakaBeveridge
New Contributor II
Hi,

I am new to REST and I'm having trouble updating a table. I can add a feature but all the attributes come back as null and when I attempt to update the record I get Error 500 "An unexpected error occurred processing the request.".

I am almost certain that there is a problem with my syntax as I get the same result when I try to update the Incident Priority sample http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/1....

The exact JSON code I'm using is:
[
{
  "feature" : 
  {
    "attributes" : {
      "objectid" : 2220, 
      "sf_311_serviceoid" : null, 
      "agree_with_incident" : 1, 
      "datetime" : null, 
      "cient_ip" : null, 
      "notes" : "I agree"
    }
  }
}
]


Format is set to JSON. Objectid 2220 is the record I added but it didn't add the attributes. Can anyone see anything wrong with the input? Does everyone else get the same error?

Cheers,

Shannaka
0 Kudos
1 Reply
RaviNarayanan
Esri Contributor
here is the syntax.
[
    {
      "attributes" : {
        "objectid" : 1,
        "sf_311_serviceoid" : null,
        "agree_with_incident" : 1,
        "datetime" : null,
        "cient_ip" : "10.0.0.1",
        "notes" : "Jeremy agreed with this."
      }
    }
  ]

You can also refer to the REST API reference for additional information about this operation.
http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/fsedits.html
0 Kudos