Get Single Feature
const url = 'https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/features/1';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/features/1 \ --header 'Authorization: Bearer <token>'Get a single GeoJSON feature by gid.
table_id identifies the data table the feature was read from. Send it
with a later PUT, PATCH or DELETE of the feature so that write is refused
if the dataset’s data has been replaced in between.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Responses
Section titled “ Responses ”Successful Response
A GeoJSON Feature, plus the id of the table it was read from.
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 query parameters or payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks access to this resource
Not found
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