applyEdits
FunctionapplyEdits(requestOptions: IApplyEditsOptions): Promise<IApplyEditsResult>
Apply edits request. See the REST Documentation for more information.
import { applyEdits } from '@esri/arcgis-rest-feature-service';
//
applyEdits({
url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
adds: [{
geometry: { x: -120, y: 45, spatialReference: { wkid: 4326 } },
attributes: { status: "alive" }
}],
updates: [{
attributes: { OBJECTID: 1004, status: "alive" }
}],
deletes: [862, 1548]
})
.then(response)
Parameters
Parameter | Type | Notes |
---|---|---|
request | IApplyEditsOptions | Options for the request. |
Returns
Promise<IApplyEditsResult>
A Promise that will resolve with the applyEdits response.