Skip to content
getgeolens.com

Bulk Delete Layers Endpoint

POST
/maps/{map_id}/layers/bulk-delete
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.

map_id
required
Map Id
string format: uuid
Media type application/json
BulkDeleteLayersRequest

Request body for POST /maps/{map_id}/layers/bulk-delete.

object
layer_ids
required
Layer Ids

UUIDs of layers to delete. Must be 1–200 elements (matches _MAX_LAYERS_PER_MAP).

Array<string>
>= 1 items <= 200 items
Example generated
{
"layer_ids": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}

Successful Response

Media type application/json
BulkDeleteLayersResponse

Response body for POST /maps/{map_id}/layers/bulk-delete.

object
deleted
required
Deleted
Array<string>
failed
required
Failed
Array<object>
BulkDeleteLayersFailure

A single layer that could not be deleted.

object
id
required
Id
string
reason
required
Reason
string
Example generated
{
"deleted": [
"example"
],
"failed": [
{
"id": "example",
"reason": "example"
}
]
}

Bad request — invalid payload

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Unauthorized — missing or invalid credentials

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Forbidden — caller lacks write access

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Not found

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Conflict — resource state prevents the operation

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Validation error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Too many requests — retry after the advertised interval

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
Retry-After
integer

Seconds until the request may be retried

Internal server error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Service unavailable — the database could not serve the request

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}