Delete a zone by ID
DELETE/zones/:zoneId
The Delete Zone request allows you to remove a zone from the Map. This request takes in the zone's unique ID as a parameter, and will permanently delete the zone.
In another case, you can have an toggleActive zone request that allows you to update the isActive property of a zone. Setting the isActive property to false will disable the zone in that map without deleting it completely.
Request
Path Parameters
The ID of the zone to retrieve, update or delete
Responses
- 200
- 401
- 403
- 404
- 500
Zone deleted
- application/json
- Schema
- Example (from schema)
Schema
- GeoJSONPoint
- GeoJSONLineString
- GeoJSONPolygon
Possible values: >= 3 characters and <= 50 characters
Possible values: [restricted, warning, blink, buzzer, speed, no-plan]
Default value: true
Possible values: [Feature]
GeoJSON type of the zone, always Feature
geometry object
Possible values: [Point]
Possible values: [LineString]
Possible values: [Polygon]
map object
Possible values: >= 3 characters and <= 50 characters
createdBy object
The user who created this zone
updatedBy object
The user who last updated this zone
The date and time this zone was created
The date and time this zone was last updated
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"category": "restricted",
"isActive": true,
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-73.989,
40.735
]
},
"map": {
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"properties": {},
"createdBy": {
"_id": "string",
"name": "string",
"email": "user@example.com"
},
"updatedBy": {
"_id": "string",
"name": "string",
"email": "user@example.com"
},
"createdAt": "2024-12-03T13:26:27.535Z",
"updatedAt": "2024-12-03T13:26:27.535Z"
}
Unauthorized.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Authentication token not provided."
}
{
"message": "Authentication token not provided."
}
Forbidden.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Access to this resource is forbidden."
}
{
"message": "Access to this resource is forbidden."
}
Resource not found.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Resource not found."
}
{
"message": "Resource not found."
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Internal Server Error. Please try again later."
}
{
"message": "Internal Server Error. Please try again later."
}