BoundariesΒΆ
As a spatial data type, boundaries support filtering using spatial queries. The following example uses a GeoJSON point constructed from a longitude and latitude, and queries for boundaries in the given group whose geometry contains the point:
GET /rest/v1/boundary/?group=123&
geometry__contains={"type": "Point", "coordinates": [-122.48, 37.77]}
Geometries can contain a large amount of data, which can be inconvenient for applications where the full geometry is not needed. For such cases, a secondary "boundary envelope" endpoint may be useful:
GET /rest/v1/boundaryenvelope/?group=123
This read-only endpoint is backed by the same boundary data and supports the same filtering operations as boundary. The only difference is that the geometry returned for boundaryenvelope is the "envelope" (bounding box) of the geometry, rather than the full geometry.
In addition to the above, the API to boundaries supports the same operations (GET/POST/PUT/PATCH/DELETE) as other models, as described by the schema.