Skip to main content

Create a new zone

POST 

/zones

The Create Zone request allows you to create a new zone for the current active map in ANSCER Robot. The request body should contain the GeoJSON data of the zone to be created, along with other properties such as the name and category of the zone.

Note: The isActive property is set to true by default when a new zone is created. This means that the zone is immediately available for use in ANSCER Robot.

Request

Body

required
    name stringrequired

    Possible values: >= 3 characters and <= 50 characters

    A unique name of the zone

    category zoneTypesrequired

    Possible values: [restricted, warning, blink, buzzer, speed, no-plan]

    type string

    Possible values: [Feature]

    GeoJSON type of the zone, always Feature

    geometry object required
    oneOf
    type stringrequired

    Possible values: [Point]

    coordinates double[]required
    properties object

Responses

Zone created

Schema
    _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
    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

Loading...