Check a feature create without saving
const url = 'https://example.com/api/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/features/dry-run/';const options = { method: 'POST', 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 POST \ --url https://example.com/api/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/features/dry-run/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "geometry": { "type": "GeometryCollection", "geometries": [ { "type": "Point", "coordinates": [ "example" ] } ] }, "properties": {} }'Check a feature create without writing it.
Takes the body POST /datasets/{dataset_id}/features/ takes and runs
every check that create runs, the database’s own casts and constraints
included, so a body it would refuse is refused here with the same status
and body. A deferred constraint is checked here too: a create that breaks
one fails at commit with a 500, and this answers 400. Nothing is written.
A body that passes gets 200 with the feature as it would be stored, or a
FeatureCollection of them in request order, with no id, table_id or
tile_cache_version.
A dataset whose table has a shape that lets an insert run code with effects outside the transaction, such as a trigger, a CHECK constraint or a user-defined column type, is refused with 409, and the detail names those shapes. The insert still runs column defaults, type input functions and index support functions, volatile defaults included, so a dry run can consume sequence values and stored ids can have gaps.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Bodyrequired
Section titled “ Request Bodyrequired ”GeoJSON-style feature for insertion.
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
A GeoJSON FeatureCollection whose features are inserted together.
object
Features to insert in one transaction, at most 1000. If any is refused, none is inserted.
GeoJSON-style feature for insertion.
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
Responses
Section titled “ Responses ”The feature or features as they would be stored. Nothing was written.
A feature as a create would store it, from a dry run that stored nothing.
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
The features a FeatureCollection create would store, in request order.
object
A feature as a create would store it, from a dry run that stored nothing.
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
Payload too large
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