Zone

A Zone corresponds to a user-defined “area” on the map, and is typically used in reporting summaries, or in the creation of alarms. A Zone can be scaled to cover for instance a building, or an entire country.

URL Structure is:
https://api.trackunit.com/public/Zone

GetZone

Will list parameters on a specified zone.

Parameters

NameData typeUnit of measurementNote
id *StringN/AUnique identifier.

Columns

Refer to the following table for description of columns:

NameData typeUnit of measurementNullabilityNote
idStringN/AFALSEUnique identifier.
nameStringN/AFALSE
noteStringN/ATRUE
iconStringN/ATRUE
polygonStringN/AFALSEWKT format.

Request (example)

{
    "id": "6295"
}

Response

{
         "list":[
            {
               "id": "6295",
               "name": "Pauliström",
               "note": "Fabrik",
               "icon": "24x24/factory.png",
               "polygon": "POLYGON ((57.473227623291542 15.510871410369873, 
               57.472777652023382 15.507717132568359, 57.47108155666789 
               15.507910251617432, 57.469593081600394 15.508832931518555, 
               57.469443076874207 15.509905815124512, 57.468727661247641 
               15.510399341583252, 57.468554574717778 15.510399341583252, 
               57.468681504919836 15.511257648468018, 57.46926999373273 
               15.511300563812256, 57.469673853121016 15.511257648468018, 
               57.469258454827468 15.511600971221924, 57.469350765967427 
               15.512566566467285, 57.470343095995467 15.512416362762451, 
               57.471912307086896 15.511794090270996, 57.473227623291542 
               15.510871410369873))"
            }
         ]
}
 

CreateZone

Parameters

Will create a new zone.

NameData typeUnit of measurementNote
name *StringN/AName of zone.
noteStringN/A
polygon *StringN/AWKT format.

Request (example)

{
        "name": "Pauliström factory",
        "note": "Factory premises",
        "polygon": "POLYGON ((57.473227623291542 15.510871410369873, 
                 57.472777652023382 15.507717132568359, 57.47108155666789 
                 15.507910251617432, 57.469593081600394 15.508832931518555, 
                 57.469443076874207 15.509905815124512, 57.468727661247641 
                 15.510399341583252, 57.468554574717778 15.510399341583252, 
                 57.468681504919836 15.511257648468018, 57.46926999373273 
                 15.511300563812256, 57.469673853121016 15.511257648468018, 
                 57.469258454827468 15.511600971221924, 57.469350765967427 
                 15.512566566467285, 57.470343095995467 15.512416362762451, 
                 57.471912307086896 15.511794090270996, 57.473227623291542 
                 15.510871410369873))"
}

Response

{
    "id": "6295"
}
 

UpdateZone

Will update parameters on an existing zone.

Parameters

NameData typeUnit of measurementNote
id *StringN/AUnique identifier.
nameStringN/AName of zone.
noteStringN/A
polygonStringN/AWKT format.

Request (example)

{
     "id": "6295",
     "name": "Pauliström factory",
     "note": "Factory premises"
}

Response

{}
 

DeleteZone

Will delete an existing zone.

Parameters

NameData typeUnit of measurementNote
id *StringN/AUnique identifier.

Request (example)

{
    "id": "6294"
}

Response

{}