/
Sectors API

Sectors API

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 Twin, visit the course page and find out, how to set up a sector:

The main information about how to use 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.

/sectors

  • use for getting a list of sectors

/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

[ { "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": [] } ]

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

{ "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": [] }

 

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 sectors id.

Guid

A string that represents 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 millimeters (mm).

BarrierWidth

A float that represents the weight of the barriers in millimeters (mm).

SectorWidth

A float that represents the height of the sector in millimeters (mm).

SectorHeight

A float that represents the weight of the sector in 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.

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

Related content

Authorization
Read with this
Area API
More like this
Sensors Data
Read with this
Beacons API
More like this
Sensors API
More like this
Localization Data
Localization Data
More like this

If you encounter any issues or need assistance with using this product, please do not hesitate to reach out for support. Our team is here to help you resolve any problems and answer any questions you may have.
To create a support ticket, visit our support portal at https://partner.twinzo.eu/helpdesk/customer-care-1