post https://api.iotgps.io/v1/boundaries
Creates a new boundary.
A boundary is a geometric representation of an area in the map.
It's supported two types of boundaries:
-
Polygon: A closed shape with a minimum of 3 points, following the GeoJSON specification.
{ "name": "Public API", "location": "369 Ruth Avenue, Mountain View CA 94043", "color": "#f39c12", "geometry": { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ [ [-82.81825581828694, 27.272793738633794], [-82.81756917276694, 27.253974491105872], [-82.80164757977124, 27.253743561153087], [-82.80207673322127, 27.272832220677213], [-82.81825581828694, 27.272793738633794] ] ] }, } }
-
Circle: A circular area defined by a center point and a radius in Kms. Since GeoJSON doesn't support circles, the circle definition can be sent in the properties field as follow:
{ "name": "Public API", "location": "369 Ruth Avenue, Mountain View CA 94043", "color": "#f39c12", "geometry": { "type": "Feature", "properties": { "isCircle": true, "radiusInKm": 2, "center": [1, 2], }, } }
All fields are required. Boundary will be created with status = 'active'.