Hi
I'm writing a program to automatically add new data readings to a hosted ArcGIS Online feature layer. See the request URL below:
https://services6.arcgis.com/<ID>/arcgis/rest/services/<my_table>/FeatureServer/0/addFeatures
The addFeatures request takes a payload item "features", which I can successfully send as:
[{"attributes" : {"Name" : "TestName","ColumnTwo": 2}}]
The issue: not being able to send multiple 'features' in the above section. My hunch is I am simply miss-typing the json data.
Thank you.
Solved! Go to Solution.
Features use a format like (assuming you are not including geometry):
[
{
"attributes" : {
"Name" : "TestName",
"ColumnTwo": 2
}
},
{
"attributes" : {
"Name" : "TestName2",
"ColumnTwo": 3
}
}
]
Note the coma on line 7 as it joins the next feature. Typically, the feature would include "attributes" and "geometry".
[
{
"attributes" : {
"Name" : "TestName",
"ColumnTwo": 2
},
"geometry" : {
"x" : -111.111,
"y" : 111.111
}
}
]
For more information see: Add Features
Features use a format like (assuming you are not including geometry):
[
{
"attributes" : {
"Name" : "TestName",
"ColumnTwo": 2
}
},
{
"attributes" : {
"Name" : "TestName2",
"ColumnTwo": 3
}
}
]
Note the coma on line 7 as it joins the next feature. Typically, the feature would include "attributes" and "geometry".
[
{
"attributes" : {
"Name" : "TestName",
"ColumnTwo": 2
},
"geometry" : {
"x" : -111.111,
"y" : 111.111
}
}
]
For more information see: Add Features
I knew I was missing a comma in there somewhere. Thanks mate!