AnsweredAssumed Answered

ArcGIS Rest Services Problem

Question asked by generalSurvey on May 5, 2018

I have published a Layer Service on a self-created portal. After I have checked the service definition I saw that "Shape__Area" and "Shape__Length" fields are disabled. I am now trying to update feature service definition through the REST Url to enable them from JSON. "https://<myPortalUrl>/server/rest/admin/services/Hosted/<nameOfLayerService>/FeatureServer/1/addToDefinition"


I'm trying to add the following JSON configurations: 

"hasGeometryProperties" : true,
"geometryProperties" :
   "shapeAreaFieldName" : "Shape__Area",
   "shapeLengthFieldName" : "Shape__Length"

No matter what I try, either updateDefinition or addToDefinition after I hit the button I get:

Error code : 500

Message: "Field 'hasGeometryProperties' cannot be updated."

Why is this happening and how can I solve it ? 

By the way, If I try to change other attributes (say for example "name") it works perfectly, but "hasGeometryProperties" is not the only field which is getting this error. Other attributes generate same error.


Thank you in advance !!!