urlParams = "[{'attributes' : {'AssetNumber' : '" + asset + "', 'Description' : '" + description + "'}}]";
var url = esri.urlToObject("http://xxxxx/ArcGIS/rest/services/ArcGISOnline/FOGIncidents/FeatureServer/1/addFeatures?features=" + urlParams + "&f=json");
var requestHandle = esri.request({
url: url.path,
content: url.query,
load: addFogRequestSucceeded,
error: addFogRequestFailed
}, {useProxy:true, usePost:true});urlParams = "'where' : 'incidentID = 1'";
var url = esri.urlToObject("http://xxx/ArcGIS/rest/services/ArcGISOnline/FOGIncidents/FeatureServer/1/deleteFeatures?" + urlParams + "&f=json");
var requestHandle = esri.request({
url: url.path,
content: url.query,
//load: delFogRequestSucceeded,
//error: delFogRequestFailed
}, {useProxy:true, usePost:true});var url = esri.urlToObject("http://webservices.nwmaps.net/ArcGIS/rest/services/ArcGISOnline/FOGIncidents/FeatureServer/1/applyEdits?deletes=" + String(incidentID) + "&f=json");Zorba, I'm having the same issue. There's no examples of the "deleteFeatures" request syntax anywhere. So frustrating.
Zorba and Eric -
I'm sure you two have moved on from whatever you were working. But in the hopes clearing up the above requests for future people - See using REST "delete features" in arcgis api for javascript - Geographic Information Systems Stack Exc...
This should be you answer:
esriRequest({
"url": "http://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0/deleteFeat...",
"content": {
"objectIds": 123,
"f": "json"
}
}, {"usePost": true
});