Get a list of zones
GET/zones
The Get All Zones request allows users to retrieve a list of all the zones that are associated with the current active map in ANSCER ROBOT.
Request
Responses
- 200
- 401
- 403
- 500
A list of zones
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- GeoJSONPoint
- GeoJSONLineString
- GeoJSONPolygon
- ]
_id uuid
name string
Possible values: >= 3 characters and <= 50 characters
category zoneTypes
Possible values: [restricted, warning, blink, buzzer, speed, no-plan]
isActive boolean
Default value: true
type string
Possible values: [Feature]
GeoJSON type of the zone, always Feature
geometry object
oneOf
type stringrequired
Possible values: [Point]
coordinates double[]required
type stringrequired
Possible values: [LineString]
coordinates array[]required
type stringrequired
Possible values: [Polygon]
coordinates array[]required
map object
_id uuid
name string
Possible values: >= 3 characters and <= 50 characters
properties object
createdBy object
The user who created this zone
_id string
name string
email email
updatedBy object
The user who last updated this zone
_id string
name string
email email
createdAt date-time
The date and time this zone was created
updatedAt date-time
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.506Z",
"updatedAt": "2024-12-03T13:26:27.506Z"
}
]
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."
}
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."
}
Loading...