UNPKG

@esri/arcgis-rest-feature-service

Version:

Feature layer query and edit helpers for @esri/arcgis-rest-js

31 lines 1.18 kB
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc. * Apache-2.0 */ import { request, cleanUrl, appendCustomParams } from "@esri/arcgis-rest-request"; /** * Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information. * * ```js * import { deleteFeatures } from '@esri/arcgis-rest-feature-service'; * // * deleteFeatures({ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0", * objectIds: [1,2,3] * }); * ``` * * @param deleteFeaturesRequestOptions - Options for the request. * @returns A Promise that will resolve with the deleteFeatures response. */ export function deleteFeatures(requestOptions) { const url = `${cleanUrl(requestOptions.url)}/deleteFeatures`; // edit operations POST only const options = appendCustomParams(requestOptions, [ "where", "objectIds", "gdbVersion", "returnEditMoment", "rollbackOnFailure" ], { params: Object.assign({}, requestOptions.params) }); return request(url, options); } //# sourceMappingURL=delete.js.map