Replace Single Feature
const url = 'https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/features/1';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"geometry":{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":["example"]}]},"properties":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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).
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 ”Full feature replacement (PUT semantics).
object
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
A GeoJSON geometry object (RFC 7946).
object
A GeoJSON geometry object (RFC 7946).
object
object
Responses
Section titled “ Responses ”Successful Response
A written GeoJSON Feature, plus the dataset’s committed tile version.
object
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
A GeoJSON geometry object (RFC 7946).
object
A GeoJSON geometry object (RFC 7946).
object
object
Example
{ "type": "Feature", "geometry": { "type": "GeometryCollection", "geometries": [ { "type": "Point" } ] }}Example generated
exampleBad 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