I am trying to develop an API interface to link two systems. Specifically, I need to be able to QUERY a Table and Append to the table. The Quesry works great and I get back the Table's definition and the data.
"https://services2.arcgis.com/Item_ID/ArcGIS/rest/services/Table_Name/FeatureServer/0/query?&token=....."
Postdata = "&f=json&objectIds=" . $featureId . "&outFields=Fielda,Fieldb,FID";
But, I am unable to find an example of what the JSON Postdata needs to be for the addFeatures Post.
"https://services2.arcgis.com/Item_ID/ArcGIS/rest/services/Table_Name/FeatureServer/0/addFeatures?"
By the way, the query gives me {Root}.features[0].attributes{"Field":data}
Any pointers to the right documentation or some samples would be appreciated.
TIA..
PS: The customer has specified that this is a PHP solution using curl and a Python solution.
Solved! Go to Solution.
So I solved this -- My issue was that I was sending the data as a payload package and it needed to be submitted as a parameter on the URL string.
Bump as I have made some progress but I am still stuck and a quick update --
I am getting a Response: {"error":{"code":400,"message":"","details":["Invalid parameters"]}}
But I can't determine what Parameters are Invalid / Missing in this post.
My post data is --
{"attributes":{"Radio":"364","Alias":"MGS364","Group":"Home _Group","Primary_Group":"Home_Guard","Secondary_Group":""}}
If I paste this into the Data Rest window it does add the data --
So I solved this -- My issue was that I was sending the data as a payload package and it needed to be submitted as a parameter on the URL string.