Skip to main content
Sectors represent subdivisions within a greenhouse, each with its own sensors, actuators, and environmental settings.

List Sectors

tenantId
integer
required
Tenant ID
GET /api/v1/tenants/{tenantId}/sectors

Response

id
integer
Unique sector identifier
greenhouseId
integer
Parent greenhouse ID
tenantId
integer
Tenant ID
name
string
Sector name (e.g., “Tomatoes Section A”)
sectorNumber
integer
Sector number within the greenhouse
area
number
Sector area in square meters
isActive
boolean
Whether the sector is currently active

Example

cURL
curl -X GET "https://api.example.com/api/v1/tenants/1/sectors" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Get Sector by ID

GET /api/v1/tenants/{tenantId}/sectors/{sectorId}
tenantId
integer
required
Tenant ID
sectorId
integer
required
Sector ID

Create Sector

POST /api/v1/tenants/{tenantId}/sectors

Request Body

greenhouseId
integer
required
Parent greenhouse ID
name
string
required
Sector name
sectorNumber
integer
required
Sector number (unique within greenhouse)
area
number
Sector area in square meters

Example

cURL
curl -X POST "https://api.example.com/api/v1/tenants/1/sectors" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "greenhouseId": 1,
    "name": "Tomatoes Section A",
    "sectorNumber": 1,
    "area": 150.5
  }'

Update Sector

PUT /api/v1/tenants/{tenantId}/sectors/{sectorId}
tenantId
integer
required
Tenant ID
sectorId
integer
required
Sector ID

Request Body

All fields are optional for updates.
name
string
Updated sector name
area
number
Updated sector area
isActive
boolean
Activate or deactivate the sector

Delete Sector

DELETE /api/v1/tenants/{tenantId}/sectors/{sectorId}
Deleting a sector will remove all associated settings and device configurations. This action cannot be undone.

List Greenhouse Sectors

Get all sectors for a specific greenhouse.
GET /api/v1/greenhouses/{greenhouseId}/sectors
greenhouseId
integer
required
Greenhouse ID
This endpoint provides the same sector data but organized by greenhouse rather than tenant.

Build docs developers (and LLMs) love