Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This guide provides information about how to work with sectors. The sector is necessary for your digital twin since layouts (models) are stored in sectors.

Configuration

To connect sectors with twinzo digital twinDigital Twin, visit the course page and find out, how to set up a sector:

The main information about how to use twinzo´s twinzo's REST API and how to authorize your access:

Swagger Sector Section

The Swagger Sensors section provides a detailed description of the API for the sector. We can use /sectors or /sectors/{id} for specific sectors to get information about sectors.

Image RemovedImage Added

/sectors

  • use for getting a list of sectors from branche

/sectors/{id}

  • get specific sector’s information according to the id

Example

There are examples for both /sectors and /sectors/{id} calls below. First is the response you get and then the image with the parameters you have to call for the correct answer. The whole request URL: https://api.twinzo.eu/v3.0/sectors / https://api.twinzo.eu/v3.0/sectors/14

/sectors

Code Block
languagejson
[
  {
    "Id": 14,
    "Guid": "9aa01f37-5261-4ad2-b0d7-e24ee7c00495",
    "BranchId": 7,
    "Title": "1. floor",
    "BarrierHeight": 1046.15381,
    "BarrierWidth": 1089.65515,
    "SectorWidth": 31600,
    "SectorHeight": 13600,
    "Modified": 1676545627755,
    "GpsItems": [],
    "Areas": [],
    "Barriers": [],
    "Beacons": [],
    "Sensors": [],
    "Paths": []
  },
  {
    "Id": 15,
    "Guid": "fc9b4752-601d-42de-864e-db5adbc664f1",
    "BranchId": 7,
    "Title": "Ground",
    "BarrierHeight": 1000,
    "BarrierWidth": 1000,
    "SectorWidth": 161500,
    "SectorHeight": 178000,
    "Modified": 1644479731473,
    "GpsItems": [],
    "Areas": [],
    "Barriers": [],
    "Beacons": [],
    "Sensors": [],
    "Paths": []
  }
]
Image RemovedImage Added

/sectors/{id} (/sectors/14)

Code Block
languagejson
{
  "Id": 14,
  "Guid": "9aa01f37-5261-4ad2-b0d7-e24ee7c00495",
  "BranchId": 7,
  "Title": "1. floor",
  "BarrierHeight": 1046.15381,
  "BarrierWidth": 1089.65515,
  "SectorWidth": 31600,
  "SectorHeight": 13600,
  "Modified": 1676545627755,
  "GpsItems": [],
  "Areas": [],
  "Barriers": [],
  "Beacons": [],
  "Sensors": [],
  "Paths": []
}
Image RemovedImage Added

Data Properties

The request answer you get is JSON with the single area (one object) or a list of areas (more objects) in the requested branch. Every object contains 15 parameters.

Id

An integer that represents

sectos

sectors id.

Guid

A string that represents

uniq sector´s

a unique sector's id.

BranchId

An integer that represents Branch id

Title

A string that represents the name of the sector.

BarrierHeight

A float that represents the height of the barriers in

millimetres

millimeters (mm).

BarrierWidth

A float that represents the weight of the barriers in

millimetres

millimeters (mm).

SectorWidth

A float that represents the height of the sector in

millimetres

millimeters (mm).

SectorHeight

A float that represents the weight of the sector in

millimetres

millimeters (mm).

Modified

A Unix timestamp in milliseconds that represents the time when the data was modified.

GpsItems

A field with the GpsItems.

Areas

A field with the Areas.

Barriers

A field with the Bariers.

Beacons

A field with the Beacons.

Sensors

A field with the Sensors.

Paths

A field with the Paths.

Info

GpsItems, Areas, Barriers, Beacons, Sensors, and Paths you can request by Open Data Option. More information about it you can find in Basics.