Create Feature
const url = 'https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/features/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"geometry":{"geometries":[{"coordinates":["example"],"type":"Point"}],"type":"GeometryCollection"},"properties":{}}'};
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/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/features/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "geometry": { "geometries": [ { "coordinates": [ "example" ], "type": "Point" } ], "type": "GeometryCollection" }, "properties": {} }'Insert a new GeoJSON feature into a dataset.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”GeoJSON-style feature for insertion.
object
A GeoJSON GeometryCollection (RFC 7946 §3.1.8).
fix(#430 codex r9): carries geometries instead of coordinates, so
it needs its own model — only generic-GEOMETRY datasets accept it on write
(enforced in the service), and any stored collection must serialize back
out on read.
Deliberately NON-recursive (codex r13, refuted): PostGIS cannot round-trip nested collections through the GeoJSON boundary in either direction — ST_GeomFromGeoJSON rejects them on write and ST_AsGeoJSON raises ‘GeoJson: geometry not supported’ on read — so a recursive model could never receive one and would only convert the write-side 422 into a raw database 500. The write schemas add a raw-payload guard for a clear 422.
object
A GeoJSON geometry object (RFC 7946).
object
A GeoJSON geometry object (RFC 7946).
object
Responses
Section titled “ Responses ”Successful Response
A single GeoJSON Feature.
object
A GeoJSON GeometryCollection (RFC 7946 §3.1.8).
fix(#430 codex r9): carries geometries instead of coordinates, so
it needs its own model — only generic-GEOMETRY datasets accept it on write
(enforced in the service), and any stored collection must serialize back
out on read.
Deliberately NON-recursive (codex r13, refuted): PostGIS cannot round-trip nested collections through the GeoJSON boundary in either direction — ST_GeomFromGeoJSON rejects them on write and ST_AsGeoJSON raises ‘GeoJson: geometry not supported’ on read — so a recursive model could never receive one and would only convert the write-side 422 into a raw database 500. The write schemas add a raw-payload guard for a clear 422.
object
A GeoJSON geometry object (RFC 7946).
object
A GeoJSON geometry object (RFC 7946).
object
object
Example
{ "geometry": { "geometries": [ { "type": "Point" } ], "type": "GeometryCollection" }, "type": "Feature"}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