Bulk Delete Layers Endpoint
const url = 'https://example.com/maps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/layers/bulk-delete';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"layer_ids":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]}'};
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/maps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/layers/bulk-delete \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "layer_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'Batch-delete multiple layers from a map in a single request.
One additive endpoint that reduces N sequential DELETEs to a single batched call for bulk-delete UX.
Returns 200 with deleted/failed arrays in all cases (partial failures surface inline, not as HTTP errors). Full rollback is the caller’s responsibility if all ids fail.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Body required
Section titled “ Request Body required ”Request body for POST /maps/{map_id}/layers/bulk-delete.
object
UUIDs of layers to delete. Must be 1–200 elements (matches _MAX_LAYERS_PER_MAP).
Example generated
{ "layer_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ]}Responses
Section titled “ Responses ”Successful Response
Response body for POST /maps/{map_id}/layers/bulk-delete.
object
A single layer that could not be deleted.
object
Example generated
{ "deleted": [ "example" ], "failed": [ { "id": "example", "reason": "example" } ]}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