Skip to content
getgeolens.com

Replace Single Feature

PUT
/datasets/{dataset_id}/features/{gid}
curl --request PUT \
--url https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/features/1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "geometry": { "type": "GeometryCollection", "geometries": [ { "type": "Point", "coordinates": [ "example" ] } ] }, "properties": {} }'

Full replacement of a feature (PUT semantics).

dataset_id
required
Dataset Id
string format: uuid
gid
required
Gid
integer
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
FeatureReplace

Full feature replacement (PUT semantics).

object
geometry
required
Any of:
GeoJSONGeometryCollection

A GeoJSON GeometryCollection (RFC 7946 §3.1.8).

Geometry collections carry geometries instead of coordinates. Only generic-geometry datasets accept them on write.

Nested collections are rejected because PostGIS cannot round-trip them through the GeoJSON boundary.

object
type
required
Type
string
Allowed value: GeometryCollection
geometries
required
Geometries
Array<object>
GeoJSONGeometry

A GeoJSON geometry object (RFC 7946).

object
type
required
Type
string
Allowed values: Point MultiPoint LineString MultiLineString Polygon MultiPolygon
coordinates
required
Coordinates
Array
properties
required
Properties
object
key
additional properties
any

Successful Response

GeoJSONFeature

A written GeoJSON Feature, plus the dataset’s committed tile version.

object
type
Type
string
default: Feature
Allowed value: Feature
id
required
Id
integer
geometry
Any of:
GeoJSONGeometryCollection

A GeoJSON GeometryCollection (RFC 7946 §3.1.8).

Geometry collections carry geometries instead of coordinates. Only generic-geometry datasets accept them on write.

Nested collections are rejected because PostGIS cannot round-trip them through the GeoJSON boundary.

object
type
required
Type
string
Allowed value: GeometryCollection
geometries
required
Geometries
Array<object>
GeoJSONGeometry

A GeoJSON geometry object (RFC 7946).

object
type
required
Type
string
Allowed values: Point MultiPoint LineString MultiLineString Polygon MultiPolygon
coordinates
required
Coordinates
Array
properties
required
Properties
object
key
additional properties
any
table_id
Any of:
string
tile_cache_version
Any of:
integer

Example

{
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point"
}
]
}
}

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