Add Feature by REST API Error

975
10
04-26-2021 07:26 AM
Labels (2)
StuartMoore
Occasional Contributor III

so i'm trying to add a new feature to an AGOL feature service using the Apply edits REST API the feature service is a polyline and i get this error:

{
  "addResults" : [
    {
      "objectId" : null, 
      "uniqueId" : null, 
      "globalId" : "5ED16305-D978-4C4F-951F-B87FC1479927", 
      "success" : false, 
      "error" : 
      {
        "code" : 1000, 
        "description" : "Invalid column name 'Shape_5'.\r\nInvalid column name 'Shape_7'.\r\nInvalid column name 'Shape_9'.\r\nInvalid column name 'Shape_11'.\r\nInvalid column name 'Shape_13'.\r\nInvalid column name 'Shape_15'."
      }
    }
  ]
}

 

i have even queried an existing feature and tried to re-add it using its JSON and get the same error

 

any ideas?

 

thanks

 

Stu

Tags (4)
0 Kudos
10 Replies
jcarlson
MVP Frequent Contributor

Can you share the inputs that produce this error? The error message is helpful, but without the context of what's producing it, I doubt you'll get a good answer.

- Josh Carlson
Kendall County GIS
0 Kudos
StuartMoore
Occasional Contributor III

strangely i get the same error when trying to manually create the feature in a webmap, its as thought the indexes are corrupt on the feature service

[{
      "attributes" : {
        "SUBTYPE_" : 11, 
        "ID" : "52", 
        "OWNEr" : "5", 
        "MATERIAL" : "un",
        "PrimeDriver" : "TEST", 
        "CompletedWhen" : null
      }, 
      "geometry" : 
      {
        "paths" : 
        [
          [
            [400000, 288000], 
            [400001, 288001]
          ]
        ]
      }
    }]

the above is  roughly what i was trying to use

StuartMoore
Occasional Contributor III

get the same error in Pro as the WebMap when trying to create a new feature

StuartMoore_0-1619517850634.png

 

0 Kudos
jcarlson
MVP Frequent Contributor

That's very strange. Does rebuilding the indices help anything?

Are you able to export the features? It might be worth it to export the whole layer then use the export to overwrite the feature service. Keep the data, but sort of refresh the other stuff.

- Josh Carlson
Kendall County GIS
0 Kudos
StuartMoore
Occasional Contributor III

ive exported it to an FGDB and it worked fine, just ran the check geometry tool in Arc Catalog and its highlighted 3 features with errors:

WARNING 000442: short segments at 29505

0 Kudos
StuartMoore
Occasional Contributor III

i've deleted the 3 features with errors and rebuild the indexes again but still get the same error

i'm always nervous about re-publishing in case anything gets messed up in the process...

Stu

0 Kudos
PhilLarkin1
Regular Contributor

Were you able to find a solution? I am experiencing the same problem. This appears to be correlated with a modification of the Definition properties. 
I updated the Types property from the admin interface and this issue started.

0 Kudos
StuartMoore
Occasional Contributor III

the only solution i found was to create a new feature service, i didnt want to try re-publishing the original service

 

Stu

0 Kudos
PhilLarkin1
Regular Contributor

Same here :(

0 Kudos