Delete Features Batch
const url = 'https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/features/delete/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"gids":[1]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/features/delete/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "gids": [ 1 ] }'Delete up to 1,000 features by gid in one transaction (hard delete).
Either every listed feature is deleted or none is. If any gid does not
exist, the request is refused with 404, detail.code feature_not_found
and the missing ids in detail.gids. A gid listed twice is deleted once.
Takes the checks and the table_id a single delete takes, and writes one
feature.bulk_delete audit entry.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Query Parameters
Section titled “ Query Parameters ”The table_id the feature was read with. If the dataset’s data has been replaced since, the request is refused with 409 and code dataset_replaced, and nothing is written.
The table_id the feature was read with. If the dataset’s data has been replaced since, the request is refused with 409 and code dataset_replaced, and nothing is written.
Request Bodyrequired
Section titled “ Request Bodyrequired ”The features a batch delete removes.
object
Ids of the features to delete, at most 1000. If any does not exist, none is deleted.
Example generated
{ "gids": [ 1 ]}Responses
Section titled “ Responses ”Successful Response
Bad request — invalid payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks write access
Not found
Conflict — resource state prevents the operation
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “ Headers ”Seconds until the request may be retried
Internal server error
Service unavailable — the database could not serve the request