Skip to content
getgeolens.com

Delete Features Batch

POST
/datasets/{dataset_id}/features/delete/
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.

dataset_id
required
Dataset Id
string format: uuid
table_id
Table Id

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.

string
>= 1 characters <= 20 characters

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.

Media type application/json
FeatureBatchDelete

The features a batch delete removes.

object
gids
required
Gids

Ids of the features to delete, at most 1000. If any does not exist, none is deleted.

Array<integer>
>= 1 items <= 1000 items

Example generated

{
"gids": [
1
]
}

Successful Response

Media type application/json
FeatureBatchDeleted

The result of a batch delete.

object
deleted
required
Deleted

Number of features deleted.

integer
tile_cache_version
Any of:
integer

Example generated

{
"deleted": 1,
"tile_cache_version": 1
}

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"
}