The Butlr GraphQL API provides developers with powerful tools for resource management and customization. Use the introspection below to explore the schema, including available queries, mutations, and data types, enabling seamless interaction with assets such as buildings, floors, rooms, sensors, and hives.

For more detailed guidance and additional resources, visit the Butlr Developer Documentation.

API Endpoints
https://api.butlr.io/api/v3/graphql
Headers
# Requires a JWT from Butlr to authenticate any graphql request.
Authorization: Bearer YOUR_JWT_HERE

Queries

alertConfigs

Description

Fetch all alert configs for your account

Response

Returns [AlertConfig!]

Example

Query
query alertConfigs {
  alertConfigs {
    id
    name
    event_types
    status
    filters
    channels
    cooldown_mins
  }
}
Response
{
  "data": {
    "alertConfigs": [
      {
        "id": 4,
        "name": "abc123",
        "event_types": ["CAPACITY_EXCEEDED_ROOM"],
        "status": false,
        "filters": {},
        "channels": {},
        "cooldown_mins": 123
      }
    ]
  }
}

building

Description

Retrieve a specific building by its unique identifier

Response

Returns a Building

Arguments
Name Description
id - ID
customID - ID

Example

Query
query building(
  $id: ID,
  $customID: ID
) {
  building(
    id: $id,
    customID: $customID
  ) {
    id
    name
    capacity {
      mid
      max
    }
    floors {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    building_number
    buildingNumber
    address {
      lines
      country
    }
    site {
      id
      name
      buildings {
        ...BuildingFragment
      }
      siteNumber
      airportCode
      airportCoords {
        ...CoordsFragment
      }
      timezone
    }
  }
}
Variables
{"id": "4", "customID": 4}
Response
{
  "data": {
    "building": {
      "id": "4",
      "name": "xyz789",
      "capacity": Capacity,
      "floors": [Floor],
      "building_number": 987,
      "buildingNumber": 123,
      "address": Address,
      "site": Site
    }
  }
}

buildings

Description

Retrieve all buildings in your account

Response

Returns a Buildings!

Example

Query
query buildings {
  buildings {
    data {
      id
      name
      capacity {
        ...CapacityFragment
      }
      floors {
        ...FloorFragment
      }
      building_number
      buildingNumber
      address {
        ...AddressFragment
      }
      site {
        ...SiteFragment
      }
    }
  }
}
Response
{"data": {"buildings": {"data": [Building]}}}

floor

Description

Look up a single floor. Returns null if the floor does not exist

Response

Returns a Floor

Arguments
Name Description
id - ID
customID - ID

Example

Query
query floor(
  $id: ID,
  $customID: ID
) {
  floor(
    id: $id,
    customID: $customID
  ) {
    id
    building_id
    building {
      id
      name
      capacity {
        ...CapacityFragment
      }
      floors {
        ...FloorFragment
      }
      building_number
      buildingNumber
      address {
        ...AddressFragment
      }
      site {
        ...SiteFragment
      }
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    timezone
    area {
      value
      unit
    }
    capacity {
      mid
      max
    }
    installation_date
    installation_status
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    hives {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      is_sleep_time
      sensors {
        ...SensorFragment
      }
      note
      model
      model_name
      installed
      device_status
      is_clone
      source_serial_number
      client_id
      floor_id
      room_id
      hive_id
      serial_number
      hive_version
      hive_type
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      last_network_id
      is_streaming
      activated_at
      is_online
      net_path_stability
      connection_health {
        ...ConnectionHealthHiveFragment
      }
    }
    last_battery_change_date
    next_battery_change_date
    floor_plans {
      floor_plan_id
      coordinates
      name
      url
    }
    floorNumber
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    rooms {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    units {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
    buildingId
    algorithm_config
    end_of_day_time
    end_of_day_occupancy
    is_building_data_source
    exclude_from_building_view
    is_demo
    floor_id
    client_id
  }
}
Variables
{"id": 4, "customID": 4}
Response
{
  "data": {
    "floor": {
      "id": "4",
      "building_id": "4",
      "building": Building,
      "metadata": MetaData,
      "name": "xyz789",
      "timezone": "abc123",
      "area": Area,
      "capacity": Capacity,
      "installation_date": 123,
      "installation_status": "NOT_INSTALLED",
      "sensors": [Sensor],
      "hives": [Hive],
      "last_battery_change_date": "10:15:30Z",
      "next_battery_change_date": "10:15:30Z",
      "floor_plans": [FloorPlan],
      "floorNumber": 987,
      "tags": [Tag],
      "rooms": [Room],
      "zones": [Zone],
      "units": [Unit],
      "spots": [Spot],
      "buildingId": 4,
      "algorithm_config": {},
      "end_of_day_time": "abc123",
      "end_of_day_occupancy": 987,
      "is_building_data_source": true,
      "exclude_from_building_view": false,
      "is_demo": true,
      "floor_id": 4,
      "client_id": "xyz789"
    }
  }
}

floors

Description

Fetch information about floors with the specified IDs

Response

Returns a Floors!

Arguments
Name Description
ids - [String!] The ids of the floors to fetch. (ie. ["space_xxxxxxxx"])

Example

Query
query floors($ids: [String!]) {
  floors(ids: $ids) {
    data {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
  }
}
Variables
{"ids": ["abc123"]}
Response
{"data": {"floors": {"data": [Floor]}}}

floorsByTag

Description

Fetch information about floors with the specified tags

Response

Returns a Floors!

Arguments
Name Description
tagIDs - [String!]
useOR - Boolean

Example

Query
query floorsByTag(
  $tagIDs: [String!],
  $useOR: Boolean
) {
  floorsByTag(
    tagIDs: $tagIDs,
    useOR: $useOR
  ) {
    data {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
  }
}
Variables
{"tagIDs": ["abc123"], "useOR": true}
Response
{"data": {"floorsByTag": {"data": [Floor]}}}

hives

Description

Fetch information about hives with the specified IDs or serial numbers

Response

Returns a Hives!

Arguments
Name Description
ids - [String!] The ids of the hives to fetch. (ie. ["hive_xxxxxxxx"])
serial_numbers - [String!] The serial numbers of the hives to fetch. (ie. ["1000000abc123"])
returnPlaceholders - Boolean Exclude placeholder hives from the results
device_status - DeviceStatus Filter by device status (ACTIVE or ARCHIVED). If not provided, returns all devices

Example

Query
query hives(
  $ids: [String!],
  $serial_numbers: [String!],
  $returnPlaceholders: Boolean,
  $device_status: DeviceStatus
) {
  hives(
    ids: $ids,
    serial_numbers: $serial_numbers,
    returnPlaceholders: $returnPlaceholders,
    device_status: $device_status
  ) {
    data {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      is_sleep_time
      sensors {
        ...SensorFragment
      }
      note
      model
      model_name
      installed
      device_status
      is_clone
      source_serial_number
      client_id
      floor_id
      room_id
      hive_id
      serial_number
      hive_version
      hive_type
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      last_network_id
      is_streaming
      activated_at
      is_online
      net_path_stability
      connection_health {
        ...ConnectionHealthHiveFragment
      }
    }
  }
}
Variables
{
  "ids": ["xyz789"],
  "serial_numbers": ["abc123"],
  "returnPlaceholders": false,
  "device_status": "ACTIVE"
}
Response
{"data": {"hives": {"data": [Hive]}}}

insightBoard

Description

Fetch a single insight board by ID, including its full model JSONB. Returns null if the board doesn't exist or the caller's org doesn't own it

Response

Returns an InsightBoard

Arguments
Name Description
id - ID!

Example

Query
query insightBoard($id: ID!) {
  insightBoard(id: $id) {
    id
    createdBy
    folder
    name
    description
    tags
    model
    shareKey
    shared
    version
    createdAt
    updatedAt
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "insightBoard": {
      "id": 4,
      "createdBy": "abc123",
      "folder": "xyz789",
      "name": "xyz789",
      "description": "xyz789",
      "tags": ["abc123"],
      "model": {},
      "shareKey": "xyz789",
      "shared": false,
      "version": 123,
      "createdAt": "xyz789",
      "updatedAt": "xyz789"
    }
  }
}

insightBoards

Description

List insight boards in the caller's org. Returns slim summaries (no model JSONB) — fetch the full board via insightBoard(id:) when the user opens it.

Parameters:

  • limit — page size, default 50, clamped server-side to [1, 200]
  • offset — page offset, default 0
  • q — optional case-insensitive substring match on name
  • folder — optional folder-label filter
  • tag — optional single-tag filter (uses GIN index)
Response

Returns an InsightBoardConnection!

Arguments
Name Description
limit - Int Default = 50
offset - Int Default = 0
q - String
folder - String
tag - String

Example

Query
query insightBoards(
  $limit: Int,
  $offset: Int,
  $q: String,
  $folder: String,
  $tag: String
) {
  insightBoards(
    limit: $limit,
    offset: $offset,
    q: $q,
    folder: $folder,
    tag: $tag
  ) {
    items {
      id
      createdBy
      folder
      name
      description
      tags
      shareKey
      shared
      version
      createdAt
      updatedAt
    }
    total
  }
}
Variables
{
  "limit": 50,
  "offset": 0,
  "q": "xyz789",
  "folder": "xyz789",
  "tag": "xyz789"
}
Response
{
  "data": {
    "insightBoards": {
      "items": [InsightBoardSummary],
      "total": 123
    }
  }
}

room

Description

Look up a single room. Returns null if the room does not exist

Response

Returns a Room

Arguments
Name Description
id - ID
customID - ID

Example

Query
query room(
  $id: ID,
  $customID: ID
) {
  room(
    id: $id,
    customID: $customID
  ) {
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    area {
      value
      unit
    }
    coordinates
    capacity {
      mid
      max
    }
    rotation
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    note
    pir_zero_enable
    pir_zero_threshold
    pir_zero_window
    algorithm_config
    room_id
    client_id
    floor_id
    color
    room_type
    auto_calibrated_at
  }
}
Variables
{"id": 4, "customID": 4}
Response
{
  "data": {
    "room": {
      "id": "4",
      "floor": Floor,
      "metadata": MetaData,
      "name": "xyz789",
      "area": Area,
      "coordinates": [123.45],
      "capacity": Capacity,
      "rotation": 987.65,
      "tags": [Tag],
      "sensors": [Sensor],
      "spots": [Spot],
      "unit": Unit,
      "note": "abc123",
      "pir_zero_enable": true,
      "pir_zero_threshold": 987.65,
      "pir_zero_window": 123,
      "algorithm_config": {},
      "room_id": "4",
      "client_id": "xyz789",
      "floor_id": "abc123",
      "color": [987.65],
      "room_type": "abc123",
      "auto_calibrated_at": 987
    }
  }
}

rooms

Description

Fetch information about rooms with the specified IDs

Response

Returns a Rooms!

Arguments
Name Description
ids - [String!] The ids of the rooms to fetch. (ie. ["room_xxxxxxxx"])
org_ids - [String!] Restrict results to rooms belonging to these organizations (ie. ["org_xxxxxxxx"]). Internal JWTs filter across all organizations; user JWTs are intersected with the caller's accessible organizations

Example

Query
query rooms(
  $ids: [String!],
  $org_ids: [String!]
) {
  rooms(
    ids: $ids,
    org_ids: $org_ids
  ) {
    data {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
  }
}
Variables
{
  "ids": ["abc123"],
  "org_ids": ["abc123"]
}
Response
{"data": {"rooms": {"data": [Room]}}}

roomsByTag

Description

Fetch information about rooms with the specified tags

Response

Returns a Rooms!

Arguments
Name Description
tagIDs - [String!]
useOR - Boolean

Example

Query
query roomsByTag(
  $tagIDs: [String!],
  $useOR: Boolean
) {
  roomsByTag(
    tagIDs: $tagIDs,
    useOR: $useOR
  ) {
    data {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
  }
}
Variables
{"tagIDs": ["abc123"], "useOR": true}
Response
{"data": {"roomsByTag": {"data": [Room]}}}

sensorPairingJob

Description

Look up a single pairing job by id — the read path for polling a command enqueued by identifySensor / startSensorValidation / migrateSensor / changeHive. Returns null if the job does not exist or is not visible to the caller.

Reads sensor_pairing_jobs directly rather than through vsensors_pairing_state, whose job CTEs deliberately exclude kind = 'identify' (an LED blink must never shift pairing state) — so an identify job is observable ONLY here.

THE POLLING CONTRACT

  1. CALL THE MUTATION. changeHive (and every other job-enqueuing mutation) returns SYNCHRONOUSLY with a job id, status: "queued" and phase: "accepted". It does not wait for any hop. Nothing else has to be called to start a move.
  2. POLL THIS QUERY WITH THAT ID, every 2 seconds. That cadence is chosen against the pipeline's own clock: the hive poll interval is 30s and every change_hive job on record settled in 7.7 to 24.2 seconds, so 2s is fast enough that no phase is missed and slow enough to be free.
  3. RENDER phase FOR PROGRESS, phase_hop for "step N of 7", phase_actor for which box is holding things up, and reason_code when it stops. Show history for the whole trail.
  4. STOP WHEN phase_terminal IS TRUE. That covers arrival, a reported failure, and an expired hop budget. Do not settle on status: failed alone: the deployed hive does not check deadlines before executing, so a steer can read late and then land, which is why phase_terminal and not status is the stop condition.
  5. phase_inferred: true means nobody reported this hop and its budget passed, so the outcome was inferred from the clock. Worth softer copy ("no update for 2m, presumed stuck") than a reported failure.

WHAT NOT TO DO. Do not render departed or confirmed as "moved to B"; arrived is the only phase that claims arrival. Do not string-match reason; branch on reason_code. Do not treat an unfamiliar phase as an error, since gen3-backend can grow the vocabulary before this service redeploys

Response

Returns a SensorPairingJob

Arguments
Name Description
id - String!

Example

Query
query sensorPairingJob($id: String!) {
  sensorPairingJob(id: $id) {
    id
    mac_address
    kind
    status
    deadline
    phase
    phase_hop
    phase_outcome
    phase_actor
    phase_since
    phase_inferred
    phase_terminal
    reason_code
    reason
    detail
    history {
      ts
      hop
      phase
      outcome
      actor
      note
      reason_code
      reason
      at
      detail
    }
  }
}
Variables
{"id": "abc123"}
Response
{
  "data": {
    "sensorPairingJob": {
      "id": "abc123",
      "mac_address": "abc123",
      "kind": "xyz789",
      "status": "xyz789",
      "deadline": 987,
      "phase": "xyz789",
      "phase_hop": 123,
      "phase_outcome": "xyz789",
      "phase_actor": "xyz789",
      "phase_since": 987,
      "phase_inferred": false,
      "phase_terminal": false,
      "reason_code": "abc123",
      "reason": "abc123",
      "detail": "xyz789",
      "history": [SensorPairingJobEvent]
    }
  }
}

sensors

Description

Fetch information about sensors with the specified parameters

Response

Returns a Sensors!

Arguments
Name Description
ids - [String!] The ids of the sensors to fetch. (ie. ["sensor_xxxxxxxx"])
mac_addresses - [String!] The mac addresses of the sensors to fetch. (ie. ["00-00-00-00-00-00"])
floor_ids - [String!] The floor ids of the sensors to fetch. (ie. ["space_xxxxxxxx"])
room_ids - [String!] The room ids of the sensors to fetch. (ie. ["room_xxxxxxxx"])
hive_ids - [String!] The hive ids of the sensors to fetch. (ie. ["hive_xxxxxxxx"])
hive_serials - [String!] The hive serial numbers of the sensors to fetch. (ie. ["1000000abc123"])
building_ids - [String!] The building ids to filter sensors by. Returns sensors on any floor within these buildings. (ie. ["building_xxxxxxxx"])
device_status - DeviceStatus Filter by device status (ACTIVE or ARCHIVED). If not provided, returns all devices

Example

Query
query sensors(
  $ids: [String!],
  $mac_addresses: [String!],
  $floor_ids: [String!],
  $room_ids: [String!],
  $hive_ids: [String!],
  $hive_serials: [String!],
  $building_ids: [String!],
  $device_status: DeviceStatus
) {
  sensors(
    ids: $ids,
    mac_addresses: $mac_addresses,
    floor_ids: $floor_ids,
    room_ids: $room_ids,
    hive_ids: $hive_ids,
    hive_serials: $hive_serials,
    building_ids: $building_ids,
    device_status: $device_status
  ) {
    data {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
  }
}
Variables
{
  "ids": ["xyz789"],
  "mac_addresses": ["abc123"],
  "floor_ids": ["abc123"],
  "room_ids": ["abc123"],
  "hive_ids": ["abc123"],
  "hive_serials": ["xyz789"],
  "building_ids": ["xyz789"],
  "device_status": "ACTIVE"
}
Response
{"data": {"sensors": {"data": [Sensor]}}}

site

Description

Retrieve a specific site by a unique identifier

Response

Returns a Site

Arguments
Name Description
id - ID
customID - ID

Example

Query
query site(
  $id: ID,
  $customID: ID
) {
  site(
    id: $id,
    customID: $customID
  ) {
    id
    name
    buildings {
      id
      name
      capacity {
        ...CapacityFragment
      }
      floors {
        ...FloorFragment
      }
      building_number
      buildingNumber
      address {
        ...AddressFragment
      }
      site {
        ...SiteFragment
      }
    }
    siteNumber
    airportCode
    airportCoords {
      latitude
      longitude
    }
    timezone
  }
}
Variables
{"id": "4", "customID": 4}
Response
{
  "data": {
    "site": {
      "id": 4,
      "name": "xyz789",
      "buildings": [Building],
      "siteNumber": 123,
      "airportCode": "abc123",
      "airportCoords": Coords,
      "timezone": "xyz789"
    }
  }
}

sites

Description

Retrieve all sites in your account

Response

Returns a Sites!

Example

Query
query sites {
  sites {
    data {
      id
      name
      buildings {
        ...BuildingFragment
      }
      siteNumber
      airportCode
      airportCoords {
        ...CoordsFragment
      }
      timezone
    }
  }
}
Response
{"data": {"sites": {"data": [Site]}}}

spot

Description

Look up a single spot. Returns null if the spot does not exist

Response

Returns a Spot

Arguments
Name Description
id - ID
customID - ID

Example

Query
query spot(
  $id: ID,
  $customID: ID
) {
  spot(
    id: $id,
    customID: $customID
  ) {
    id
    floorID
    roomID
    name
    spotType
    location
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    note
    customID
    metadata {
      created_at
      updated_at
      deleted_at
    }
  }
}
Variables
{"id": "4", "customID": 4}
Response
{
  "data": {
    "spot": {
      "id": "4",
      "floorID": "4",
      "roomID": "4",
      "name": "abc123",
      "spotType": "abc123",
      "location": [987.65],
      "tags": [Tag],
      "note": "xyz789",
      "customID": 4,
      "metadata": MetaData
    }
  }
}

spotsByTag

Description

Look up spots by tags. Returns spots that have all the tags (or any of them when useOR is true)

Response

Returns a Spots!

Arguments
Name Description
tagIDs - [String!]
useOR - Boolean

Example

Query
query spotsByTag(
  $tagIDs: [String!],
  $useOR: Boolean
) {
  spotsByTag(
    tagIDs: $tagIDs,
    useOR: $useOR
  ) {
    data {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
  }
}
Variables
{"tagIDs": ["xyz789"], "useOR": true}
Response
{"data": {"spotsByTag": {"data": [Spot]}}}

tags

Description

List the tags

Response

Returns [Tag!]

Arguments
Name Description
ids - [String!]

Example

Query
query tags($ids: [String!]) {
  tags(ids: $ids) {
    id
    name
    organization_id
    rooms {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    floors {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
  }
}
Variables
{"ids": ["xyz789"]}
Response
{
  "data": {
    "tags": [
      {
        "id": "xyz789",
        "name": "xyz789",
        "organization_id": "xyz789",
        "rooms": [Room],
        "zones": [Zone],
        "floors": [Floor],
        "spots": [Spot]
      }
    ]
  }
}

unit

Description

Look up a single unit. Returns null if the unit does not exist

Response

Returns a Unit

Arguments
Name Description
id - ID
customID - ID

Example

Query
query unit(
  $id: ID,
  $customID: ID
) {
  unit(
    id: $id,
    customID: $customID
  ) {
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    coordinates
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    note
    rooms {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
  }
}
Variables
{"id": 4, "customID": 4}
Response
{
  "data": {
    "unit": {
      "id": 4,
      "floor": Floor,
      "metadata": MetaData,
      "name": "xyz789",
      "coordinates": [123.45],
      "tags": [Tag],
      "note": "abc123",
      "rooms": [Room],
      "zones": [Zone],
      "sensors": [Sensor]
    }
  }
}

units

Description

Fetch information about units with the specified IDs

Response

Returns a Units!

Arguments
Name Description
ids - [String!] The ids of the units to fetch. (ie. ["unit_xxxxxxxx"])
org_ids - [String!] Restrict results to units belonging to these organizations (ie. ["org_xxxxxxxx"]). Internal JWTs filter across all organizations; user JWTs are intersected with the caller's accessible organizations

Example

Query
query units(
  $ids: [String!],
  $org_ids: [String!]
) {
  units(
    ids: $ids,
    org_ids: $org_ids
  ) {
    data {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
  }
}
Variables
{
  "ids": ["abc123"],
  "org_ids": ["abc123"]
}
Response
{"data": {"units": {"data": [Unit]}}}

unitsByTag

Description

Fetch information about units with the specified tags

Response

Returns a Units!

Arguments
Name Description
tagIDs - [String!]
useOR - Boolean

Example

Query
query unitsByTag(
  $tagIDs: [String!],
  $useOR: Boolean
) {
  unitsByTag(
    tagIDs: $tagIDs,
    useOR: $useOR
  ) {
    data {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
  }
}
Variables
{"tagIDs": ["xyz789"], "useOR": false}
Response
{"data": {"unitsByTag": {"data": [Unit]}}}

webhooks

Description

Fetch all webhooks configured for your account

Response

Returns [Webhook!]

Example

Query
query webhooks {
  webhooks {
    id
    name
    event_types
    endpoint_config {
      url
      http_timeout
      api_key {
        ...ApiKeyFragment
      }
      basic_auth {
        ...BasicAuthFragment
      }
    }
    filters
    send_on_value_change
  }
}
Response
{
  "data": {
    "webhooks": [
      {
        "id": 4,
        "name": "abc123",
        "event_types": ["FLOOR_OCCUPANCY"],
        "endpoint_config": EndpointConfig,
        "filters": {},
        "send_on_value_change": false
      }
    ]
  }
}

zone

Description

Look up a single zone. Returns null if the zone does not exist

Response

Returns a Zone

Arguments
Name Description
id - ID
customID - ID

Example

Query
query zone(
  $id: ID,
  $customID: ID
) {
  zone(
    id: $id,
    customID: $customID
  ) {
    id
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    area {
      value
      unit
    }
    coordinates
    rotation
    capacity {
      mid
      max
    }
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    note
    customID
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    client_id
    floor_id
    room_id
    zone_id
    zone_type
    color
  }
}
Variables
{"id": "4", "customID": 4}
Response
{
  "data": {
    "zone": {
      "id": 4,
      "metadata": MetaData,
      "name": "xyz789",
      "area": Area,
      "coordinates": [987.65],
      "rotation": 123.45,
      "capacity": Capacity,
      "sensors": [Sensor],
      "spots": [Spot],
      "unit": Unit,
      "note": "abc123",
      "customID": 4,
      "tags": [Tag],
      "client_id": "abc123",
      "floor_id": "xyz789",
      "room_id": "abc123",
      "zone_id": "abc123",
      "zone_type": "abc123",
      "color": [987.65]
    }
  }
}

zones

Description

Fetch information about zones with the specified IDs

Response

Returns a Zones!

Arguments
Name Description
ids - [String!] The ids of the zones to fetch. (ie. ["zone_xxxxxxxx"])

Example

Query
query zones($ids: [String!]) {
  zones(ids: $ids) {
    data {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
  }
}
Variables
{"ids": ["xyz789"]}
Response
{"data": {"zones": {"data": [Zone]}}}

zonesByTag

Description

Look up zones by tags. Returns zones that have all the tags

Response

Returns a Zones!

Arguments
Name Description
tagIDs - [String!]
useOR - Boolean

Example

Query
query zonesByTag(
  $tagIDs: [String!],
  $useOR: Boolean
) {
  zonesByTag(
    tagIDs: $tagIDs,
    useOR: $useOR
  ) {
    data {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
  }
}
Variables
{"tagIDs": ["xyz789"], "useOR": false}
Response
{"data": {"zonesByTag": {"data": [Zone]}}}

Mutations

associateTag

Description

Associate tags with floors, zones, rooms and spots

Response

Returns an Association

Arguments
Name Description
input - AssociateTagInput

Example

Query
mutation associateTag($input: AssociateTagInput) {
  associateTag(input: $input) {
    tag {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    rooms {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    floors {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
  }
}
Variables
{"input": AssociateTagInput}
Response
{
  "data": {
    "associateTag": {
      "tag": Tag,
      "zones": [Zone],
      "rooms": [Room],
      "floors": [Floor],
      "spots": [Spot]
    }
  }
}

changeHive

Description

Enqueue a change_hive job to steer a sensor OFF the hive it is currently bound to, so it re-homes on a sibling ("Change Hive"). Durable intent, drained by the live cloud→Hive command dispatcher (P1-4).

NOT the same operation as migrateSensor, despite the similar wording. The two run in OPPOSITE directions: migrate means "provision this sensor onto the target hive" (an 0x0e SET_PRIMARY with that hive's credentials), while change_hive means "push this sensor AWAY from its current hive" via AP-side deny + deauthenticate, after which the sensor walks its own stored credential list.

CROSS-HIVE migrate IS PERMANENTLY REFUSED AS A FOREIGN PUSH, NOT PENDING C-5. FOREIGN is a fact about the ISSUER, the hive that SENDS the SET_PRIMARY, and not about the hive the payload names. A push is foreign when the hive issuing it is not the sensor's current owner, and an owned sensor refuses a foreign push even with FORCE. That refusal is the anti-theft rule, so no credential-distribution work makes it land.

How the sensor establishes who issued a push is what makes a cross-hive migrate refusable rather than merely unwise. The sender is proved BY POSITION: every 0x0e is refused unless it arrives from the gateway of the lane the sensor is currently associated on. On an ordinary SET_PRIMARY the credentials in the payload are the sender's own, a hive naming itself, so a payload naming some OTHER hive cannot be read as the owner re-pushing its own credentials, and the ownership gate refuses it as a takeover. The one shape that legitimately names a different hive is the owner-authorized handoff below, which is marked as a transfer and admitted on the positional proof that the sender is the owner. In particular "ADD_SECONDARY the destination, then SET_PRIMARY it" is not a valid move design: staging a secondary only buys TEMPORARY ROAMING (the sensor keeps home-probing and stays owned by its original hive).

What is permanent is the refusal of a FOREIGN push, not the sensor's ability to move: an owned sensor moves by the owner-authorized handoff below, issued by the hive that owns it WHILE THE SENSOR IS ASSOCIATED WITH THAT HIVE. That condition is load-bearing, not decoration. A sensor ROAMING on a floor sibling is still owned, but the hive serving it is a custodian rather than its owner, so a handoff pushed while it roams is refused. The same holds while the sensor shelters on the onboarding lane, while a credential trial is in flight, and while an association is still being established. A roaming sensor has to come home before it can be handed off.

AP-SIDE STEERING IS A TRANSITIONAL SHAPE. It works only while every hive advertises the same HaLow SSID; once hives beacon per-hive SSIDs a deauthenticated sensor holds no sibling credential and strands rather than moves. Its replacement is the OWNER-AUTHORIZED HANDOFF: provision --transfer, a SET_PRIMARY carrying TRANSFER (0x0e bit4) issued by the sensor's CURRENT OWNER and naming exactly one destination (gen3-heatic#335, gen3-hive#361). Do not add capability to the steering path. Onboarding, handoff, roaming, adoption and steering are five different things with five different triggers and five different failure modes; do not treat any two of them as synonyms.

confirmed MEANS DEPARTURE, NEVER ARRIVAL. A confirmed job says only that the sensor deauthenticated and left the SOURCE hive. It does not say the sensor reached target_hive_id. The source hive has no hive-to-hive channel and cannot observe the destination association, so arrival is not observable anywhere on this path — a structural limit of AP-steering, not a gap to be filled later in this mutation. Landing correlation belongs to the cloud, keyed on the DESTINATION hive's own device-state report. Do not render a confirmed change_hive as "moved to X"

Response

Returns a SensorPairingJob!

Arguments
Name Description
input - ChangeHiveInput!

Example

Query
mutation changeHive($input: ChangeHiveInput!) {
  changeHive(input: $input) {
    id
    mac_address
    kind
    status
    deadline
    phase
    phase_hop
    phase_outcome
    phase_actor
    phase_since
    phase_inferred
    phase_terminal
    reason_code
    reason
    detail
    history {
      ts
      hop
      phase
      outcome
      actor
      note
      reason_code
      reason
      at
      detail
    }
  }
}
Variables
{"input": ChangeHiveInput}
Response
{
  "data": {
    "changeHive": {
      "id": "abc123",
      "mac_address": "xyz789",
      "kind": "xyz789",
      "status": "abc123",
      "deadline": 987,
      "phase": "abc123",
      "phase_hop": 987,
      "phase_outcome": "xyz789",
      "phase_actor": "abc123",
      "phase_since": 123,
      "phase_inferred": true,
      "phase_terminal": true,
      "reason_code": "abc123",
      "reason": "abc123",
      "detail": "xyz789",
      "history": [SensorPairingJobEvent]
    }
  }
}

cloneSensors

Description

Clone one or more sensors. Creates virtual sensors with synthetic MAC addresses that receive the source sensor's data stream

Response

Returns [Sensor!]

Arguments
Name Description
inputs - [CloneSensorInput!]! A list of CloneSensorInput objects containing the information for cloning sensors

Example

Query
mutation cloneSensors($inputs: [CloneSensorInput!]!) {
  cloneSensors(inputs: $inputs) {
    pairing_status {
      state
      lane
      cred_state
      is_online
      last_job_kind
      last_job_status
      qa_signed_by
      qa_signed_at
      is_locked
      locked_at
      locked_by
      floor_placement_phase
      is_factory_adoptable
      serving_hive_id
    }
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    hive {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      is_sleep_time
      sensors {
        ...SensorFragment
      }
      note
      model
      model_name
      installed
      device_status
      is_clone
      source_serial_number
      client_id
      floor_id
      room_id
      hive_id
      serial_number
      hive_version
      hive_type
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      last_network_id
      is_streaming
      activated_at
      is_online
      net_path_stability
      connection_health {
        ...ConnectionHealthHiveFragment
      }
    }
    hive_serial
    last_network_id
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    zone_ids
    sensor_id
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    mac_address
    mode
    model
    sensitivity
    center
    height
    is_entrance
    is_building_entrance
    is_online
    parallel_to_door
    active_hours
    calibration {
      auto_calibrated_at
      auto_calibrate_start
      auto_calibrate_end
      auto_calibrate_person
    }
    door_line
    generation
    in_direction
    last_heartbeat
    last_raw_message
    last_compressed_message
    last_occupancy_message
    last_detection_message
    messages_per_second
    is_streaming
    orientation
    effective_field_of_view
    field_of_view
    algo_config {
      cold_person_detection
      blacklist
      sunlight
      shortened_doorline
      polyline_door_line
    }
    algorithm_config
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeSensorFragment
      }
    }
    is_sleep_time
    last_battery_change_date
    sensor_serial
    next_battery_change_date
    power_type
    estimated_total_runtime_days
    note
    pir_zero_enable
    is_clone
    is_mirror
    is_shallow_copy
    source_mac_address
    clones {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    mirrors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    device_status
    room_id
    floor_id
    hive_id
  }
}
Variables
{"inputs": [CloneSensorInput]}
Response
{
  "data": {
    "cloneSensors": [
      {
        "pairing_status": SensorPairingStatus,
        "id": "4",
        "floor": Floor,
        "unit": Unit,
        "room": Room,
        "hive": Hive,
        "hive_serial": "abc123",
        "last_network_id": 987,
        "zones": [Zone],
        "zone_ids": ["xyz789"],
        "sensor_id": "4",
        "metadata": MetaData,
        "name": "xyz789",
        "mac_address": "abc123",
        "mode": "xyz789",
        "model": "abc123",
        "sensitivity": 987.65,
        "center": [123.45],
        "height": 987.65,
        "is_entrance": true,
        "is_building_entrance": true,
        "is_online": true,
        "parallel_to_door": true,
        "active_hours": [987.65],
        "calibration": SensorCalibration,
        "door_line": 123.45,
        "generation": 123.45,
        "in_direction": 987.65,
        "last_heartbeat": 987,
        "last_raw_message": 123,
        "last_compressed_message": 123,
        "last_occupancy_message": 123,
        "last_detection_message": 987,
        "messages_per_second": 987.65,
        "is_streaming": true,
        "orientation": [987.65],
        "effective_field_of_view": 123.45,
        "field_of_view": 123.45,
        "algo_config": AlgoConfig,
        "algorithm_config": {},
        "connection_health": ConnectionHealthSensor,
        "is_sleep_time": true,
        "last_battery_change_date": "10:15:30Z",
        "sensor_serial": "xyz789",
        "next_battery_change_date": "10:15:30Z",
        "power_type": "Wired",
        "estimated_total_runtime_days": 987,
        "note": "xyz789",
        "pir_zero_enable": false,
        "is_clone": true,
        "is_mirror": true,
        "is_shallow_copy": true,
        "source_mac_address": "xyz789",
        "clones": [Sensor],
        "mirrors": [Sensor],
        "device_status": "ACTIVE",
        "room_id": "abc123",
        "floor_id": "xyz789",
        "hive_id": 4
      }
    ]
  }
}

confirmSensorPlacement

Description

Confirm a Gen-3 sensor's install placement ("Confirm installation"): stamps an ACTIVE row in the sensors_placement_locks ledger so install-window balancing may no longer move the sensor. Backend-only, no device round-trip. Idempotent — re-confirming an already-locked sensor keeps the original lock and its locked_at/locked_by attribution. Returns the refreshed pairing status.

Per sensor, because the ledger is keyed by MAC. The floor's Installing/Locked phase is DERIVED from its bound sensors' locks and comes back on the same payload as floor_placement_phase

Response

Returns a SensorPairingStatus!

Arguments
Name Description
input - SensorPairingActionInput!

Example

Query
mutation confirmSensorPlacement($input: SensorPairingActionInput!) {
  confirmSensorPlacement(input: $input) {
    state
    lane
    cred_state
    is_online
    last_job_kind
    last_job_status
    qa_signed_by
    qa_signed_at
    is_locked
    locked_at
    locked_by
    floor_placement_phase
    is_factory_adoptable
    serving_hive_id
  }
}
Variables
{"input": SensorPairingActionInput}
Response
{
  "data": {
    "confirmSensorPlacement": {
      "state": "DISCOVERING",
      "lane": "xyz789",
      "cred_state": 123,
      "is_online": true,
      "last_job_kind": "abc123",
      "last_job_status": "abc123",
      "qa_signed_by": "xyz789",
      "qa_signed_at": 987,
      "is_locked": true,
      "locked_at": 987,
      "locked_by": "xyz789",
      "floor_placement_phase": "abc123",
      "is_factory_adoptable": true,
      "serving_hive_id": "abc123"
    }
  }
}

confirmSensorQa

Description

Record a QA sign-off for a Gen-3 sensor (validating → deployed). Backend-only: appends to the QA sign-off ledger, no device round-trip. Returns the refreshed pairing status

Response

Returns a SensorPairingStatus!

Arguments
Name Description
input - ConfirmSensorQaInput!

Example

Query
mutation confirmSensorQa($input: ConfirmSensorQaInput!) {
  confirmSensorQa(input: $input) {
    state
    lane
    cred_state
    is_online
    last_job_kind
    last_job_status
    qa_signed_by
    qa_signed_at
    is_locked
    locked_at
    locked_by
    floor_placement_phase
    is_factory_adoptable
    serving_hive_id
  }
}
Variables
{"input": ConfirmSensorQaInput}
Response
{
  "data": {
    "confirmSensorQa": {
      "state": "DISCOVERING",
      "lane": "xyz789",
      "cred_state": 123,
      "is_online": true,
      "last_job_kind": "xyz789",
      "last_job_status": "abc123",
      "qa_signed_by": "xyz789",
      "qa_signed_at": 123,
      "is_locked": false,
      "locked_at": 123,
      "locked_by": "xyz789",
      "floor_placement_phase": "xyz789",
      "is_factory_adoptable": true,
      "serving_hive_id": "xyz789"
    }
  }
}

createAlertConfigs

Description

Create one or more alert configs

Response

Returns [AlertConfig!]

Arguments
Name Description
input - [AlertConfigCreateInput!]!

Example

Query
mutation createAlertConfigs($input: [AlertConfigCreateInput!]!) {
  createAlertConfigs(input: $input) {
    id
    name
    event_types
    status
    filters
    channels
    cooldown_mins
  }
}
Variables
{"input": [AlertConfigCreateInput]}
Response
{
  "data": {
    "createAlertConfigs": [
      {
        "id": "4",
        "name": "abc123",
        "event_types": ["CAPACITY_EXCEEDED_ROOM"],
        "status": false,
        "filters": {},
        "channels": {},
        "cooldown_mins": 123
      }
    ]
  }
}

createHives

Description

Create multiple Hive entities

Response

Returns [Hive!]

Example

Query
mutation createHives {
  createHives {
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    coordinates
    name
    connectionHealth {
      status
      codes {
        ...ConnectionHealthCodeHiveFragment
      }
    }
    is_sleep_time
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    note
    model
    model_name
    installed
    device_status
    is_clone
    source_serial_number
    client_id
    floor_id
    room_id
    hive_id
    serial_number
    hive_version
    hive_type
    last_heartbeat
    last_raw_message
    last_compressed_message
    last_occupancy_message
    last_detection_message
    last_network_id
    is_streaming
    activated_at
    is_online
    net_path_stability
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeHiveFragment
      }
    }
  }
}
Response
{
  "data": {
    "createHives": [
      {
        "id": 4,
        "floor": Floor,
        "room": Room,
        "metadata": MetaData,
        "coordinates": [123.45],
        "name": "abc123",
        "connectionHealth": ConnectionHealthHive,
        "is_sleep_time": false,
        "sensors": [Sensor],
        "note": "abc123",
        "model": "abc123",
        "model_name": "xyz789",
        "installed": false,
        "device_status": "ACTIVE",
        "is_clone": false,
        "source_serial_number": "abc123",
        "client_id": "xyz789",
        "floor_id": "xyz789",
        "room_id": "xyz789",
        "hive_id": "4",
        "serial_number": "abc123",
        "hive_version": "xyz789",
        "hive_type": "abc123",
        "last_heartbeat": 123,
        "last_raw_message": 123,
        "last_compressed_message": 123,
        "last_occupancy_message": 987,
        "last_detection_message": 123,
        "last_network_id": 987,
        "is_streaming": false,
        "activated_at": 123,
        "is_online": true,
        "net_path_stability": 123.45,
        "connection_health": ConnectionHealthHive
      }
    ]
  }
}

createInsightBoard

Description

Create a new insight board owned by the caller

Response

Returns an InsightBoard!

Arguments
Name Description
input - InsightBoardCreateInput!

Example

Query
mutation createInsightBoard($input: InsightBoardCreateInput!) {
  createInsightBoard(input: $input) {
    id
    createdBy
    folder
    name
    description
    tags
    model
    shareKey
    shared
    version
    createdAt
    updatedAt
  }
}
Variables
{"input": InsightBoardCreateInput}
Response
{
  "data": {
    "createInsightBoard": {
      "id": "4",
      "createdBy": "xyz789",
      "folder": "abc123",
      "name": "abc123",
      "description": "abc123",
      "tags": ["abc123"],
      "model": {},
      "shareKey": "abc123",
      "shared": true,
      "version": 123,
      "createdAt": "xyz789",
      "updatedAt": "xyz789"
    }
  }
}

createRooms

Description

Create multiple Room entities

Response

Returns [Room!]

Arguments
Name Description
rooms - [CreateRoomInput!]! A list of CreateRoomInput objects containing the information for creating new Room entities

Example

Query
mutation createRooms($rooms: [CreateRoomInput!]!) {
  createRooms(rooms: $rooms) {
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    area {
      value
      unit
    }
    coordinates
    capacity {
      mid
      max
    }
    rotation
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    note
    pir_zero_enable
    pir_zero_threshold
    pir_zero_window
    algorithm_config
    room_id
    client_id
    floor_id
    color
    room_type
    auto_calibrated_at
  }
}
Variables
{"rooms": [CreateRoomInput]}
Response
{
  "data": {
    "createRooms": [
      {
        "id": 4,
        "floor": Floor,
        "metadata": MetaData,
        "name": "abc123",
        "area": Area,
        "coordinates": [123.45],
        "capacity": Capacity,
        "rotation": 987.65,
        "tags": [Tag],
        "sensors": [Sensor],
        "spots": [Spot],
        "unit": Unit,
        "note": "abc123",
        "pir_zero_enable": false,
        "pir_zero_threshold": 987.65,
        "pir_zero_window": 123,
        "algorithm_config": {},
        "room_id": "4",
        "client_id": "abc123",
        "floor_id": "abc123",
        "color": [123.45],
        "room_type": "abc123",
        "auto_calibrated_at": 123
      }
    ]
  }
}

createSensors

Description

Create multiple Sensor entities

Response

Returns [Sensor!]

Arguments
Name Description
sensors - [CreateSensorInput!]! A list of CreateSensorInput objects containing the information for creating new Sensor entities

Example

Query
mutation createSensors($sensors: [CreateSensorInput!]!) {
  createSensors(sensors: $sensors) {
    pairing_status {
      state
      lane
      cred_state
      is_online
      last_job_kind
      last_job_status
      qa_signed_by
      qa_signed_at
      is_locked
      locked_at
      locked_by
      floor_placement_phase
      is_factory_adoptable
      serving_hive_id
    }
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    hive {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      is_sleep_time
      sensors {
        ...SensorFragment
      }
      note
      model
      model_name
      installed
      device_status
      is_clone
      source_serial_number
      client_id
      floor_id
      room_id
      hive_id
      serial_number
      hive_version
      hive_type
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      last_network_id
      is_streaming
      activated_at
      is_online
      net_path_stability
      connection_health {
        ...ConnectionHealthHiveFragment
      }
    }
    hive_serial
    last_network_id
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    zone_ids
    sensor_id
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    mac_address
    mode
    model
    sensitivity
    center
    height
    is_entrance
    is_building_entrance
    is_online
    parallel_to_door
    active_hours
    calibration {
      auto_calibrated_at
      auto_calibrate_start
      auto_calibrate_end
      auto_calibrate_person
    }
    door_line
    generation
    in_direction
    last_heartbeat
    last_raw_message
    last_compressed_message
    last_occupancy_message
    last_detection_message
    messages_per_second
    is_streaming
    orientation
    effective_field_of_view
    field_of_view
    algo_config {
      cold_person_detection
      blacklist
      sunlight
      shortened_doorline
      polyline_door_line
    }
    algorithm_config
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeSensorFragment
      }
    }
    is_sleep_time
    last_battery_change_date
    sensor_serial
    next_battery_change_date
    power_type
    estimated_total_runtime_days
    note
    pir_zero_enable
    is_clone
    is_mirror
    is_shallow_copy
    source_mac_address
    clones {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    mirrors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    device_status
    room_id
    floor_id
    hive_id
  }
}
Variables
{"sensors": [CreateSensorInput]}
Response
{
  "data": {
    "createSensors": [
      {
        "pairing_status": SensorPairingStatus,
        "id": "4",
        "floor": Floor,
        "unit": Unit,
        "room": Room,
        "hive": Hive,
        "hive_serial": "abc123",
        "last_network_id": 987,
        "zones": [Zone],
        "zone_ids": ["abc123"],
        "sensor_id": 4,
        "metadata": MetaData,
        "name": "abc123",
        "mac_address": "xyz789",
        "mode": "abc123",
        "model": "abc123",
        "sensitivity": 123.45,
        "center": [987.65],
        "height": 123.45,
        "is_entrance": false,
        "is_building_entrance": false,
        "is_online": false,
        "parallel_to_door": true,
        "active_hours": [123.45],
        "calibration": SensorCalibration,
        "door_line": 987.65,
        "generation": 123.45,
        "in_direction": 123.45,
        "last_heartbeat": 123,
        "last_raw_message": 987,
        "last_compressed_message": 987,
        "last_occupancy_message": 123,
        "last_detection_message": 123,
        "messages_per_second": 123.45,
        "is_streaming": true,
        "orientation": [987.65],
        "effective_field_of_view": 987.65,
        "field_of_view": 987.65,
        "algo_config": AlgoConfig,
        "algorithm_config": {},
        "connection_health": ConnectionHealthSensor,
        "is_sleep_time": false,
        "last_battery_change_date": "10:15:30Z",
        "sensor_serial": "xyz789",
        "next_battery_change_date": "10:15:30Z",
        "power_type": "Wired",
        "estimated_total_runtime_days": 987,
        "note": "abc123",
        "pir_zero_enable": true,
        "is_clone": false,
        "is_mirror": false,
        "is_shallow_copy": false,
        "source_mac_address": "abc123",
        "clones": [Sensor],
        "mirrors": [Sensor],
        "device_status": "ACTIVE",
        "room_id": "xyz789",
        "floor_id": "abc123",
        "hive_id": 4
      }
    ]
  }
}

createTag

Description

Create a new tag

Response

Returns a Tag!

Arguments
Name Description
input - CreateTagInput!

Example

Query
mutation createTag($input: CreateTagInput!) {
  createTag(input: $input) {
    id
    name
    organization_id
    rooms {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    floors {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
  }
}
Variables
{"input": CreateTagInput}
Response
{
  "data": {
    "createTag": {
      "id": "xyz789",
      "name": "xyz789",
      "organization_id": "abc123",
      "rooms": [Room],
      "zones": [Zone],
      "floors": [Floor],
      "spots": [Spot]
    }
  }
}

createTags

Description

Create new tags

Response

Returns [Tag!]

Arguments
Name Description
input - [CreateTagInput!]

Example

Query
mutation createTags($input: [CreateTagInput!]) {
  createTags(input: $input) {
    id
    name
    organization_id
    rooms {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    floors {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
  }
}
Variables
{"input": [CreateTagInput]}
Response
{
  "data": {
    "createTags": [
      {
        "id": "xyz789",
        "name": "abc123",
        "organization_id": "xyz789",
        "rooms": [Room],
        "zones": [Zone],
        "floors": [Floor],
        "spots": [Spot]
      }
    ]
  }
}

createUnits

Description

Create multiple Unit entities

Response

Returns [Unit!]

Arguments
Name Description
units - [CreateUnitInput!]! A list of CreateUnitInput objects containing the information for creating new Unit entities

Example

Query
mutation createUnits($units: [CreateUnitInput!]!) {
  createUnits(units: $units) {
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    coordinates
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    note
    rooms {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
  }
}
Variables
{"units": [CreateUnitInput]}
Response
{
  "data": {
    "createUnits": [
      {
        "id": 4,
        "floor": Floor,
        "metadata": MetaData,
        "name": "xyz789",
        "coordinates": [123.45],
        "tags": [Tag],
        "note": "xyz789",
        "rooms": [Room],
        "zones": [Zone],
        "sensors": [Sensor]
      }
    ]
  }
}

createWebhooks

Description

Mutation to create one or more new webhooks. Each webhook will be set up with a unique configuration, including event subscriptions and endpoint details

Response

Returns [Webhook!]

Arguments
Name Description
input - [WebhookCreateInput!]! A list of CreateWebhookInput objects containing the information for creating new Webhook entities. Each object must include the webhook name, event types to subscribe to, and endpoint configuration

Example

Query
mutation createWebhooks($input: [WebhookCreateInput!]!) {
  createWebhooks(input: $input) {
    id
    name
    event_types
    endpoint_config {
      url
      http_timeout
      api_key {
        ...ApiKeyFragment
      }
      basic_auth {
        ...BasicAuthFragment
      }
    }
    filters
    send_on_value_change
  }
}
Variables
{"input": [WebhookCreateInput]}
Response
{
  "data": {
    "createWebhooks": [
      {
        "id": 4,
        "name": "xyz789",
        "event_types": ["FLOOR_OCCUPANCY"],
        "endpoint_config": EndpointConfig,
        "filters": {},
        "send_on_value_change": false
      }
    ]
  }
}

createZones

Description

Create multiple Zone entities

Response

Returns [Zone!]

Arguments
Name Description
zones - [CreateZoneInput!]! A list of CreateZoneInput objects containing the information for creating new Zone entities

Example

Query
mutation createZones($zones: [CreateZoneInput!]!) {
  createZones(zones: $zones) {
    id
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    area {
      value
      unit
    }
    coordinates
    rotation
    capacity {
      mid
      max
    }
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    note
    customID
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    client_id
    floor_id
    room_id
    zone_id
    zone_type
    color
  }
}
Variables
{"zones": [CreateZoneInput]}
Response
{
  "data": {
    "createZones": [
      {
        "id": "4",
        "metadata": MetaData,
        "name": "abc123",
        "area": Area,
        "coordinates": [123.45],
        "rotation": 123.45,
        "capacity": Capacity,
        "sensors": [Sensor],
        "spots": [Spot],
        "unit": Unit,
        "note": "abc123",
        "customID": "4",
        "tags": [Tag],
        "client_id": "xyz789",
        "floor_id": "abc123",
        "room_id": "abc123",
        "zone_id": "abc123",
        "zone_type": "abc123",
        "color": [987.65]
      }
    ]
  }
}

deleteAlertConfigs

Description

Delete one or more alert configs by ID

Response

Returns a Boolean!

Arguments
Name Description
ids - [ID!]!

Example

Query
mutation deleteAlertConfigs($ids: [ID!]!) {
  deleteAlertConfigs(ids: $ids)
}
Variables
{"ids": ["4"]}
Response
{"data": {"deleteAlertConfigs": true}}

deleteFloors

Description

Delete multiple Floor entities

Response

Returns [Floor!]

Arguments
Name Description
ids - [String!] A list of Floor IDs to delete

Example

Query
mutation deleteFloors($ids: [String!]) {
  deleteFloors(ids: $ids) {
    id
    building_id
    building {
      id
      name
      capacity {
        ...CapacityFragment
      }
      floors {
        ...FloorFragment
      }
      building_number
      buildingNumber
      address {
        ...AddressFragment
      }
      site {
        ...SiteFragment
      }
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    timezone
    area {
      value
      unit
    }
    capacity {
      mid
      max
    }
    installation_date
    installation_status
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    hives {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      is_sleep_time
      sensors {
        ...SensorFragment
      }
      note
      model
      model_name
      installed
      device_status
      is_clone
      source_serial_number
      client_id
      floor_id
      room_id
      hive_id
      serial_number
      hive_version
      hive_type
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      last_network_id
      is_streaming
      activated_at
      is_online
      net_path_stability
      connection_health {
        ...ConnectionHealthHiveFragment
      }
    }
    last_battery_change_date
    next_battery_change_date
    floor_plans {
      floor_plan_id
      coordinates
      name
      url
    }
    floorNumber
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    rooms {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    units {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
    buildingId
    algorithm_config
    end_of_day_time
    end_of_day_occupancy
    is_building_data_source
    exclude_from_building_view
    is_demo
    floor_id
    client_id
  }
}
Variables
{"ids": ["xyz789"]}
Response
{
  "data": {
    "deleteFloors": [
      {
        "id": "4",
        "building_id": "4",
        "building": Building,
        "metadata": MetaData,
        "name": "xyz789",
        "timezone": "abc123",
        "area": Area,
        "capacity": Capacity,
        "installation_date": 123,
        "installation_status": "NOT_INSTALLED",
        "sensors": [Sensor],
        "hives": [Hive],
        "last_battery_change_date": "10:15:30Z",
        "next_battery_change_date": "10:15:30Z",
        "floor_plans": [FloorPlan],
        "floorNumber": 123,
        "tags": [Tag],
        "rooms": [Room],
        "zones": [Zone],
        "units": [Unit],
        "spots": [Spot],
        "buildingId": 4,
        "algorithm_config": {},
        "end_of_day_time": "abc123",
        "end_of_day_occupancy": 123,
        "is_building_data_source": true,
        "exclude_from_building_view": true,
        "is_demo": true,
        "floor_id": 4,
        "client_id": "abc123"
      }
    ]
  }
}

deleteHives

Description

Delete multiple Hive entities

Response

Returns [Hive!]

Arguments
Name Description
ids - [String!] A list of Hive IDs to delete
serial_numbers - [String!] A list of Hive serial numbers to delete

Example

Query
mutation deleteHives(
  $ids: [String!],
  $serial_numbers: [String!]
) {
  deleteHives(
    ids: $ids,
    serial_numbers: $serial_numbers
  ) {
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    coordinates
    name
    connectionHealth {
      status
      codes {
        ...ConnectionHealthCodeHiveFragment
      }
    }
    is_sleep_time
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    note
    model
    model_name
    installed
    device_status
    is_clone
    source_serial_number
    client_id
    floor_id
    room_id
    hive_id
    serial_number
    hive_version
    hive_type
    last_heartbeat
    last_raw_message
    last_compressed_message
    last_occupancy_message
    last_detection_message
    last_network_id
    is_streaming
    activated_at
    is_online
    net_path_stability
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeHiveFragment
      }
    }
  }
}
Variables
{
  "ids": ["abc123"],
  "serial_numbers": ["abc123"]
}
Response
{
  "data": {
    "deleteHives": [
      {
        "id": 4,
        "floor": Floor,
        "room": Room,
        "metadata": MetaData,
        "coordinates": [987.65],
        "name": "abc123",
        "connectionHealth": ConnectionHealthHive,
        "is_sleep_time": false,
        "sensors": [Sensor],
        "note": "xyz789",
        "model": "xyz789",
        "model_name": "abc123",
        "installed": true,
        "device_status": "ACTIVE",
        "is_clone": true,
        "source_serial_number": "xyz789",
        "client_id": "xyz789",
        "floor_id": "xyz789",
        "room_id": "abc123",
        "hive_id": "4",
        "serial_number": "xyz789",
        "hive_version": "abc123",
        "hive_type": "abc123",
        "last_heartbeat": 987,
        "last_raw_message": 987,
        "last_compressed_message": 123,
        "last_occupancy_message": 987,
        "last_detection_message": 987,
        "last_network_id": 987,
        "is_streaming": false,
        "activated_at": 987,
        "is_online": true,
        "net_path_stability": 123.45,
        "connection_health": ConnectionHealthHive
      }
    ]
  }
}

deleteInsightBoard

Description

Soft-delete an insight board by ID. The row is preserved with deleted_at set; read paths automatically hide it via the vorgs_insight_boards view

Response

Returns a Boolean!

Arguments
Name Description
id - ID!

Example

Query
mutation deleteInsightBoard($id: ID!) {
  deleteInsightBoard(id: $id)
}
Variables
{"id": 4}
Response
{"data": {"deleteInsightBoard": true}}

deleteRooms

Description

Delete multiple Room entities

Response

Returns [Room!]

Arguments
Name Description
ids - [String!] A list of Room IDs to delete

Example

Query
mutation deleteRooms($ids: [String!]) {
  deleteRooms(ids: $ids) {
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    area {
      value
      unit
    }
    coordinates
    capacity {
      mid
      max
    }
    rotation
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    note
    pir_zero_enable
    pir_zero_threshold
    pir_zero_window
    algorithm_config
    room_id
    client_id
    floor_id
    color
    room_type
    auto_calibrated_at
  }
}
Variables
{"ids": ["abc123"]}
Response
{
  "data": {
    "deleteRooms": [
      {
        "id": 4,
        "floor": Floor,
        "metadata": MetaData,
        "name": "xyz789",
        "area": Area,
        "coordinates": [987.65],
        "capacity": Capacity,
        "rotation": 987.65,
        "tags": [Tag],
        "sensors": [Sensor],
        "spots": [Spot],
        "unit": Unit,
        "note": "abc123",
        "pir_zero_enable": true,
        "pir_zero_threshold": 987.65,
        "pir_zero_window": 123,
        "algorithm_config": {},
        "room_id": "4",
        "client_id": "abc123",
        "floor_id": "abc123",
        "color": [987.65],
        "room_type": "abc123",
        "auto_calibrated_at": 987
      }
    ]
  }
}

deleteSensors

Description

Delete multiple Sensor entities

Response

Returns [Sensor!]

Arguments
Name Description
ids - [String!] A list of Sensor IDs to delete
mac_addresses - [String!]

Example

Query
mutation deleteSensors(
  $ids: [String!],
  $mac_addresses: [String!]
) {
  deleteSensors(
    ids: $ids,
    mac_addresses: $mac_addresses
  ) {
    pairing_status {
      state
      lane
      cred_state
      is_online
      last_job_kind
      last_job_status
      qa_signed_by
      qa_signed_at
      is_locked
      locked_at
      locked_by
      floor_placement_phase
      is_factory_adoptable
      serving_hive_id
    }
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    hive {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      is_sleep_time
      sensors {
        ...SensorFragment
      }
      note
      model
      model_name
      installed
      device_status
      is_clone
      source_serial_number
      client_id
      floor_id
      room_id
      hive_id
      serial_number
      hive_version
      hive_type
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      last_network_id
      is_streaming
      activated_at
      is_online
      net_path_stability
      connection_health {
        ...ConnectionHealthHiveFragment
      }
    }
    hive_serial
    last_network_id
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    zone_ids
    sensor_id
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    mac_address
    mode
    model
    sensitivity
    center
    height
    is_entrance
    is_building_entrance
    is_online
    parallel_to_door
    active_hours
    calibration {
      auto_calibrated_at
      auto_calibrate_start
      auto_calibrate_end
      auto_calibrate_person
    }
    door_line
    generation
    in_direction
    last_heartbeat
    last_raw_message
    last_compressed_message
    last_occupancy_message
    last_detection_message
    messages_per_second
    is_streaming
    orientation
    effective_field_of_view
    field_of_view
    algo_config {
      cold_person_detection
      blacklist
      sunlight
      shortened_doorline
      polyline_door_line
    }
    algorithm_config
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeSensorFragment
      }
    }
    is_sleep_time
    last_battery_change_date
    sensor_serial
    next_battery_change_date
    power_type
    estimated_total_runtime_days
    note
    pir_zero_enable
    is_clone
    is_mirror
    is_shallow_copy
    source_mac_address
    clones {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    mirrors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    device_status
    room_id
    floor_id
    hive_id
  }
}
Variables
{
  "ids": ["abc123"],
  "mac_addresses": ["abc123"]
}
Response
{
  "data": {
    "deleteSensors": [
      {
        "pairing_status": SensorPairingStatus,
        "id": "4",
        "floor": Floor,
        "unit": Unit,
        "room": Room,
        "hive": Hive,
        "hive_serial": "xyz789",
        "last_network_id": 987,
        "zones": [Zone],
        "zone_ids": ["abc123"],
        "sensor_id": 4,
        "metadata": MetaData,
        "name": "xyz789",
        "mac_address": "abc123",
        "mode": "xyz789",
        "model": "xyz789",
        "sensitivity": 123.45,
        "center": [123.45],
        "height": 123.45,
        "is_entrance": false,
        "is_building_entrance": false,
        "is_online": true,
        "parallel_to_door": true,
        "active_hours": [123.45],
        "calibration": SensorCalibration,
        "door_line": 987.65,
        "generation": 987.65,
        "in_direction": 987.65,
        "last_heartbeat": 123,
        "last_raw_message": 123,
        "last_compressed_message": 987,
        "last_occupancy_message": 987,
        "last_detection_message": 123,
        "messages_per_second": 123.45,
        "is_streaming": true,
        "orientation": [987.65],
        "effective_field_of_view": 987.65,
        "field_of_view": 123.45,
        "algo_config": AlgoConfig,
        "algorithm_config": {},
        "connection_health": ConnectionHealthSensor,
        "is_sleep_time": true,
        "last_battery_change_date": "10:15:30Z",
        "sensor_serial": "abc123",
        "next_battery_change_date": "10:15:30Z",
        "power_type": "Wired",
        "estimated_total_runtime_days": 123,
        "note": "abc123",
        "pir_zero_enable": false,
        "is_clone": false,
        "is_mirror": false,
        "is_shallow_copy": false,
        "source_mac_address": "xyz789",
        "clones": [Sensor],
        "mirrors": [Sensor],
        "device_status": "ACTIVE",
        "room_id": "abc123",
        "floor_id": "abc123",
        "hive_id": 4
      }
    ]
  }
}

deleteTags

Description

Delete tags

Response

Returns an Int!

Arguments
Name Description
ids - [String!]

Example

Query
mutation deleteTags($ids: [String!]) {
  deleteTags(ids: $ids)
}
Variables
{"ids": ["xyz789"]}
Response
{"data": {"deleteTags": 987}}

deleteUnits

Description

Delete multiple Unit entities. Rooms, zones, and sensors that belonged to a deleted unit become unassigned (their unit reference is cleared). Unknown or inaccessible IDs are skipped: the response contains only the units that were actually deleted

Response

Returns [Unit!]

Arguments
Name Description
ids - [String!] A list of Unit IDs to delete

Example

Query
mutation deleteUnits($ids: [String!]) {
  deleteUnits(ids: $ids) {
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    coordinates
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    note
    rooms {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
  }
}
Variables
{"ids": ["abc123"]}
Response
{
  "data": {
    "deleteUnits": [
      {
        "id": "4",
        "floor": Floor,
        "metadata": MetaData,
        "name": "abc123",
        "coordinates": [987.65],
        "tags": [Tag],
        "note": "xyz789",
        "rooms": [Room],
        "zones": [Zone],
        "sensors": [Sensor]
      }
    ]
  }
}

deleteWebhooks

Description

Mutation to delete one or more webhooks based on their unique IDs

Response

Returns a Boolean!

Arguments
Name Description
ids - [ID!]! A list of IDs representing the webhooks to delete

Example

Query
mutation deleteWebhooks($ids: [ID!]!) {
  deleteWebhooks(ids: $ids)
}
Variables
{"ids": ["4"]}
Response
{"data": {"deleteWebhooks": true}}

deleteZones

Description

Delete multiple Zone entities

Response

Returns [Zone!]

Arguments
Name Description
ids - [String!] A list of Zone IDs to delete

Example

Query
mutation deleteZones($ids: [String!]) {
  deleteZones(ids: $ids) {
    id
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    area {
      value
      unit
    }
    coordinates
    rotation
    capacity {
      mid
      max
    }
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    note
    customID
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    client_id
    floor_id
    room_id
    zone_id
    zone_type
    color
  }
}
Variables
{"ids": ["abc123"]}
Response
{
  "data": {
    "deleteZones": [
      {
        "id": "4",
        "metadata": MetaData,
        "name": "abc123",
        "area": Area,
        "coordinates": [123.45],
        "rotation": 987.65,
        "capacity": Capacity,
        "sensors": [Sensor],
        "spots": [Spot],
        "unit": Unit,
        "note": "xyz789",
        "customID": 4,
        "tags": [Tag],
        "client_id": "abc123",
        "floor_id": "abc123",
        "room_id": "abc123",
        "zone_id": "xyz789",
        "zone_type": "abc123",
        "color": [123.45]
      }
    ]
  }
}

disassociateTag

Description

Deassociate tags with floors, zones, rooms and spots

Response

Returns an Association

Arguments
Name Description
input - AssociateTagInput

Example

Query
mutation disassociateTag($input: AssociateTagInput) {
  disassociateTag(input: $input) {
    tag {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    rooms {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    floors {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
  }
}
Variables
{"input": AssociateTagInput}
Response
{
  "data": {
    "disassociateTag": {
      "tag": Tag,
      "zones": [Zone],
      "rooms": [Room],
      "floors": [Floor],
      "spots": [Spot]
    }
  }
}

identifySensor

Description

Enqueue an identify (LED blink) job to physically locate a sensor. Durable intent drained by P1-4; does not change pairing state

Response

Returns a SensorPairingJob!

Arguments
Name Description
input - SensorPairingActionInput!

Example

Query
mutation identifySensor($input: SensorPairingActionInput!) {
  identifySensor(input: $input) {
    id
    mac_address
    kind
    status
    deadline
    phase
    phase_hop
    phase_outcome
    phase_actor
    phase_since
    phase_inferred
    phase_terminal
    reason_code
    reason
    detail
    history {
      ts
      hop
      phase
      outcome
      actor
      note
      reason_code
      reason
      at
      detail
    }
  }
}
Variables
{"input": SensorPairingActionInput}
Response
{
  "data": {
    "identifySensor": {
      "id": "xyz789",
      "mac_address": "xyz789",
      "kind": "xyz789",
      "status": "abc123",
      "deadline": 123,
      "phase": "xyz789",
      "phase_hop": 123,
      "phase_outcome": "abc123",
      "phase_actor": "xyz789",
      "phase_since": 123,
      "phase_inferred": false,
      "phase_terminal": false,
      "reason_code": "xyz789",
      "reason": "abc123",
      "detail": "xyz789",
      "history": [SensorPairingJobEvent]
    }
  }
}

migrateSensor

Description

Enqueue a migration job: provision this sensor ONTO the target hive (0x0e SET_PRIMARY with that hive's credentials). NOT the "Change Hive" operation — that is changeHive below, which pushes a sensor AWAY from its current hive; this label on this mutation is how the wrong one got wired the first time. Association only — QA status persists. Durable intent drained by P1-4

Response

Returns a SensorPairingJob!

Arguments
Name Description
input - MigrateSensorInput!

Example

Query
mutation migrateSensor($input: MigrateSensorInput!) {
  migrateSensor(input: $input) {
    id
    mac_address
    kind
    status
    deadline
    phase
    phase_hop
    phase_outcome
    phase_actor
    phase_since
    phase_inferred
    phase_terminal
    reason_code
    reason
    detail
    history {
      ts
      hop
      phase
      outcome
      actor
      note
      reason_code
      reason
      at
      detail
    }
  }
}
Variables
{"input": MigrateSensorInput}
Response
{
  "data": {
    "migrateSensor": {
      "id": "xyz789",
      "mac_address": "abc123",
      "kind": "abc123",
      "status": "abc123",
      "deadline": 123,
      "phase": "abc123",
      "phase_hop": 123,
      "phase_outcome": "abc123",
      "phase_actor": "abc123",
      "phase_since": 123,
      "phase_inferred": false,
      "phase_terminal": true,
      "reason_code": "xyz789",
      "reason": "xyz789",
      "detail": "abc123",
      "history": [SensorPairingJobEvent]
    }
  }
}

mirrorSensors

Description

Mirror one or more sensors. Creates virtual traffic sensors with flipped in-direction that receive the source sensor's data stream

Response

Returns [Sensor!]

Arguments
Name Description
inputs - [MirrorSensorInput!]! A list of MirrorSensorInput objects containing the information for mirroring sensors

Example

Query
mutation mirrorSensors($inputs: [MirrorSensorInput!]!) {
  mirrorSensors(inputs: $inputs) {
    pairing_status {
      state
      lane
      cred_state
      is_online
      last_job_kind
      last_job_status
      qa_signed_by
      qa_signed_at
      is_locked
      locked_at
      locked_by
      floor_placement_phase
      is_factory_adoptable
      serving_hive_id
    }
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    hive {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      is_sleep_time
      sensors {
        ...SensorFragment
      }
      note
      model
      model_name
      installed
      device_status
      is_clone
      source_serial_number
      client_id
      floor_id
      room_id
      hive_id
      serial_number
      hive_version
      hive_type
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      last_network_id
      is_streaming
      activated_at
      is_online
      net_path_stability
      connection_health {
        ...ConnectionHealthHiveFragment
      }
    }
    hive_serial
    last_network_id
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    zone_ids
    sensor_id
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    mac_address
    mode
    model
    sensitivity
    center
    height
    is_entrance
    is_building_entrance
    is_online
    parallel_to_door
    active_hours
    calibration {
      auto_calibrated_at
      auto_calibrate_start
      auto_calibrate_end
      auto_calibrate_person
    }
    door_line
    generation
    in_direction
    last_heartbeat
    last_raw_message
    last_compressed_message
    last_occupancy_message
    last_detection_message
    messages_per_second
    is_streaming
    orientation
    effective_field_of_view
    field_of_view
    algo_config {
      cold_person_detection
      blacklist
      sunlight
      shortened_doorline
      polyline_door_line
    }
    algorithm_config
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeSensorFragment
      }
    }
    is_sleep_time
    last_battery_change_date
    sensor_serial
    next_battery_change_date
    power_type
    estimated_total_runtime_days
    note
    pir_zero_enable
    is_clone
    is_mirror
    is_shallow_copy
    source_mac_address
    clones {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    mirrors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    device_status
    room_id
    floor_id
    hive_id
  }
}
Variables
{"inputs": [MirrorSensorInput]}
Response
{
  "data": {
    "mirrorSensors": [
      {
        "pairing_status": SensorPairingStatus,
        "id": 4,
        "floor": Floor,
        "unit": Unit,
        "room": Room,
        "hive": Hive,
        "hive_serial": "xyz789",
        "last_network_id": 123,
        "zones": [Zone],
        "zone_ids": ["xyz789"],
        "sensor_id": 4,
        "metadata": MetaData,
        "name": "xyz789",
        "mac_address": "abc123",
        "mode": "xyz789",
        "model": "xyz789",
        "sensitivity": 123.45,
        "center": [123.45],
        "height": 123.45,
        "is_entrance": true,
        "is_building_entrance": true,
        "is_online": false,
        "parallel_to_door": true,
        "active_hours": [123.45],
        "calibration": SensorCalibration,
        "door_line": 987.65,
        "generation": 123.45,
        "in_direction": 123.45,
        "last_heartbeat": 123,
        "last_raw_message": 123,
        "last_compressed_message": 987,
        "last_occupancy_message": 123,
        "last_detection_message": 987,
        "messages_per_second": 123.45,
        "is_streaming": false,
        "orientation": [123.45],
        "effective_field_of_view": 123.45,
        "field_of_view": 123.45,
        "algo_config": AlgoConfig,
        "algorithm_config": {},
        "connection_health": ConnectionHealthSensor,
        "is_sleep_time": true,
        "last_battery_change_date": "10:15:30Z",
        "sensor_serial": "abc123",
        "next_battery_change_date": "10:15:30Z",
        "power_type": "Wired",
        "estimated_total_runtime_days": 123,
        "note": "abc123",
        "pir_zero_enable": true,
        "is_clone": true,
        "is_mirror": true,
        "is_shallow_copy": false,
        "source_mac_address": "xyz789",
        "clones": [Sensor],
        "mirrors": [Sensor],
        "device_status": "ACTIVE",
        "room_id": "abc123",
        "floor_id": "abc123",
        "hive_id": 4
      }
    ]
  }
}

regeneratePublicLinkToken

Description

Regenerate the token for a public link, invalidating the previous URL

Response

Returns a PublicLink!

Arguments
Name Description
id - ID!

Example

Query
mutation regeneratePublicLinkToken($id: ID!) {
  regeneratePublicLinkToken(id: $id) {
    id
    token
    spaceType
    spaceId
    spaceName
    filters {
      floorIds
      roomIds
      zoneIds
      tagIds
    }
    title
    refreshInterval
    isActive
    expiresAt
    url
    createdAt
    updatedAt
  }
}
Variables
{"id": 4}
Response
{
  "data": {
    "regeneratePublicLinkToken": {
      "id": "4",
      "token": "abc123",
      "spaceType": "FLOOR",
      "spaceId": "xyz789",
      "spaceName": "abc123",
      "filters": PublicLinkFilters,
      "title": "abc123",
      "refreshInterval": 123,
      "isActive": false,
      "expiresAt": "abc123",
      "url": "abc123",
      "createdAt": "abc123",
      "updatedAt": "abc123"
    }
  }
}

reopenSensorPlacement

Description

Re-open the install window for a Gen-3 sensor ("Re-open install window"): releases its ACTIVE placement lock so balancing may move it again. The ledger is append-only — the row is stamped released_at, never deleted, so the lock/release history survives. Idempotent: releasing an unlocked sensor is a no-op. Returns the refreshed pairing status

Response

Returns a SensorPairingStatus!

Arguments
Name Description
input - SensorPairingActionInput!

Example

Query
mutation reopenSensorPlacement($input: SensorPairingActionInput!) {
  reopenSensorPlacement(input: $input) {
    state
    lane
    cred_state
    is_online
    last_job_kind
    last_job_status
    qa_signed_by
    qa_signed_at
    is_locked
    locked_at
    locked_by
    floor_placement_phase
    is_factory_adoptable
    serving_hive_id
  }
}
Variables
{"input": SensorPairingActionInput}
Response
{
  "data": {
    "reopenSensorPlacement": {
      "state": "DISCOVERING",
      "lane": "xyz789",
      "cred_state": 987,
      "is_online": true,
      "last_job_kind": "abc123",
      "last_job_status": "abc123",
      "qa_signed_by": "xyz789",
      "qa_signed_at": 123,
      "is_locked": false,
      "locked_at": 123,
      "locked_by": "xyz789",
      "floor_placement_phase": "abc123",
      "is_factory_adoptable": true,
      "serving_hive_id": "xyz789"
    }
  }
}

reportSensorsDeviceState

Description

Record Gen-3 sensors' device state as observed by their hive (internal JWT only). This is the persistence half of the typed hive-events rail: the hive emits sensor.device_state.observed, gen3-hive-events dispatches it here, and GraphQL owns the write. Ingest services do not hold Postgres credentials.

It replaces a log-scraping path in which gen3-hive-logs parsed ERROR-level log lines and wrote the table directly. Log formats are observability output and may change freely; nothing may depend on their shape as a data contract.

Batched because one hive reports many sensors, and idempotent because the events rail RETRIES: re-reporting an observation is a no-op. Ordering is by observed_at per MAC, never by arrival, so a retried stale report cannot overwrite fresher state.

Partial success is normal and deliberate: a single unroutable entry (unknown or malformed MAC) must not fail its whole batch, or the retrying rail would replay the poison entry forever and block every healthy sensor behind it. Rejected entries come back in rejected

Response

Returns a SensorsDeviceStateReportResult!

Arguments
Name Description
input - [SensorDeviceStateReportInput!]!

Example

Query
mutation reportSensorsDeviceState($input: [SensorDeviceStateReportInput!]!) {
  reportSensorsDeviceState(input: $input) {
    accepted
    applied
    rejected {
      index
      mac_address
      reason
    }
  }
}
Variables
{"input": [SensorDeviceStateReportInput]}
Response
{
  "data": {
    "reportSensorsDeviceState": {
      "accepted": 123,
      "applied": 987,
      "rejected": [SensorsDeviceStateReportRejection]
    }
  }
}

shareInsightBoard

Description

Toggle a board's visibility between Private (shared: false) and Shared (shared: true). Owner-only (same permission check as update/delete), and deliberately out-of-band from updateInsightBoard so a client holding only a slim summary (no model) can flip visibility without risking a clobber of the board's widget config. Returns the updated board

Response

Returns an InsightBoard!

Arguments
Name Description
id - ID!
shared - Boolean!

Example

Query
mutation shareInsightBoard(
  $id: ID!,
  $shared: Boolean!
) {
  shareInsightBoard(
    id: $id,
    shared: $shared
  ) {
    id
    createdBy
    folder
    name
    description
    tags
    model
    shareKey
    shared
    version
    createdAt
    updatedAt
  }
}
Variables
{"id": 4, "shared": true}
Response
{
  "data": {
    "shareInsightBoard": {
      "id": "4",
      "createdBy": "abc123",
      "folder": "abc123",
      "name": "abc123",
      "description": "abc123",
      "tags": ["abc123"],
      "model": {},
      "shareKey": "xyz789",
      "shared": false,
      "version": 123,
      "createdAt": "xyz789",
      "updatedAt": "xyz789"
    }
  }
}

startSensorValidation

Description

Enqueue an operator-started validation-mode job for a Gen-3 sensor (pending_qa | deployed → validating). Durable intent; drained by the cloud→Hive command dispatcher (P1-4)

Response

Returns a SensorPairingJob!

Arguments
Name Description
input - SensorPairingActionInput!

Example

Query
mutation startSensorValidation($input: SensorPairingActionInput!) {
  startSensorValidation(input: $input) {
    id
    mac_address
    kind
    status
    deadline
    phase
    phase_hop
    phase_outcome
    phase_actor
    phase_since
    phase_inferred
    phase_terminal
    reason_code
    reason
    detail
    history {
      ts
      hop
      phase
      outcome
      actor
      note
      reason_code
      reason
      at
      detail
    }
  }
}
Variables
{"input": SensorPairingActionInput}
Response
{
  "data": {
    "startSensorValidation": {
      "id": "abc123",
      "mac_address": "xyz789",
      "kind": "xyz789",
      "status": "abc123",
      "deadline": 123,
      "phase": "xyz789",
      "phase_hop": 987,
      "phase_outcome": "xyz789",
      "phase_actor": "xyz789",
      "phase_since": 987,
      "phase_inferred": true,
      "phase_terminal": true,
      "reason_code": "xyz789",
      "reason": "xyz789",
      "detail": "xyz789",
      "history": [SensorPairingJobEvent]
    }
  }
}

updateAlertConfigs

Description

Update one or more existing alert configs

Response

Returns [AlertConfig!]

Arguments
Name Description
input - [AlertConfigUpdateInput!]!

Example

Query
mutation updateAlertConfigs($input: [AlertConfigUpdateInput!]!) {
  updateAlertConfigs(input: $input) {
    id
    name
    event_types
    status
    filters
    channels
    cooldown_mins
  }
}
Variables
{"input": [AlertConfigUpdateInput]}
Response
{
  "data": {
    "updateAlertConfigs": [
      {
        "id": "4",
        "name": "xyz789",
        "event_types": ["CAPACITY_EXCEEDED_ROOM"],
        "status": false,
        "filters": {},
        "channels": {},
        "cooldown_mins": 123
      }
    ]
  }
}

updateFloorInfo

Description

Update the metadata of a floor

Response

Returns an UpdateFloorInfoResult!

Arguments
Name Description
input - UpdateFloorInfoInput!

Example

Query
mutation updateFloorInfo($input: UpdateFloorInfoInput!) {
  updateFloorInfo(input: $input) {
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
  }
}
Variables
{"input": UpdateFloorInfoInput}
Response
{"data": {"updateFloorInfo": {"floor": Floor}}}

updateHives

Description

Update multiple Hive entities

Response

Returns [Hive!]

Example

Query
mutation updateHives {
  updateHives {
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    coordinates
    name
    connectionHealth {
      status
      codes {
        ...ConnectionHealthCodeHiveFragment
      }
    }
    is_sleep_time
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    note
    model
    model_name
    installed
    device_status
    is_clone
    source_serial_number
    client_id
    floor_id
    room_id
    hive_id
    serial_number
    hive_version
    hive_type
    last_heartbeat
    last_raw_message
    last_compressed_message
    last_occupancy_message
    last_detection_message
    last_network_id
    is_streaming
    activated_at
    is_online
    net_path_stability
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeHiveFragment
      }
    }
  }
}
Response
{
  "data": {
    "updateHives": [
      {
        "id": "4",
        "floor": Floor,
        "room": Room,
        "metadata": MetaData,
        "coordinates": [123.45],
        "name": "abc123",
        "connectionHealth": ConnectionHealthHive,
        "is_sleep_time": false,
        "sensors": [Sensor],
        "note": "abc123",
        "model": "xyz789",
        "model_name": "xyz789",
        "installed": true,
        "device_status": "ACTIVE",
        "is_clone": true,
        "source_serial_number": "abc123",
        "client_id": "abc123",
        "floor_id": "abc123",
        "room_id": "xyz789",
        "hive_id": 4,
        "serial_number": "xyz789",
        "hive_version": "xyz789",
        "hive_type": "xyz789",
        "last_heartbeat": 123,
        "last_raw_message": 987,
        "last_compressed_message": 123,
        "last_occupancy_message": 123,
        "last_detection_message": 987,
        "last_network_id": 987,
        "is_streaming": true,
        "activated_at": 123,
        "is_online": false,
        "net_path_stability": 123.45,
        "connection_health": ConnectionHealthHive
      }
    ]
  }
}

updateInsightBoard

Description

Update an insight board. Optimistic-locking via version: the request is rejected if the supplied version doesn't match the server-side version (refetch + retry or merge to resolve). The server increments the version on every successful write

Response

Returns an InsightBoard!

Arguments
Name Description
input - InsightBoardUpdateInput!

Example

Query
mutation updateInsightBoard($input: InsightBoardUpdateInput!) {
  updateInsightBoard(input: $input) {
    id
    createdBy
    folder
    name
    description
    tags
    model
    shareKey
    shared
    version
    createdAt
    updatedAt
  }
}
Variables
{"input": InsightBoardUpdateInput}
Response
{
  "data": {
    "updateInsightBoard": {
      "id": "4",
      "createdBy": "xyz789",
      "folder": "abc123",
      "name": "abc123",
      "description": "xyz789",
      "tags": ["xyz789"],
      "model": {},
      "shareKey": "xyz789",
      "shared": false,
      "version": 123,
      "createdAt": "abc123",
      "updatedAt": "xyz789"
    }
  }
}

updateRooms

Description

Update multiple Room entities

Response

Returns [Room!]

Arguments
Name Description
rooms - [UpdateRoomInput!]! A list of UpdateRoomInput objects containing the information for updating existing Room entities

Example

Query
mutation updateRooms($rooms: [UpdateRoomInput!]!) {
  updateRooms(rooms: $rooms) {
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    area {
      value
      unit
    }
    coordinates
    capacity {
      mid
      max
    }
    rotation
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    note
    pir_zero_enable
    pir_zero_threshold
    pir_zero_window
    algorithm_config
    room_id
    client_id
    floor_id
    color
    room_type
    auto_calibrated_at
  }
}
Variables
{"rooms": [UpdateRoomInput]}
Response
{
  "data": {
    "updateRooms": [
      {
        "id": 4,
        "floor": Floor,
        "metadata": MetaData,
        "name": "abc123",
        "area": Area,
        "coordinates": [123.45],
        "capacity": Capacity,
        "rotation": 123.45,
        "tags": [Tag],
        "sensors": [Sensor],
        "spots": [Spot],
        "unit": Unit,
        "note": "xyz789",
        "pir_zero_enable": false,
        "pir_zero_threshold": 987.65,
        "pir_zero_window": 987,
        "algorithm_config": {},
        "room_id": "4",
        "client_id": "xyz789",
        "floor_id": "abc123",
        "color": [987.65],
        "room_type": "xyz789",
        "auto_calibrated_at": 987
      }
    ]
  }
}

updateSensors

Description

Update multiple Sensor entities

Response

Returns [Sensor!]

Arguments
Name Description
sensors - [UpdateSensorInput!]! A list of UpdateSensorInput objects containing the information for updating existing Sensor entities

Example

Query
mutation updateSensors($sensors: [UpdateSensorInput!]!) {
  updateSensors(sensors: $sensors) {
    pairing_status {
      state
      lane
      cred_state
      is_online
      last_job_kind
      last_job_status
      qa_signed_by
      qa_signed_at
      is_locked
      locked_at
      locked_by
      floor_placement_phase
      is_factory_adoptable
      serving_hive_id
    }
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    hive {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      is_sleep_time
      sensors {
        ...SensorFragment
      }
      note
      model
      model_name
      installed
      device_status
      is_clone
      source_serial_number
      client_id
      floor_id
      room_id
      hive_id
      serial_number
      hive_version
      hive_type
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      last_network_id
      is_streaming
      activated_at
      is_online
      net_path_stability
      connection_health {
        ...ConnectionHealthHiveFragment
      }
    }
    hive_serial
    last_network_id
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    zone_ids
    sensor_id
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    mac_address
    mode
    model
    sensitivity
    center
    height
    is_entrance
    is_building_entrance
    is_online
    parallel_to_door
    active_hours
    calibration {
      auto_calibrated_at
      auto_calibrate_start
      auto_calibrate_end
      auto_calibrate_person
    }
    door_line
    generation
    in_direction
    last_heartbeat
    last_raw_message
    last_compressed_message
    last_occupancy_message
    last_detection_message
    messages_per_second
    is_streaming
    orientation
    effective_field_of_view
    field_of_view
    algo_config {
      cold_person_detection
      blacklist
      sunlight
      shortened_doorline
      polyline_door_line
    }
    algorithm_config
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeSensorFragment
      }
    }
    is_sleep_time
    last_battery_change_date
    sensor_serial
    next_battery_change_date
    power_type
    estimated_total_runtime_days
    note
    pir_zero_enable
    is_clone
    is_mirror
    is_shallow_copy
    source_mac_address
    clones {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    mirrors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    device_status
    room_id
    floor_id
    hive_id
  }
}
Variables
{"sensors": [UpdateSensorInput]}
Response
{
  "data": {
    "updateSensors": [
      {
        "pairing_status": SensorPairingStatus,
        "id": 4,
        "floor": Floor,
        "unit": Unit,
        "room": Room,
        "hive": Hive,
        "hive_serial": "xyz789",
        "last_network_id": 123,
        "zones": [Zone],
        "zone_ids": ["xyz789"],
        "sensor_id": 4,
        "metadata": MetaData,
        "name": "abc123",
        "mac_address": "xyz789",
        "mode": "xyz789",
        "model": "xyz789",
        "sensitivity": 123.45,
        "center": [987.65],
        "height": 123.45,
        "is_entrance": true,
        "is_building_entrance": true,
        "is_online": false,
        "parallel_to_door": true,
        "active_hours": [123.45],
        "calibration": SensorCalibration,
        "door_line": 987.65,
        "generation": 987.65,
        "in_direction": 123.45,
        "last_heartbeat": 123,
        "last_raw_message": 987,
        "last_compressed_message": 123,
        "last_occupancy_message": 987,
        "last_detection_message": 987,
        "messages_per_second": 123.45,
        "is_streaming": false,
        "orientation": [123.45],
        "effective_field_of_view": 123.45,
        "field_of_view": 123.45,
        "algo_config": AlgoConfig,
        "algorithm_config": {},
        "connection_health": ConnectionHealthSensor,
        "is_sleep_time": false,
        "last_battery_change_date": "10:15:30Z",
        "sensor_serial": "abc123",
        "next_battery_change_date": "10:15:30Z",
        "power_type": "Wired",
        "estimated_total_runtime_days": 123,
        "note": "abc123",
        "pir_zero_enable": false,
        "is_clone": false,
        "is_mirror": true,
        "is_shallow_copy": false,
        "source_mac_address": "xyz789",
        "clones": [Sensor],
        "mirrors": [Sensor],
        "device_status": "ACTIVE",
        "room_id": "xyz789",
        "floor_id": "xyz789",
        "hive_id": "4"
      }
    ]
  }
}

updateTags

Description

Update tags

Response

Returns [Tag!]

Arguments
Name Description
input - [UpdateTagInput!]

Example

Query
mutation updateTags($input: [UpdateTagInput!]) {
  updateTags(input: $input) {
    id
    name
    organization_id
    rooms {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    floors {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
  }
}
Variables
{"input": [UpdateTagInput]}
Response
{
  "data": {
    "updateTags": [
      {
        "id": "abc123",
        "name": "abc123",
        "organization_id": "xyz789",
        "rooms": [Room],
        "zones": [Zone],
        "floors": [Floor],
        "spots": [Spot]
      }
    ]
  }
}

updateUnits

Description

Update multiple Unit entities

Response

Returns [Unit!]

Arguments
Name Description
units - [UpdateUnitInput!]! A list of UpdateUnitInput objects containing the information for updating existing Unit entities

Example

Query
mutation updateUnits($units: [UpdateUnitInput!]!) {
  updateUnits(units: $units) {
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    coordinates
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    note
    rooms {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
  }
}
Variables
{"units": [UpdateUnitInput]}
Response
{
  "data": {
    "updateUnits": [
      {
        "id": 4,
        "floor": Floor,
        "metadata": MetaData,
        "name": "abc123",
        "coordinates": [123.45],
        "tags": [Tag],
        "note": "abc123",
        "rooms": [Room],
        "zones": [Zone],
        "sensors": [Sensor]
      }
    ]
  }
}

updateWebhooks

Description

Mutation to update one or more existing webhooks

Response

Returns [Webhook!]

Arguments
Name Description
input - [WebhookUpdateInput!]! A list of WebhookUpdateInput objects, each containing the ID of the webhook to update and the fields to modify

Example

Query
mutation updateWebhooks($input: [WebhookUpdateInput!]!) {
  updateWebhooks(input: $input) {
    id
    name
    event_types
    endpoint_config {
      url
      http_timeout
      api_key {
        ...ApiKeyFragment
      }
      basic_auth {
        ...BasicAuthFragment
      }
    }
    filters
    send_on_value_change
  }
}
Variables
{"input": [WebhookUpdateInput]}
Response
{
  "data": {
    "updateWebhooks": [
      {
        "id": 4,
        "name": "xyz789",
        "event_types": ["FLOOR_OCCUPANCY"],
        "endpoint_config": EndpointConfig,
        "filters": {},
        "send_on_value_change": false
      }
    ]
  }
}

updateZones

Description

Update multiple Zone entities

Response

Returns [Zone!]

Arguments
Name Description
zones - [UpdateZoneInput!]! A list of UpdateZoneInput objects containing the information for updating existing Zone entities

Example

Query
mutation updateZones($zones: [UpdateZoneInput!]!) {
  updateZones(zones: $zones) {
    id
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    area {
      value
      unit
    }
    coordinates
    rotation
    capacity {
      mid
      max
    }
    sensors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    spots {
      id
      floorID
      roomID
      name
      spotType
      location
      tags {
        ...TagFragment
      }
      note
      customID
      metadata {
        ...MetaDataFragment
      }
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    note
    customID
    tags {
      id
      name
      organization_id
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      floors {
        ...FloorFragment
      }
      spots {
        ...SpotFragment
      }
    }
    client_id
    floor_id
    room_id
    zone_id
    zone_type
    color
  }
}
Variables
{"zones": [UpdateZoneInput]}
Response
{
  "data": {
    "updateZones": [
      {
        "id": "4",
        "metadata": MetaData,
        "name": "abc123",
        "area": Area,
        "coordinates": [123.45],
        "rotation": 123.45,
        "capacity": Capacity,
        "sensors": [Sensor],
        "spots": [Spot],
        "unit": Unit,
        "note": "abc123",
        "customID": "4",
        "tags": [Tag],
        "client_id": "xyz789",
        "floor_id": "abc123",
        "room_id": "abc123",
        "zone_id": "xyz789",
        "zone_type": "xyz789",
        "color": [123.45]
      }
    ]
  }
}

upsertSensors

Description

Upsert multiple Sensor entities

Response

Returns [Sensor!]

Arguments
Name Description
sensors - [CreateSensorInput!]! A list of CreateSensorInput objects containing the information for upserting Sensor entities

Example

Query
mutation upsertSensors($sensors: [CreateSensorInput!]!) {
  upsertSensors(sensors: $sensors) {
    pairing_status {
      state
      lane
      cred_state
      is_online
      last_job_kind
      last_job_status
      qa_signed_by
      qa_signed_at
      is_locked
      locked_at
      locked_by
      floor_placement_phase
      is_factory_adoptable
      serving_hive_id
    }
    id
    floor {
      id
      building_id
      building {
        ...BuildingFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      timezone
      area {
        ...AreaFragment
      }
      capacity {
        ...CapacityFragment
      }
      installation_date
      installation_status
      sensors {
        ...SensorFragment
      }
      hives {
        ...HiveFragment
      }
      last_battery_change_date
      next_battery_change_date
      floor_plans {
        ...FloorPlanFragment
      }
      floorNumber
      tags {
        ...TagFragment
      }
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      units {
        ...UnitFragment
      }
      spots {
        ...SpotFragment
      }
      buildingId
      algorithm_config
      end_of_day_time
      end_of_day_occupancy
      is_building_data_source
      exclude_from_building_view
      is_demo
      floor_id
      client_id
    }
    unit {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      coordinates
      tags {
        ...TagFragment
      }
      note
      rooms {
        ...RoomFragment
      }
      zones {
        ...ZoneFragment
      }
      sensors {
        ...SensorFragment
      }
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      pir_zero_enable
      pir_zero_threshold
      pir_zero_window
      algorithm_config
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    hive {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      is_sleep_time
      sensors {
        ...SensorFragment
      }
      note
      model
      model_name
      installed
      device_status
      is_clone
      source_serial_number
      client_id
      floor_id
      room_id
      hive_id
      serial_number
      hive_version
      hive_type
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      last_network_id
      is_streaming
      activated_at
      is_online
      net_path_stability
      connection_health {
        ...ConnectionHealthHiveFragment
      }
    }
    hive_serial
    last_network_id
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      spots {
        ...SpotFragment
      }
      unit {
        ...UnitFragment
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    zone_ids
    sensor_id
    metadata {
      created_at
      updated_at
      deleted_at
    }
    name
    mac_address
    mode
    model
    sensitivity
    center
    height
    is_entrance
    is_building_entrance
    is_online
    parallel_to_door
    active_hours
    calibration {
      auto_calibrated_at
      auto_calibrate_start
      auto_calibrate_end
      auto_calibrate_person
    }
    door_line
    generation
    in_direction
    last_heartbeat
    last_raw_message
    last_compressed_message
    last_occupancy_message
    last_detection_message
    messages_per_second
    is_streaming
    orientation
    effective_field_of_view
    field_of_view
    algo_config {
      cold_person_detection
      blacklist
      sunlight
      shortened_doorline
      polyline_door_line
    }
    algorithm_config
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeSensorFragment
      }
    }
    is_sleep_time
    last_battery_change_date
    sensor_serial
    next_battery_change_date
    power_type
    estimated_total_runtime_days
    note
    pir_zero_enable
    is_clone
    is_mirror
    is_shallow_copy
    source_mac_address
    clones {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    mirrors {
      pairing_status {
        ...SensorPairingStatusFragment
      }
      id
      floor {
        ...FloorFragment
      }
      unit {
        ...UnitFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      last_network_id
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_entrance
      is_building_entrance
      is_online
      parallel_to_door
      active_hours
      calibration {
        ...SensorCalibrationFragment
      }
      door_line
      generation
      in_direction
      last_heartbeat
      last_raw_message
      last_compressed_message
      last_occupancy_message
      last_detection_message
      messages_per_second
      is_streaming
      orientation
      effective_field_of_view
      field_of_view
      algo_config {
        ...AlgoConfigFragment
      }
      algorithm_config
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      is_sleep_time
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      power_type
      estimated_total_runtime_days
      note
      pir_zero_enable
      is_clone
      is_mirror
      is_shallow_copy
      source_mac_address
      clones {
        ...SensorFragment
      }
      mirrors {
        ...SensorFragment
      }
      device_status
      room_id
      floor_id
      hive_id
    }
    device_status
    room_id
    floor_id
    hive_id
  }
}
Variables
{"sensors": [CreateSensorInput]}
Response
{
  "data": {
    "upsertSensors": [
      {
        "pairing_status": SensorPairingStatus,
        "id": "4",
        "floor": Floor,
        "unit": Unit,
        "room": Room,
        "hive": Hive,
        "hive_serial": "abc123",
        "last_network_id": 123,
        "zones": [Zone],
        "zone_ids": ["xyz789"],
        "sensor_id": 4,
        "metadata": MetaData,
        "name": "xyz789",
        "mac_address": "abc123",
        "mode": "abc123",
        "model": "xyz789",
        "sensitivity": 987.65,
        "center": [123.45],
        "height": 987.65,
        "is_entrance": false,
        "is_building_entrance": false,
        "is_online": false,
        "parallel_to_door": false,
        "active_hours": [987.65],
        "calibration": SensorCalibration,
        "door_line": 123.45,
        "generation": 123.45,
        "in_direction": 123.45,
        "last_heartbeat": 987,
        "last_raw_message": 987,
        "last_compressed_message": 987,
        "last_occupancy_message": 987,
        "last_detection_message": 987,
        "messages_per_second": 123.45,
        "is_streaming": true,
        "orientation": [123.45],
        "effective_field_of_view": 987.65,
        "field_of_view": 987.65,
        "algo_config": AlgoConfig,
        "algorithm_config": {},
        "connection_health": ConnectionHealthSensor,
        "is_sleep_time": false,
        "last_battery_change_date": "10:15:30Z",
        "sensor_serial": "xyz789",
        "next_battery_change_date": "10:15:30Z",
        "power_type": "Wired",
        "estimated_total_runtime_days": 123,
        "note": "abc123",
        "pir_zero_enable": true,
        "is_clone": false,
        "is_mirror": false,
        "is_shallow_copy": true,
        "source_mac_address": "abc123",
        "clones": [Sensor],
        "mirrors": [Sensor],
        "device_status": "ACTIVE",
        "room_id": "abc123",
        "floor_id": "abc123",
        "hive_id": "4"
      }
    ]
  }
}

Types

APIKeyUpdate

Description

Input type for updating API key configuration, defining the API key and the header name to be used

Fields
Input Field Description
key - String The header key name to be used for the API key, such as 'x-api-key'. If omitted, the header key remains unchanged
value - String The actual API key value for authentication. If omitted, the API key value remains unchanged
Example
{
  "key": "xyz789",
  "value": "xyz789"
}

Address

Description

A type representing an address

Fields
Field Name Description
lines - [String!]! A list of address lines, as you'd write them on an envelope according to the rules of the locality where the address is located
country - String The country where the address is located
Example
{
  "lines": ["xyz789"],
  "country": "abc123"
}

AlertConfig

Description

An alert configuration that sends notifications via configured channels when capacity-exceeded events occur

Fields
Field Name Description
id - ID!
name - String!
event_types - [AlertEventType!]!
status - Boolean!
filters - JSON
channels - JSON! Notification channels. V1 schema: {"email": {"to": ["addr1", ...], "cc": ["addr2", ...]}}
cooldown_mins - Int!
Example
{
  "id": 4,
  "name": "abc123",
  "event_types": ["CAPACITY_EXCEEDED_ROOM"],
  "status": false,
  "filters": {},
  "channels": {},
  "cooldown_mins": 123
}

AlertConfigCreateInput

Fields
Input Field Description
name - String!
event_types - [AlertEventType!]!
channels - JSON!
cooldown_mins - Int
filters - JSON
Example
{
  "name": "xyz789",
  "event_types": ["CAPACITY_EXCEEDED_ROOM"],
  "channels": {},
  "cooldown_mins": 987,
  "filters": {}
}

AlertConfigUpdateInput

Fields
Input Field Description
id - ID!
name - String
event_types - [AlertEventType!]
channels - JSON
cooldown_mins - Int
filters - JSON
status - Boolean
Example
{
  "id": "4",
  "name": "xyz789",
  "event_types": ["CAPACITY_EXCEEDED_ROOM"],
  "channels": {},
  "cooldown_mins": 987,
  "filters": {},
  "status": false
}

AlertEventType

Description

Enum for alert event types — capacity-exceeded events only

Values
Enum Value Description

CAPACITY_EXCEEDED_ROOM

CAPACITY_EXCEEDED_ZONE

CAPACITY_EXCEEDED_FLOOR

Example
"CAPACITY_EXCEEDED_ROOM"

AlgoConfig

Description

The type representing the algorithm configuration settings for a sensor

Fields
Field Name Description
cold_person_detection - Boolean! Indicates if cold person detection is enabled
blacklist - [Float!] A list of blacklisted coordinate areas for the sensor
sunlight - Boolean! Indicates if sunlight detection is enabled
shortened_doorline - [Float!] Shortened doorline setting values
polyline_door_line - [Float!] Polyline door line coordinates as an array of [x, y] points
Example
{
  "cold_person_detection": true,
  "blacklist": [987.65],
  "sunlight": true,
  "shortened_doorline": [123.45],
  "polyline_door_line": [123.45]
}

AlgoConfigInput

Description

The input object used for updating sensor algorithm configuration settings

Fields
Input Field Description
blacklist - [Float!] A list of blacklisted coordinate areas for the sensor (optional)
cold_person_detection - Boolean Indicates if cold person detection is enabled (optional)
shortened_doorline - [Float!] Shortened doorline setting values (optional)
sunlight - Boolean Indicates if sunlight detection is enabled (optional)
polyline_door_line - [Float!] Polyline door line coordinates as an array of [x, y] points (optional)
Example
{
  "blacklist": [987.65],
  "cold_person_detection": false,
  "shortened_doorline": [123.45],
  "sunlight": false,
  "polyline_door_line": [987.65]
}

ApiKey

Description

A type representing API credentials

Fields
Field Name Description
key - String! This key represents the type of header key, often specifying the header name to be used in authentication, such as 'x-api-key'
value - String! The actual API key value used for authentication in requests
Example
{
  "key": "xyz789",
  "value": "abc123"
}

ApiKeyInput

Description

Input type for API key configuration, defining the API key and the header name to be used

Fields
Input Field Description
key - String! The header key name to be used for the API key, such as 'x-api-key'
value - String! The actual API key value for authentication
Example
{
  "key": "xyz789",
  "value": "abc123"
}

Area

Description

A type representing the area of an entity

Fields
Field Name Description
value - Float! The area value
unit - String! The unit of measurement for the area
Example
{"value": 987.65, "unit": "abc123"}

AreaInput

Description

An input type for specifying an area

Fields
Input Field Description
area - Float The area value
area_unit - String The unit of measurement for the area
Example
{"area": 987.65, "area_unit": "abc123"}

AssociateTagInput

Fields
Input Field Description
ids - [String!]
tag_id - String!
Example
{
  "ids": ["abc123"],
  "tag_id": "xyz789"
}

Association

Fields
Field Name Description
tag - Tag!
zones - [Zone!]!
rooms - [Room!]!
floors - [Floor!]!
spots - [Spot!]!
Example
{
  "tag": Tag,
  "zones": [Zone],
  "rooms": [Room],
  "floors": [Floor],
  "spots": [Spot]
}

BasicAuth

Description

A type representing basic authentication configuration

Fields
Field Name Description
username - String! The username for basic authentication
password - String! The password associated with the username for basic authentication
Example
{
  "username": "abc123",
  "password": "abc123"
}

BasicAuthInput

Description

Input type for basic authentication, specifying username and password credentials

Fields
Input Field Description
username - String! The username for basic authentication
password - String! The password for basic authentication, associated with the username
Example
{
  "username": "abc123",
  "password": "xyz789"
}

BasicAuthUpdate

Description

Input type for updating basic authentication credentials, specifying the username and password

Fields
Input Field Description
username - String The username for basic authentication. If omitted, the username remains unchanged
password - String The password for basic authentication, associated with the username. If omitted, the password remains unchanged
Example
{
  "username": "xyz789",
  "password": "xyz789"
}

Boolean

Description

The Boolean scalar type represents true or false

Building

Description

A Building is a physical structure that can contain multiple floors. Buildings are grouped into Sites. A Building aggregates some aspects of its constituent floors, like capacity. Buildings often also have distinct postal addresses. Otherwise, they're useful as a grouping mechanism for floors

Fields
Field Name Description
id - ID! The unique identifier of this building in the Butlr system
name - String! Each building can be given a name to make it easier to identify
capacity - Capacity! Capacity limits of the building. The max capacity of the building is calculated from the sum of all floors' max capacity unless manually overridden
floors - [Floor!]! Returns all floors inside the building
building_number - Int The building number of the building. Building numbers are unique among buildings in one site
buildingNumber - Int The building number of the building. Building numbers are unique among buildings in one site Use building_number instead.
address - Address The address of this building
site - Site! The site that this building belongs to
Example
{
  "id": 4,
  "name": "xyz789",
  "capacity": Capacity,
  "floors": [Floor],
  "building_number": 987,
  "buildingNumber": 987,
  "address": Address,
  "site": Site
}

Buildings

Fields
Field Name Description
data - [Building!]!
Example
{"data": [Building]}

Capacity

Description

A type representing the capacity of an entity

Fields
Field Name Description
mid - Float! The mid capacity value
max - Float! The maximum capacity value
Example
{"mid": 123.45, "max": 123.45}

CapacityInput

Description

An input type for specifying a capacity

Fields
Input Field Description
capacity - Float The maximum capacity value
mid_capacity - Float The mid capacity value
Example
{"capacity": 987.65, "mid_capacity": 123.45}

ChangeHiveInput

Fields
Input Field Description
mac_address - String! MAC of the sensor to steer off its current hive, in any of the accepted EUI-48 spellings: colon (f0:68:e3:11:f3:af), dash, Cisco dotted (f068.e311.f3af) or bare 12-hex, in any case. It is canonicalized to lowercase-colon before lookup and storage, so the spelling a label, QR scan or hive log happens to use does not matter. Mixed colon/dash separators are refused. Gen-2 EUI-64 and synthetic clone/mirror MACs are refused too, not reshaped — pairing is Gen-3 (Heatic 3) only
target_hive_id - String!

Id of the hive the sensor is being steered TOWARDS. Recorded as the operator's intent and carried to the source hive so it can refuse a no-op (steering a sensor at the hive it is already on) — NOT a promise the sensor will land there, and never read back as confirmation that it did.

ADVISORY AT EXECUTION TIME, validated at enqueue. The sensor re-homes by walking its OWN stored credential list and picking by signal strength; no layer steers it toward this hive. At enqueue the field is checked for existence, tenancy, a non-empty serial, and — when both floors are known — that the hive is on the SENSOR'S OWN FLOOR (a cross-floor target is refused with a coded error rather than accepted and stranded). It is still NOT checked against the credentials the sensor actually holds: a same-floor hive the sensor has no slot for is accepted, confirms at departure, and the sensor lands wherever its list allows. Departure is the only observable outcome either way

Example
{
  "mac_address": "abc123",
  "target_hive_id": "abc123"
}

CloneSensorInput

Description

The input object used for cloning an existing sensor into a virtual sensor. The clone MAC address is generated automatically by the server

Fields
Input Field Description
source_mac_address - String! The MAC address of the source sensor to clone
floor_id - String The unique identifier of the floor for the clone (optional, defaults to source's floor)
room_id - String The unique identifier of the room for the clone (optional, defaults to source's room)
name - String The name of the cloned sensor (optional, defaults to " (Clone)")
center - [Float!] The center coordinates for the cloned sensor (optional, defaults to source's center)
height - Float The height for the cloned sensor (optional, defaults to source's height)
mode - String The operational mode for the cloned sensor (optional, defaults to source's mode)
orientation - [Float!] The orientation for the cloned sensor (optional, defaults to source's orientation)
door_line - Float The door line distance for the cloned sensor (optional)
is_entrance - Boolean Whether the cloned sensor is at an entrance (optional)
parallel_to_door - Boolean Whether the cloned sensor is parallel to a door (optional)
in_direction - Float The in-direction value for the cloned sensor (optional)
Example
{
  "source_mac_address": "xyz789",
  "floor_id": "abc123",
  "room_id": "abc123",
  "name": "abc123",
  "center": [987.65],
  "height": 123.45,
  "mode": "abc123",
  "orientation": [987.65],
  "door_line": 987.65,
  "is_entrance": true,
  "parallel_to_door": false,
  "in_direction": 987.65
}

ConfirmSensorQaInput

Fields
Input Field Description
mac_address - String! MAC of the target sensor, in any of the accepted EUI-48 spellings: colon (f0:68:e3:11:f3:af), dash, Cisco dotted (f068.e311.f3af) or bare 12-hex, in any case. It is canonicalized to lowercase-colon before lookup and storage, so the spelling a label, QR scan or hive log happens to use does not matter. Mixed colon/dash separators are refused. Gen-2 EUI-64 and synthetic clone/mirror MACs are refused too, not reshaped — pairing is Gen-3 (Heatic 3) only
note - String Optional free-text note recorded with the sign-off
Example
{
  "mac_address": "xyz789",
  "note": "xyz789"
}

ConnectionHealthCodeHive

Description

Represents a specific connection health code for a hive

Fields
Field Name Description
code - ConnectionHealthCodeStatusHive! The type of connection health code
description - String! A description of the connection health issue
last_timestamp - Int The timestamp of the last recorded event related to the code
compared_timestamp - Int! The timestamp of the last comparison for the code
is_error - Boolean! Indicates whether the code represents an error
Example
{
  "code": "NO_HIVE_STREAMING",
  "description": "xyz789",
  "last_timestamp": 987,
  "compared_timestamp": 123,
  "is_error": false
}

ConnectionHealthCodeSensor

Description

Represents a specific connection health code for a sensor

Fields
Field Name Description
code - ConnectionHealthCodeStatusSensor! The type of connection health code
description - String! A description of the connection health issue
last_timestamp - Int The timestamp of the last recorded event related to the code
compared_timestamp - Int! The timestamp of the last comparison for the code
is_error - Boolean! Indicates whether the code represents an error
Example
{
  "code": "NO_HIVE_STREAMING",
  "description": "xyz789",
  "last_timestamp": 123,
  "compared_timestamp": 987,
  "is_error": false
}

ConnectionHealthCodeStatusHive

Description

The possible types of connection health codes for a hive

Values
Enum Value Description

NO_HIVE_STREAMING

The hive is not streaming data

NO_HIVE_HEARTBEAT

The hive has not sent a heartbeat recently

HIVE_STREAMING

The hive is streaming data

HIVE_HEARTBEAT

The hive has sent a heartbeat recently
Example
"NO_HIVE_STREAMING"

ConnectionHealthCodeStatusSensor

Description

The possible types of connection health codes for a sensor

Values
Enum Value Description

NO_HIVE_STREAMING

The hive is not streaming data

NO_HIVE_HEARTBEAT

The hive has not sent a heartbeat recently

NO_SENSOR_STREAMING

The sensor is not streaming data

NO_SENSOR_HEARTBEAT

The sensor has not sent a heartbeat recently

SENSOR_STREAMING

The sensor is streaming data

SENSOR_HEARTBEAT

The sensor has sent a heartbeat recently

HIVE_STREAMING

The hive is streaming data

HIVE_HEARTBEAT

The hive has sent a heartbeat recently
Example
"NO_HIVE_STREAMING"

ConnectionHealthHive

Description

Represents a hive that provides connection health data

Fields
Field Name Description
status - ConnectionHealthStatus! The overall health status of the hive's connection
codes - [ConnectionHealthCodeHive!]! A list of detailed connection health codes for the hive
Example
{
  "status": "NOT_CONNECTED",
  "codes": [ConnectionHealthCodeHive]
}

ConnectionHealthSensor

Description

Represents a sensor that provides connection health data

Fields
Field Name Description
status - ConnectionHealthStatus! The overall health status of the sensor's connection to the hive
codes - [ConnectionHealthCodeSensor!]! A list of detailed connection health codes for the sensor
Example
{
  "status": "NOT_CONNECTED",
  "codes": [ConnectionHealthCodeSensor]
}

ConnectionHealthStatus

Description

The overall health status of a connection

Values
Enum Value Description

NOT_CONNECTED

The connection is not connected

PARTIALLY_CONNECTED

The connection is partially connected, meaning it may be experiencing some issues

CONNECTED

The connection is fully connected and operational
Example
"NOT_CONNECTED"

Coords

Description

Geographic coordinates representing a latitude and longitude pair

Fields
Field Name Description
latitude - Float! Latitude in decimal degrees
longitude - Float! Longitude in decimal degrees
Example
{"latitude": 987.65, "longitude": 123.45}

CreateRoomInput

Description

Input for creating a Room entity

Fields
Input Field Description
room_id - ID Provide your own ID for this room to make this operation idempotent. It will re-create the room if it already exists, overwriting any provided values
floor_id - String! The unique identifier of the associated floor
name - String! The display name of the room
room_type - String The type of room (e.g., 'office', 'conference')
coordinates - [Float!] The coordinates of the room's vertices
color - [Float!] The RGBA color associated with the room
area - AreaInput The area of the room
capacity - CapacityInput The room's capacity information
rotation - Float The new rotation of the room (in degrees)
note - String Note for the zone
pir_zero_enable - Boolean Whether PIR zeroing is enabled for this room. When enabled, PIR motion data will be used to generate zero-occupancy calibration points
pir_zero_threshold - Float Custom PIR confidence threshold for this room (0.0-1.0). If not provided, uses the default threshold of 0.05
pir_zero_window - Int Custom minimum duration (in seconds) for PIR absence periods to trigger calibration. If not provided, uses the default of 300 seconds (5 minutes)
Example
{
  "room_id": "4",
  "floor_id": "xyz789",
  "name": "abc123",
  "room_type": "abc123",
  "coordinates": [987.65],
  "color": [987.65],
  "area": AreaInput,
  "capacity": CapacityInput,
  "rotation": 123.45,
  "note": "abc123",
  "pir_zero_enable": false,
  "pir_zero_threshold": 123.45,
  "pir_zero_window": 123
}

CreateSensorInput

Description

The input object used for creating a new sensor with various attributes

Fields
Input Field Description
sensor_id - ID Provide your own ID for this room to make this operation idempotent. It will re-create the sensor if it already exists, overwriting any provided values
floor_id - String The unique identifier of the floor that will contain the sensor (optional)
room_id - String The unique identifier of the room that will contain the sensor (optional)
hive_id - String The unique identifier of the hive that the sensor will belong to (optional)
hive_serial - String The serial number of the hive that the sensor will belong to (optional)
name - String The name of the sensor (optional)
mac_address - String! The MAC address of the sensor
mode - String The operational mode of the sensor (optional)
model - String The model of the sensor (optional)
sensitivity - Float The sensitivity level of the sensor (optional)
center - [Float!] The center coordinates of the sensor's coverage area
height - Float The height of the sensor (optional)
is_entrance - Boolean Indicates if the sensor is located at an entrance (optional)
is_building_entrance - Boolean Indicates if the sensor is located at a building entrance (optional)
parallel_to_door - Boolean Indicates if the sensor is parallel to a door (optional)
active_hours - [Float!] The active hours for the sensor
calibration - SensorCalibrationInput The calibration information of the sensor (optional)
door_line - Float The door line distance value for the sensor (optional)
generation - Float The generation of the sensor (optional)
in_direction - Float The direction value for the sensor's detection area (optional)
orientation - [Float!] The orientation of the sensor (optional)
field_of_view - Float The field of view value for the sensor (optional)
color - [Float!] The color of the sensor (optional)
algo_config - AlgoConfigInput The algorithm configuration settings for the sensor (optional)
last_battery_change_date - Time Last battery change date for the sensor
next_battery_change_date - Time Next battery change date for the sensor
power_type - SensorPowerType The power type of the sensor (Wired or Battery)
note - String Note for the sensor
pir_zero_enable - Boolean Whether this sensor participates in PIR zeroing. When false, the sensor will be excluded from PIR-based calibration calculations
Example
{
  "sensor_id": 4,
  "floor_id": "xyz789",
  "room_id": "xyz789",
  "hive_id": "xyz789",
  "hive_serial": "xyz789",
  "name": "xyz789",
  "mac_address": "xyz789",
  "mode": "abc123",
  "model": "abc123",
  "sensitivity": 123.45,
  "center": [123.45],
  "height": 123.45,
  "is_entrance": false,
  "is_building_entrance": true,
  "parallel_to_door": true,
  "active_hours": [987.65],
  "calibration": SensorCalibrationInput,
  "door_line": 123.45,
  "generation": 987.65,
  "in_direction": 987.65,
  "orientation": [987.65],
  "field_of_view": 987.65,
  "color": [123.45],
  "algo_config": AlgoConfigInput,
  "last_battery_change_date": "10:15:30Z",
  "next_battery_change_date": "10:15:30Z",
  "power_type": "Wired",
  "note": "abc123",
  "pir_zero_enable": false
}

CreateTagInput

Fields
Input Field Description
name - String!
Example
{"name": "abc123"}

CreateUnitInput

Description

Input for creating a Unit entity

Fields
Input Field Description
unit_id - ID Provide your own ID for this unit to make this operation idempotent. It will re-create the unit if it already exists, overwriting any provided values
floor_id - String! The unique identifier of the associated floor
name - String! The display name of the unit
coordinates - [Float!] The coordinates of the unit's boundary vertices. Must describe a valid, non-self-intersecting polygon that does not overlap any other unit on the same floor (shared edges with adjacent units are allowed)
note - String Note for the unit
Example
{
  "unit_id": 4,
  "floor_id": "xyz789",
  "name": "xyz789",
  "coordinates": [987.65],
  "note": "abc123"
}

CreateZoneInput

Description

The input type required to create a new zone

Fields
Input Field Description
zone_id - ID Provide your own ID for this room to make this operation idempotent. It will re-create the room if it already exists, overwriting any provided values
floor_id - String! The unique identifier of the floor that will contain the zone
room_id - String The unique identifier of the room that will contain the zone (optional)
name - String! The name of the zone
coordinates - [Float!] The coordinates of the zone's location within the space
rotation - Float The new rotation of the zone (in degrees)
capacity - CapacityInput The capacity information of the zone
note - String Note for the zone
Example
{
  "zone_id": "4",
  "floor_id": "xyz789",
  "room_id": "abc123",
  "name": "abc123",
  "coordinates": [987.65],
  "rotation": 123.45,
  "capacity": CapacityInput,
  "note": "abc123"
}

DeviceStatus

Description

The operational status of a device (sensor or hive)

Values
Enum Value Description

ACTIVE

The device is active and operational

ARCHIVED

The device has been archived and is excluded from alerts and fleet health metrics
Example
"ACTIVE"

EndpointConfig

Description

Configuration settings for the endpoint where the webhook sends data

Fields
Field Name Description
url - String! The URL of the webhook endpoint where events will be sent. Only HTTPS URLs are supported
http_timeout - Int! The HTTP timeout in seconds for the request to complete. Acceptable values are between 1 and 15
api_key - ApiKey Optional API key configuration for header-based authentication
basic_auth - BasicAuth Optional basic authentication configuration, including username and password
Example
{
  "url": "abc123",
  "http_timeout": 987,
  "api_key": ApiKey,
  "basic_auth": BasicAuth
}

EndpointConfigInput

Description

Input type for endpoint configuration, specifying the webhook destination and authentication settings

Fields
Input Field Description
url - String! The URL of the webhook endpoint where events will be sent. Only HTTPS URLs are supported
http_timeout - Int! The HTTP timeout in seconds for the request to complete. Acceptable values range from 1 to 15
api_key - ApiKeyInput Optional API key configuration for header-based authentication
basic_auth - BasicAuthInput Optional basic authentication configuration, providing a username and password
Example
{
  "url": "xyz789",
  "http_timeout": 123,
  "api_key": ApiKeyInput,
  "basic_auth": BasicAuthInput
}

EndpointConfigUpdate

Description

Input for updating endpoint configuration details

Fields
Input Field Description
url - String The new URL of the webhook endpoint. If omitted, the URL remains unchanged
http_timeout - Int The new HTTP timeout for the webhook. If omitted, the timeout remains unchanged
api_key - APIKeyUpdate The new API key configuration for the webhook. If omitted, the API key remains unchanged
basic_auth - BasicAuthUpdate The new basic authentication configuration for the webhook. If omitted, the authentication remains unchanged
Example
{
  "url": "abc123",
  "http_timeout": 987,
  "api_key": APIKeyUpdate,
  "basic_auth": BasicAuthUpdate
}

EventType

Description

Enum representing the different types of events that can be tracked with a webhook

Values
Enum Value Description

FLOOR_OCCUPANCY

Event type for floor occupancy updates

FLOOR_OCCUPANCY_1MIN

Event type for floor occupancy every minute updates

ROOM_OCCUPANCY

Event type for room occupancy updates

ROOM_OCCUPANCY_1MIN

Event type for room occupancy every minute updates

ZONE_OCCUPANCY

Event type for zone occupancy updates

ZONE_OCCUPANCY_1MIN

Event type for zone occupancy every minute updates

DETECTIONS

Event type for detection coordinate updates

TRAFFIC

Event type for traffic (enter/exits) updates

PIR_MOTION

Event type for PIR motion updates

PIR_NO_MOTION

Event type for PIR no motion updates

SENSOR_HEALTH

Event type for sensor health updates

HIVE_HEALTH

Event type for hive health updates

ENTER_ALERTS

Event type for enter alerts when motion is detected entering a space

EXIT_ALERTS

Event type for exit alerts when motion is detected leaving a space

NO_MOTION

Event type for no motion alerts when no motion has been observed for a configured duration

CAPACITY_EXCEEDED_ROOM

Event type for room capacity exceeded alerts when room occupancy reaches or exceeds the configured maximum capacity

CAPACITY_EXCEEDED_ZONE

Event type for zone capacity exceeded alerts when zone occupancy reaches or exceeds the configured maximum capacity

CAPACITY_EXCEEDED_FLOOR

Event type for floor capacity exceeded alerts when floor occupancy reaches or exceeds the configured maximum capacity
Example
"FLOOR_OCCUPANCY"

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754

Example
987.65

Floor

Description

A type representing a floor in a building

Fields
Field Name Description
id - ID! The unique identifier of the floor
building_id - ID! The unique identifier of the associated building
building - Building! The Building entity associated with the floor
metadata - MetaData! The metadata associated with the floor
name - String! The name of the floor
timezone - String! The timezone of the floor location
area - Area! The area information of the floor
capacity - Capacity! The capacity information of the floor
installation_date - Int! The installation date timestamp of the floor
installation_status - InstallationStatus! The installation status of the floor
sensors - [Sensor!] The list of sensors associated with the floor
hives - [Hive!] The list of hives associated with the floor
last_battery_change_date - Time Last battery change date for the sensor
next_battery_change_date - Time Next battery change date for the sensor
floor_plans - [FloorPlan!] The list of floor plans associated with the floor
floorNumber - Int The floor number of the floor. Floor numbers are unique among floors in one building
tags - [Tag!] The list of tags associated with the floor
rooms - [Room!] The list of rooms associated with the floor
Arguments
ids - [String!]

Optionally filter by room IDs

zones - [Zone!] The list of zones associated with the floor
Arguments
ids - [String!]

Optionally filter by zone IDs

units - [Unit!] The list of units associated with the floor
Arguments
ids - [String!]

Optionally filter by unit IDs

spots - [Spot!] The list of spots associated with the floor
buildingId - ID! The unique identifier of the associated building Use building_id instead.
algorithm_config - JSON The algorithm configuration from the database as JSON
end_of_day_time - String! End-of-day time for calibration (HH:MM:SS format, e.g., "23:59:59"). Defaults to "23:59:59" (midnight)
end_of_day_occupancy - Int! Expected occupancy at end of day for calibration. Defaults to 0
is_building_data_source - Boolean! Whether this floor is the building's data source. At most one floor per building may be the data source
exclude_from_building_view - Boolean! Whether this floor is excluded from the building view
is_demo - Boolean! Whether this floor belongs to a simulated demo studio. Computed from the floor's tag_ids via the same predicate the backend uses everywhere else (demosim.IsDemoFloor); true only for the demo studio. Clients use it to render the simulated office in the viewer's local timezone
floor_id - ID! Use the id field instead
client_id - String! No longer supported
Example
{
  "id": "4",
  "building_id": 4,
  "building": Building,
  "metadata": MetaData,
  "name": "abc123",
  "timezone": "abc123",
  "area": Area,
  "capacity": Capacity,
  "installation_date": 123,
  "installation_status": "NOT_INSTALLED",
  "sensors": [Sensor],
  "hives": [Hive],
  "last_battery_change_date": "10:15:30Z",
  "next_battery_change_date": "10:15:30Z",
  "floor_plans": [FloorPlan],
  "floorNumber": 123,
  "tags": [Tag],
  "rooms": [Room],
  "zones": [Zone],
  "units": [Unit],
  "spots": [Spot],
  "buildingId": 4,
  "algorithm_config": {},
  "end_of_day_time": "abc123",
  "end_of_day_occupancy": 123,
  "is_building_data_source": false,
  "exclude_from_building_view": true,
  "is_demo": true,
  "floor_id": 4,
  "client_id": "abc123"
}

FloorPlan

Description

Type representing a floor plan

Fields
Field Name Description
floor_plan_id - String! The unique identifier of the floor plan
coordinates - [Float!] The coordinates for the floor plan
name - String! The name of the floor plan
url - String! The URL for accessing the floor plan
Example
{
  "floor_plan_id": "abc123",
  "coordinates": [987.65],
  "name": "xyz789",
  "url": "xyz789"
}

Floors

Description

A wrapper for a list of floors

Fields
Field Name Description
data - [Floor!]! The list of floors
Example
{"data": [Floor]}

Hive

Description

Hive entity that represents a device on the floor of a building

Fields
Field Name Description
id - ID!
floor - Floor Floor entity associated with the Hive
room - Room Room entity associated with the Hive
metadata - MetaData! MetaData associated with the Hive
coordinates - [Float!]! Coordinates of the Hive in the room
name - String! Name of the Hive
connectionHealth - ConnectionHealthHive! The connection health of the hive
is_sleep_time - Boolean! Whether the hive is currently in sleep time according to its configured frame rate schedule
sensors - [Sensor!] List of sensors associated with the Hive. Can be filtered by providing a list of sensor IDs
Arguments
ids - [String!]

List of sensor IDs to filter the sensors by

note - String Note for the zone
model - String Model name of the Hive (e.g., "Hive 1c", "Hive 2", "Hive 3")
model_name - String Normalized model name of the Hive (e.g., "hive1c", "hive2", "hive3")
installed - Boolean!
device_status - DeviceStatus The operational status of the hive (ACTIVE or ARCHIVED). Derived from the ops_configs JSONB field
is_clone - Boolean! Indicates if this hive is a clone (fake hive) created for cross-floor sensor cloning. Clone hives have serial numbers prefixed with "fake"
source_serial_number - String The serial number of the source hive if this is a clone hive. Null for non-clone hives
client_id - String! Client ID associated with the Hive No longer supported
floor_id - String! Floor ID where the Hive is located
room_id - String! Room ID where the Hive is located
hive_id - ID! Unique identifier of the Hive Use id instead
serial_number - String! Serial number of the Hive
hive_version - String! Hive software version
hive_type - String! Type of the Hive device
last_heartbeat - Int Timestamp of the last heartbeat received from the Hive
last_raw_message - Int Timestamp of the last raw message received from the Hive
last_compressed_message - Int Timestamp of the last compressed message received from the Hive
last_occupancy_message - Int Timestamp of the last occupancy message received from the Hive
last_detection_message - Int Timestamp of the last detection message received from the Hive
last_network_id - Int Last network id received from the Hive
is_streaming - Boolean! Indicates if the sensor is streaming
activated_at - Int! Timestamp when the Hive was activated Not used.
is_online - Boolean! Hive online status
net_path_stability - Float! Network path stability of the Hive
connection_health - ConnectionHealthHive! The connection health of the hive
Example
{
  "id": "4",
  "floor": Floor,
  "room": Room,
  "metadata": MetaData,
  "coordinates": [987.65],
  "name": "xyz789",
  "connectionHealth": ConnectionHealthHive,
  "is_sleep_time": true,
  "sensors": [Sensor],
  "note": "xyz789",
  "model": "abc123",
  "model_name": "abc123",
  "installed": true,
  "device_status": "ACTIVE",
  "is_clone": false,
  "source_serial_number": "abc123",
  "client_id": "xyz789",
  "floor_id": "xyz789",
  "room_id": "abc123",
  "hive_id": "4",
  "serial_number": "abc123",
  "hive_version": "xyz789",
  "hive_type": "abc123",
  "last_heartbeat": 987,
  "last_raw_message": 987,
  "last_compressed_message": 123,
  "last_occupancy_message": 987,
  "last_detection_message": 123,
  "last_network_id": 987,
  "is_streaming": true,
  "activated_at": 987,
  "is_online": false,
  "net_path_stability": 123.45,
  "connection_health": ConnectionHealthHive
}

Hives

Description

A wrapper type for a list of Hive entities

Fields
Field Name Description
data - [Hive!] List of Hive entities
Example
{"data": [Hive]}

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID

Example
"4"

InsightBoard

Description

A user-authored, customizable dashboard ("InsightBoard") that lives under Insights → Dashboards in the dashboard frontend. Stores configuration only — widget data is queried separately at render time

Fields
Field Name Description
id - ID!
createdBy - String!
folder - String
name - String!
description - String
tags - [String!]!
model - JSON! Opaque widget configuration owned by the frontend. Typical shape: { widgets: [...], filters: {...}, templateId: "..." }. Intentionally schema-less so widget config can evolve without backend changes. Bounded to 1 MB at the database layer
shareKey - String
shared - Boolean! Visibility. false (Private) means only the creator can list/open the board; true (Shared) means the whole owning org can. Defaults to false
version - Int!
createdAt - String!
updatedAt - String!
Example
{
  "id": "4",
  "createdBy": "xyz789",
  "folder": "abc123",
  "name": "abc123",
  "description": "abc123",
  "tags": ["abc123"],
  "model": {},
  "shareKey": "xyz789",
  "shared": false,
  "version": 987,
  "createdAt": "abc123",
  "updatedAt": "abc123"
}

InsightBoardConnection

Description

Paginated container returned by the insightBoards list query

Fields
Field Name Description
items - [InsightBoardSummary!]!
total - Int!
Example
{"items": [InsightBoardSummary], "total": 123}

InsightBoardCreateInput

Fields
Input Field Description
name - String!
description - String
folder - String
tags - [String!]
model - JSON!
Example
{
  "name": "abc123",
  "description": "abc123",
  "folder": "xyz789",
  "tags": ["xyz789"],
  "model": {}
}

InsightBoardSummary

Description

Slim list-mode representation of an InsightBoard. Excludes the model JSONB to keep list responses lightweight — fetch the full type via the insightBoard(id:) query when the user opens a board

Fields
Field Name Description
id - ID!
createdBy - String!
folder - String
name - String!
description - String
tags - [String!]!
shareKey - String
shared - Boolean!
version - Int!
createdAt - String!
updatedAt - String!
Example
{
  "id": "4",
  "createdBy": "abc123",
  "folder": "abc123",
  "name": "abc123",
  "description": "xyz789",
  "tags": ["abc123"],
  "shareKey": "xyz789",
  "shared": true,
  "version": 123,
  "createdAt": "abc123",
  "updatedAt": "abc123"
}

InsightBoardUpdateInput

Fields
Input Field Description
id - ID!
name - String
description - String
folder - String
tags - [String!]
model - JSON
version - Int! Optimistic-locking version held by the client. Must equal the server-side version or the update is rejected with a version-conflict error. The server increments the version on every successful write
Example
{
  "id": 4,
  "name": "abc123",
  "description": "abc123",
  "folder": "abc123",
  "tags": ["abc123"],
  "model": {},
  "version": 987
}

InstallationStatus

Description

The installation status of a floor

Values
Enum Value Description

NOT_INSTALLED

The floor is yet to be installed

INSTALLATION_IN_PROGRESS

Installation of the floor is currently underway

QA_IN_PROGRESS

Quality Assurance (QA) checks are being carried out post-installation of the floor

INSTALLED

The floor has been successfully installed and has passed any necessary QA checks
Example
"NOT_INSTALLED"

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1

Example
123

JSON

Description

The JSON scalar type represents JSON values as specified by ECMA-404

Example
{}

MetaData

Description

A type representing metadata information for various entities

Fields
Field Name Description
created_at - Int! The timestamp when the entity was created
updated_at - Int! The timestamp when the entity was last updated
deleted_at - Int! The timestamp when the entity was deleted
Example
{"created_at": 987, "updated_at": 987, "deleted_at": 123}

MigrateSensorInput

Fields
Input Field Description
mac_address - String! MAC of the target sensor, in any of the accepted EUI-48 spellings: colon (f0:68:e3:11:f3:af), dash, Cisco dotted (f068.e311.f3af) or bare 12-hex, in any case. It is canonicalized to lowercase-colon before lookup and storage, so the spelling a label, QR scan or hive log happens to use does not matter. Mixed colon/dash separators are refused. Gen-2 EUI-64 and synthetic clone/mirror MACs are refused too, not reshaped — pairing is Gen-3 (Heatic 3) only
target_hive_id - String! Id of the hive whose credentials are provisioned ONTO the sensor
force - Boolean

Required to point a migrate at a sensor that is already bound to a hive (a re-home, the sharp edge). An initial assignment or a same-hive no-op does not need it. Carried into the job payload so the cloud→Hive dispatcher (P1-4) can gate credential-secret rotation on an explicit operator decision.

THIS IS A CLOUD-SIDE OPERATOR CONFIRMATION ONLY. It does not, and cannot, authorize a cross-hive move of an OWNED sensor: a sensor that has an owner recorded refuses a SET_PRIMARY issued by any hive other than that owner, with or without the 0x0e FORCE bit. Setting force on a cross-hive migrate of such a sensor buys a REJECTED ACK, not a re-home. Moving an owned sensor is the owner-authorized handoff described on changeHive.

The "owned" qualifier is doing real work, because the sensor-side gate keys on OWNERSHIP and a sensor is not always owned. A push from a hive that is not the stored owner IS accepted, and migrate is then the right mutation, when there is no ownership to protect:

  • a factory-fresh sensor, and one whose forget TTL has cleared its table (see is_factory_adoptable on SensorPairingStatus);
  • a sensor that carries credentials but no owner serial, such as the pilot-preload and v2-migrated units. There the sensor additionally requires the pushed SSID to byte-match the one it is already provisioned onto, so only the operator of that same network can complete the backfill;
  • a legacy hand-provisioned unit whose stored primary is still the fleet onboarding credentials. All of those stage and commit only after the join trial confirms, and none of them is a re-home of an owned sensor. None of them is admitted BY force either: what admits them is the absent owner. FORCE never overrides ownership
Example
{
  "mac_address": "xyz789",
  "target_hive_id": "abc123",
  "force": false
}

MirrorSensorInput

Description

The input object used for creating a mirror sensor. Mirrors inherit traffic mode from the source sensor and flip the in-direction by default. The mirror MAC address is generated automatically by the server

Fields
Input Field Description
source_mac_address - String! The MAC address of the source sensor to mirror
floor_id - String The unique identifier of the floor for the mirror (optional, defaults to source's floor)
room_id - String The unique identifier of the room for the mirror (optional, defaults to source's room)
name - String The name of the mirrored sensor (optional, defaults to " (Mirror)")
center - [Float!] The center coordinates for the mirrored sensor (optional, defaults to source's center)
height - Float The height for the mirrored sensor (optional, defaults to source's height)
orientation - [Float!] The orientation for the mirrored sensor (optional, defaults to source's orientation)
door_line - Float The door line distance for the mirrored sensor (optional)
is_entrance - Boolean Whether the mirrored sensor is at an entrance (optional)
parallel_to_door - Boolean Whether the mirrored sensor is parallel to a door (optional)
in_direction - Float The in-direction value for the mirrored sensor (optional, defaults to flipped source value)
Example
{
  "source_mac_address": "xyz789",
  "floor_id": "xyz789",
  "room_id": "xyz789",
  "name": "xyz789",
  "center": [987.65],
  "height": 123.45,
  "orientation": [123.45],
  "door_line": 987.65,
  "is_entrance": false,
  "parallel_to_door": false,
  "in_direction": 123.45
}

PublicLinkCreateInput

Fields
Input Field Description
spaceType - PublicLinkSpaceType!
spaceId - String!
filters - PublicLinkFiltersInput
title - String
refreshInterval - Int
isActive - Boolean
expiresAt - String
Example
{
  "spaceType": "FLOOR",
  "spaceId": "abc123",
  "filters": PublicLinkFiltersInput,
  "title": "abc123",
  "refreshInterval": 987,
  "isActive": false,
  "expiresAt": "xyz789"
}

PublicLinkFilters

Fields
Field Name Description
floorIds - [String!]
roomIds - [String!]
zoneIds - [String!]
tagIds - [String!]
Example
{
  "floorIds": ["abc123"],
  "roomIds": ["xyz789"],
  "zoneIds": ["xyz789"],
  "tagIds": ["abc123"]
}

PublicLinkFiltersInput

Fields
Input Field Description
floorIds - [String!]
roomIds - [String!]
zoneIds - [String!]
tagIds - [String!]
Example
{
  "floorIds": ["xyz789"],
  "roomIds": ["abc123"],
  "zoneIds": ["xyz789"],
  "tagIds": ["xyz789"]
}

PublicLinkSpaceType

Values
Enum Value Description

FLOOR

BUILDING

Example
"FLOOR"

PublicLinkUpdateInput

Fields
Input Field Description
id - ID!
filters - PublicLinkFiltersInput
title - String
refreshInterval - Int
isActive - Boolean
expiresAt - String
Example
{
  "id": 4,
  "filters": PublicLinkFiltersInput,
  "title": "abc123",
  "refreshInterval": 123,
  "isActive": false,
  "expiresAt": "xyz789"
}

Room

Description

A Room entity represents a specific area within a Floor

Fields
Field Name Description
id - ID! The unique identifier of the room
floor - Floor! The Floor entity associated with the Room
metadata - MetaData! The MetaData associated with the room
name - String! The display name of the room
area - Area! The area of the room
coordinates - [Float!] The coordinates of the room's vertices
capacity - Capacity! The room's capacity information
rotation - Float The room's clockwise rotation (in degrees)
tags - [Tag!] The list of tags associated with the room
sensors - [Sensor!] A list of associated Sensor entities
Arguments
ids - [String!]

A list of sensor ids to filter by

spots - [Spot!] The list of spots within the room boundaries (resolved spatially via PostGIS)
unit - Unit The unit this room belongs to, if any (derived from geometry: the unit whose boundaries contain the room's centroid)
note - String Note for the room
pir_zero_enable - Boolean! Whether PIR zeroing is enabled for this room. When enabled, the calibrated endpoint will use PIR motion data to generate zero-occupancy calibration points
pir_zero_threshold - Float Custom PIR confidence threshold for this room (0.0-1.0). PIR values below this threshold indicate no human presence. If not set, uses the default threshold of 0.05
pir_zero_window - Int Custom minimum duration (in seconds) for PIR absence periods to trigger calibration. Only absence periods longer than this duration will generate calibration points. If not set, uses the default window of 300 seconds (5 minutes)
algorithm_config - JSON The algorithm configuration from the database as JSON
room_id - ID! Use the id field instead
client_id - String! No longer supported
floor_id - String!
color - [Float!] Room colors are no longer supported.
room_type - String!
auto_calibrated_at - Int! No longer supported
Example
{
  "id": 4,
  "floor": Floor,
  "metadata": MetaData,
  "name": "xyz789",
  "area": Area,
  "coordinates": [987.65],
  "capacity": Capacity,
  "rotation": 123.45,
  "tags": [Tag],
  "sensors": [Sensor],
  "spots": [Spot],
  "unit": Unit,
  "note": "xyz789",
  "pir_zero_enable": false,
  "pir_zero_threshold": 987.65,
  "pir_zero_window": 123,
  "algorithm_config": {},
  "room_id": 4,
  "client_id": "xyz789",
  "floor_id": "xyz789",
  "color": [123.45],
  "room_type": "xyz789",
  "auto_calibrated_at": 123
}

Rooms

Description

A wrapper for a list of Room entities

Fields
Field Name Description
data - [Room!]! A list of Room entities
Example
{"data": [Room]}

Sensor

Description

The type representing detailed information about a sensor

Fields
Field Name Description
pairing_status - SensorPairingStatus! The Gen-3 pairing status of the sensor, derived from the pairing-state view. Defaults to DISCOVERING when the sensor has no pairing/telemetry facts yet
id - ID! The unique identifier of the sensor
floor - Floor The floor object associated with the sensor
unit - Unit The unit that contains the sensor, if any (derived from geometry: the unit whose boundaries contain the sensor's location)
room - Room The room object associated with the sensor
hive - Hive The hive object associated with the sensor
hive_serial - String! The serial number of the hive that the sensor belongs to
last_network_id - Int Last known network id of the hive the sensor was associated with
zones - [Zone!] A list of zone objects associated with the sensor
zone_ids - [String!] A list of unique zone identifiers that the sensor is associated with
sensor_id - ID! The unique identifier of the sensor Use id instead
metadata - MetaData! Metadata associated with the sensor
name - String! The name of the sensor
mac_address - String! The MAC address of the sensor
mode - String! The operational mode of the sensor
model - String! The model of the sensor
sensitivity - Float! The sensitivity level of the sensor
center - [Float!]! The center coordinates of the sensor's coverage area
height - Float! The height of the sensor
is_entrance - Boolean! Indicates if the sensor is located at an entrance
is_building_entrance - Boolean! Indicates if the sensor is located at a building entrance
is_online - Boolean! Indicates if the sensor is online
parallel_to_door - Boolean! Indicates if the sensor is parallel to a door
active_hours - [Float!] The active hours for the sensor Not supported
calibration - SensorCalibration! The calibration information of the sensor Not supported
door_line - Float! The door line distance value for the sensor
generation - Float! The generation of the sensor Not supported
in_direction - Float! The direction value for the sensor's detection area
last_heartbeat - Int The timestamp of the sensor's last heartbeat
last_raw_message - Int The timestamp of the sensor's last raw message
last_compressed_message - Int The timestamp of the sensor's last compressed message
last_occupancy_message - Int The timestamp of the sensor's last occupancy message
last_detection_message - Int The timestamp of the sensor's last detection message
messages_per_second - Float! The calculated messages received per second for the sensor, over the last 5 mins Not supported
is_streaming - Boolean! Indicates if the sensor is streaming
orientation - [Float!]! The orientation of the sensor
effective_field_of_view - Float! The effective field of view value for the sensor
field_of_view - Float! The field of view value for the sensor
algo_config - AlgoConfig! The algorithm configuration settings for the sensor
algorithm_config - JSON The algorithm configuration from the database as JSON
connection_health - ConnectionHealthSensor! The connection health of the sensor
is_sleep_time - Boolean! Whether the sensor is currently in sleep time according to its associated hive's configured frame rate schedule
last_battery_change_date - Time Last battery change date for the sensor
sensor_serial - String Sensor serial number
next_battery_change_date - Time Next battery change date for the sensor
power_type - SensorPowerType The power type of the sensor (Wired or Battery)
estimated_total_runtime_days - Int Estimated total runtime in days for the sensor. This value is calculated and set by a backend worker
note - String Note for the sensor
pir_zero_enable - Boolean Whether this sensor participates in PIR zeroing. When false, the sensor will be excluded from PIR-based calibration calculations
is_clone - Boolean! Whether this sensor is a virtual sensor (clone or mirror created from a physical sensor). True if the MAC address starts with "fa-ke-" or "mi-rr-or-"
is_mirror - Boolean! Whether this sensor is a mirror (clone with flipped in-direction that inherits traffic mode). True if the MAC address starts with "mi-rr-or-"
is_shallow_copy - Boolean! Whether this sensor is a shallow copy clone that replicates outputs from its source sensor. Algo should never launch a process for a shallow copy clone
source_mac_address - String The MAC address of the original physical sensor this clone was created from. Null for non-clone sensors
clones - [Sensor!]! Clone sensors derived from this physical sensor (excludes mirrors). Empty for virtual sensors (clones/mirrors cannot themselves have clones)
mirrors - [Sensor!]! Mirror sensors derived from this physical sensor. Empty for virtual sensors (clones/mirrors cannot themselves have mirrors)
device_status - DeviceStatus The operational status of the sensor (ACTIVE or ARCHIVED). Derived from the ops_configs JSONB field
room_id - String! Room ID where the Sensor is located
floor_id - String! Floor ID where the Sensor is located
hive_id - ID! Hive ID where the Sensor is located
Example
{
  "pairing_status": SensorPairingStatus,
  "id": "4",
  "floor": Floor,
  "unit": Unit,
  "room": Room,
  "hive": Hive,
  "hive_serial": "xyz789",
  "last_network_id": 123,
  "zones": [Zone],
  "zone_ids": ["xyz789"],
  "sensor_id": 4,
  "metadata": MetaData,
  "name": "xyz789",
  "mac_address": "abc123",
  "mode": "abc123",
  "model": "abc123",
  "sensitivity": 123.45,
  "center": [987.65],
  "height": 123.45,
  "is_entrance": false,
  "is_building_entrance": false,
  "is_online": false,
  "parallel_to_door": true,
  "active_hours": [987.65],
  "calibration": SensorCalibration,
  "door_line": 123.45,
  "generation": 123.45,
  "in_direction": 987.65,
  "last_heartbeat": 123,
  "last_raw_message": 123,
  "last_compressed_message": 123,
  "last_occupancy_message": 123,
  "last_detection_message": 123,
  "messages_per_second": 123.45,
  "is_streaming": false,
  "orientation": [987.65],
  "effective_field_of_view": 123.45,
  "field_of_view": 123.45,
  "algo_config": AlgoConfig,
  "algorithm_config": {},
  "connection_health": ConnectionHealthSensor,
  "is_sleep_time": true,
  "last_battery_change_date": "10:15:30Z",
  "sensor_serial": "xyz789",
  "next_battery_change_date": "10:15:30Z",
  "power_type": "Wired",
  "estimated_total_runtime_days": 123,
  "note": "xyz789",
  "pir_zero_enable": false,
  "is_clone": true,
  "is_mirror": false,
  "is_shallow_copy": false,
  "source_mac_address": "xyz789",
  "clones": [Sensor],
  "mirrors": [Sensor],
  "device_status": "ACTIVE",
  "room_id": "xyz789",
  "floor_id": "xyz789",
  "hive_id": "4"
}

SensorCalibration

Description

The type representing the calibration information of a sensor

Fields
Field Name Description
auto_calibrated_at - Int! The timestamp of the last auto-calibration event
auto_calibrate_start - Int! The start time of the auto-calibration process
auto_calibrate_end - Int! The end time of the auto-calibration process
auto_calibrate_person - Int! The number of people detected during the auto-calibration process
Example
{
  "auto_calibrated_at": 123,
  "auto_calibrate_start": 123,
  "auto_calibrate_end": 987,
  "auto_calibrate_person": 987
}

SensorCalibrationInput

Description

The input object used for updating sensor calibration attributes

Fields
Input Field Description
auto_calibrated_at - Int The timestamp of the last auto-calibration event (optional)
auto_calibrate_start - Int The start time of the auto-calibration process (optional)
auto_calibrate_end - Int The end time of the auto-calibration process (optional)
auto_calibrate_person - Int The number of people detected during the auto-calibration process (optional)
Example
{
  "auto_calibrated_at": 123,
  "auto_calibrate_start": 987,
  "auto_calibrate_end": 987,
  "auto_calibrate_person": 123
}

SensorDeviceStateReportInput

Description

One sensor's device state as the hive observed it.

Fields other than the identifiers are OPTIONAL and mean "not observed" when omitted — an omitted field leaves the stored value alone rather than clearing it, so a partial report (a DIAG tail carrying only cred_state) cannot wipe fields a fuller sweep populated. Note that a field present with value 0 is a real observation, not an absence: cred_state: 0 means factory-fresh

Fields
Input Field Description
mac_address - String! MAC of the reporting sensor, in any of the accepted EUI-48 spellings (colon, dash, Cisco dotted or bare 12-hex, any case) — a hive's native dash form is accepted directly. Canonicalized to lowercase-colon before storage. Mixed colon/dash separators are refused
observed_at - String!

When the HIVE observed these facts (RFC3339 UTC, e.g. 2026-07-25T12:00:00Z) — not when it sent them and not when we received them.

This is the ordering key, and it is bounded server-side before use: a stamp far ahead of server time is clamped to now, and a stamp predating 2020 (an uninitialised RTC) is rejected. Without that bound a hive with a bad clock could write a far-future stamp and permanently lock out every later update for that MAC

source - String! Which hive path produced the report: sweep, post_commit, or diag
cred_state - Int Sensor credential-lane state (0=factory-fresh … 4=roamed)
cred_last_result - Int Outcome of the sensor's last credential operation
cred_revert_count - String

The sensor's credential-trial revert counter, as a DECIMAL STRING.

A string because the wire value is an unsigned 32-bit counter whose saturated value (4294967295) exceeds GraphQL's signed 32-bit Int. It is clamped to the column's signed range on write

owner_hive_serial - String

The sensor's home hive serial, as the SENSOR reports it. May legitimately differ from the hive reporting it — that difference means the sensor is being SERVED by a hive that does not own it.

It does not say WHICH case, though: a roaming guest and a sheltering orphan produce the same divergence. Use cred_state to separate them. 4 ROAMED is a guest on a floor sibling, which the sensor treats as a primary-class lane and keeps streaming on at full bandwidth; 2 FALLBACK is the only state that puts the sensor on the onboarding lane, where streaming is suppressed. This field alone cannot tell the two apart

slot_count - Int How many credential slots the sensor currently holds
cred_table_hash - String

Hash of the sensor's credential table, as a DECIMAL STRING.

A string because it is a 64-bit value: GraphQL Int would overflow it and Float would silently round it, and a rounded hash compares unequal to itself, which would show every sensor as permanently drifted

Example
{
  "mac_address": "xyz789",
  "observed_at": "xyz789",
  "source": "abc123",
  "cred_state": 123,
  "cred_last_result": 123,
  "cred_revert_count": "abc123",
  "owner_hive_serial": "xyz789",
  "slot_count": 123,
  "cred_table_hash": "abc123"
}

SensorPairingActionInput

Fields
Input Field Description
mac_address - String! MAC of the target sensor, in any of the accepted EUI-48 spellings: colon (f0:68:e3:11:f3:af), dash, Cisco dotted (f068.e311.f3af) or bare 12-hex, in any case. It is canonicalized to lowercase-colon before lookup and storage, so the spelling a label, QR scan or hive log happens to use does not matter. Mixed colon/dash separators are refused. Gen-2 EUI-64 and synthetic clone/mirror MACs are refused too, not reshaped — pairing is Gen-3 (Heatic 3) only
Example
{"mac_address": "abc123"}

SensorPairingJob

Description

A durable pairing command (intent) enqueued for the cloud→Hive dispatcher (P1-4). The dispatcher is LIVE: the owning hive polls GET /v3/hives/commands, drains a bounded batch, and reports status back — it is what makes these commands reach a device at all. An overdue job reads as failed in the pairing-state view; there is no reaper, so that expiry is applied at read time

Fields
Field Name Description
id - String!
mac_address - String!
kind - String! One of: provision | validate | migrate | identify | change_hive
status - String!

One of: queued | sent | acked | confirmed | failed.

Only acked, confirmed and failed are hive-reportable; the cloud owns queued→sent. For change_hive, confirmed means the sensor LEFT the source hive and nothing more — see that mutation's note on why arrival is not observable.

KEPT FOR COMPATIBILITY, AND TOO COARSE TO DIAGNOSE A MOVE. A cross-hive move is seven asynchronous hops and all seven of them sit inside queued; a failure at hop 2 and a failure at hop 7 both write failed. Read phase and reason_code for anything an operator has to act on

deadline - Int! Deadline (unix seconds); a non-terminal job past this reads as failed
phase - String!

WHERE THE JOB IS NOW, from the closed nine-phase vocabulary over the seven hops of a move. A phase names WHO WE ARE WAITING ON, so each one has an operator action attached to it being stuck:

hop phase waiting on stuck means
1 accepted cloud the dispatcher is not picking the job up
2 target_checked cloud B's credential job is not being enqueued
3 awaiting_credential target hive B B is not polling; check B is online
4 credential_published cloud B answered but the cloud has not stored it
5 credential_stored cloud the worker is not arming A's job
6 awaiting_source_drain source hive A A is not polling; check A is online
7 handoff_sent the sensor it is inside its 120s credential trial
7 departed target hive B it left A; B has not reported it yet
7 arrived nobody terminal success

arrived is the ONLY phase that may be rendered as "moved to B". departed means the sensor left the source hive and nothing more, exactly as confirmed always has.

Failure is not a phase. It is an outcome carried by the phase that failed, which is what makes a failure always name a hop.

Empty string only when nothing is known: no trail and an unrecognised status. Treat an unfamiliar value as "an unfamiliar step", never as an error, because this vocabulary can grow in gen3-backend before this service redeploys

phase_hop - Int! The phase field's hop number, 1..7, or 0 for a phase this build does not know. Several phases share hop 7 because "the source drains it and the sensor lands on B" is one hop in the design and three distinct waits in reality. Render "step N of 7" from this
phase_outcome - String!

What happened AT phase: ok | failed | timeout.

timeout means the job sat at that phase past ITS OWN per-hop budget. Each hop has a separate bound (the two hive waits get 3 x the 30s poll interval; the trial gets the sensor's 120s window plus a poll; arrival gets one 10-min device-state sweep period), so an expiry says WHICH hop expired rather than that ten minutes passed

phase_actor - String! Who produced the current step: cloud | hive_source | hive_target | sensor. This is the field that says which box to go and look at
phase_since - Int When the job entered phase (unix seconds). Null if nothing is known
phase_inferred - Boolean!

True when phase_outcome was INFERRED at read time from the clock rather than reported by anyone: nobody has reported this hop and its budget has passed.

Worth rendering differently ("no update for 2m, presumed stuck" versus "reported failed"), because they are different claims. There is no reaper; hop expiry is applied at read time, exactly as this job's own deadline is

phase_terminal - Boolean! True when nothing further will happen: arrival, a reported failure, or an expired hop budget. This is the signal to STOP POLLING
reason_code - String

WHY IT STOPPED, machine-readable and closed. Null while the job is healthy.

target_hive_unavailable, target_hive_ineligible, target_never_published, target_refused_publish, credential_store_failed, source_never_drained, sensor_refused_handoff, sensor_reverted_to_source, arrival_unconfirmed, job_deadline_exceeded, cancelled, internal_error.

Branch on THIS, never on reason. Note that target_never_published (hop 3, B never answered) and source_never_drained (hop 6, A never claimed) are different outages with different remedies; today both produce an identical failed, and telling them apart is the point of the whole mechanism

reason - String WHY IT STOPPED, for a human, naming the hop and who we were waiting on. Null while the job is healthy. Never string-match it; the wording will change
detail - String

DEPRECATED ALIAS for reason, kept so the Studio pairing surface keeps working across the rename.

butlr-dashboard #1612 was generated against the schema before this PR, when the field was called detail, and it selects detail in PAIRING_JOB_PROGRESS_FIELDS. A GraphQL query naming a field the schema does not have fails validation, and an error discards the WHOLE response, so without this alias the move progress panel renders nothing at all the moment both PRs land. gql template literals are not type-checked, so neither CI would have caught it.

Remove once the dashboard selects reason

renamed to reason; reason_code is the machine-readable half
history - [SensorPairingJobEvent!]!

THE FULL STEP-BY-STEP TRAIL, oldest first.

Held in Redis for 24 HOURS from the last step and read in one round trip. It is diagnostics, not an audit trail: it is best-effort, the cache evicts keys under memory pressure, and it is deliberately not a Postgres column. An empty list means the trail expired, Redis was unreachable, or the job predates this mechanism. In every one of those cases phase still resolves, derived from status

Example
{
  "id": "abc123",
  "mac_address": "abc123",
  "kind": "abc123",
  "status": "xyz789",
  "deadline": 123,
  "phase": "abc123",
  "phase_hop": 987,
  "phase_outcome": "abc123",
  "phase_actor": "xyz789",
  "phase_since": 123,
  "phase_inferred": true,
  "phase_terminal": false,
  "reason_code": "abc123",
  "reason": "xyz789",
  "detail": "abc123",
  "history": [SensorPairingJobEvent]
}

SensorPairingJobEvent

Description

One step of a pairing job's trail.

Written by whichever party performed the step, so the trail crosses the cloud, both hives and the sensor. The sensitive half of the flow (the target hive's halow0 password, carried through hops 4 and 5) never enters it: the writer takes an ssid and no secret, and redacts secret-named attributes as a backstop

Fields
Field Name Description
ts - Int! When the step happened (unix seconds)
hop - Int! The step's hop number, 1..7, or 0 for a phase this build does not know
phase - String! The step, from the phase vocabulary on SensorPairingJob
outcome - String! ok | failed | timeout
actor - String! cloud | hive_source | hive_target | sensor
note - String Human sentence for a healthy step. Null on a failure
reason_code - String Closed failure code. Null unless outcome is not ok
reason - String Human failure sentence. Null unless outcome is not ok
at - Int! DEPRECATED ALIAS for ts. Same reason as SensorPairingJob.detail renamed to ts
detail - String

DEPRECATED ALIAS for reason. Same reason as SensorPairingJob.detail.

Note this returns reason and NOT note: the dashboard renders this field only on a failed step, so the failure sentence is the correct source. A healthy step's sentence is note

renamed to reason
Example
{
  "ts": 123,
  "hop": 987,
  "phase": "abc123",
  "outcome": "xyz789",
  "actor": "abc123",
  "note": "xyz789",
  "reason_code": "abc123",
  "reason": "xyz789",
  "at": 123,
  "detail": "xyz789"
}

SensorPairingState

Description

The pairing lifecycle state of a Gen-3 sensor, derived at read time from the vsensors_pairing_state view (go-libs L-2). Mirrors the state machine the Studio pairing surface renders (butlr-dashboard PAIRING_CONTRACT.md).

ROAMED and SHELTERING are the GA cred_state states (go-libs migration 1000240): they are derived only once the DIAG/device-state writers populate cred_state, so they are inert during the pilot

Values
Enum Value Description

DISCOVERING

ONLINE_UNBOUND

BOUND

WAITING_FOR_HIVE

PROVISIONING

PENDING_QA

VALIDATING

DEPLOYED

MIGRATING

RETRYING

FAILED

ROAMED

Serving full-bandwidth via a floor-sibling hive (cred_state = 4)

SHELTERING

Fell back to the onboarding lane (cred_state = 2 on lane = onboarding)
Example
"DISCOVERING"

SensorPairingStatus

Description

A Gen-3 sensor's pairing status: the derived FSM state plus the facts and latest-job context behind it. Read-only — nothing writes state back through it (the view derives everything from facts + intents)

Fields
Field Name Description
state - SensorPairingState! The derived pairing lifecycle state
lane - String HaLow lane the device was last seen on (primary | onboarding), if reported
cred_state - Int Device-reported credential state (0..4), if reported
is_online - Boolean! Whether the sensor is currently online (±15-min freshness on stream or heartbeat)
last_job_kind - String

Kind of the latest lifecycle job (provision | validate | migrate | change_hive), if any. Never identify — an LED blink is not a lifecycle event and the view excludes it.

change_hive appears here only once go-libs migration 1000252 is applied; before that the view's job CTEs filter it out. A client switching on this value must handle it, and must NOT treat a change_hive job whose last_job_status is confirmed as the sensor having ARRIVED anywhere — see the changeHive mutation for why departure is all that is observable

last_job_status - String Status of the latest lifecycle job. Deadline-expired jobs read as failed
qa_signed_by - String Who signed off QA, if the sensor is deployed
qa_signed_at - Int When QA was signed off (unix seconds), if the sensor is deployed
is_locked - Boolean! Whether the sensor currently holds an ACTIVE placement lock — its install position has been confirmed and it may not be moved by install-window balancing. Server-derived (vsensors_pairing_state.is_locked, go-libs migration 1000237): the view emits it from the active-lock CTE, so the client never has to infer "locked" from the presence of locked_at
locked_at - Int When the active placement lock was taken (unix seconds); null if unlocked
locked_by - String Who took the active placement lock; null if unlocked
floor_placement_phase - String Derived install phase of the sensor's floor: locked when EVERY bound sensor on the floor holds an active lock, else installing. Null for a sensor that is not bound to a floor
is_factory_adoptable - Boolean!

Whether the sensor has aged out of sheltering and cleared its credentials (device-reported cred_state = 0 NO_CREDS AND last_result = 5 FORGOTTEN_TTL), making it ELIGIBLE for adoption.

What the forget TTL clears is the WHOLE credential table AND the stored owner serial, and that is what makes the sensor adoptable. The sensor-side rule that protects an owned sensor (a SET_PRIMARY from a hive that is not its owner is refused, with or without the 0x0e FORCE bit) has no owner left to protect here, so it does not apply. A sensor in this state re-associates on the fleet onboarding lane as if it were factory-fresh, and it is provisioned by exactly the path a never-provisioned sensor takes: the hive serving it on that lane pushes its own credentials, and the sensor commits them only after the join trial confirms. A sensor that is still sheltering with its credentials INTACT reads false here: it is still owned, and moving it is a different case that this flag does not describe.

ELIGIBILITY IS NOT ADOPTION, and this flag must never be rendered as "a Hive will pick this up". It states one fact about the SENSOR and names no hive: reading it true enqueues nothing, selects no destination, and does not promise that any hive is in range or configured to onboard it. Which hive adopts it, and whether one does at all, is decided by whoever pushes credentials on the onboarding lane.

Orthogonal to state: a forgotten sensor keeps its cloud binding, so it can read deployed/bound and be factory-adoptable at the same time. Inert until the DIAG/device-state writers populate cred_state (go-libs migration 1000241)

serving_hive_id - String

hives.id of the floor-sibling Hive currently serving this sensor while it is ROAMED — the hive last observed forwarding its frames (sensors_mesh_history, source = 'gen3-pipeline'), which is NOT the hive the sensor is assigned to. Pair it with Sensor.hiveID (the cloud owner) to render "assigned to A, served by B" (go-libs migration 1000242).

NULL is the NORMAL reading, not an error or a missing lookup. It is null whenever ANY of these hold:

  • the sensor is not roamed (the device has not reported cred_state = 4);
  • the serving hive IS the sensor's own owner (cloud sensors.hive_id or device-reported owner_hive_serial) — a sensor served by its own hive is simply not roaming;
  • no mesh-history observation exists for the MAC.

A serving hive that merely differs from sensors.hive_id without the device reporting ROAMED is a stale cloud assignment, not a roam, and also reads null.

Inert today: no sensor has a non-NULL cred_state until the DIAG/device-state writers ship at GA, so this field reads null fleet-wide right now — correct, not a bug. Clients must render the non-roamed case, never an error state

Example
{
  "state": "DISCOVERING",
  "lane": "xyz789",
  "cred_state": 987,
  "is_online": true,
  "last_job_kind": "xyz789",
  "last_job_status": "xyz789",
  "qa_signed_by": "xyz789",
  "qa_signed_at": 987,
  "is_locked": true,
  "locked_at": 987,
  "locked_by": "xyz789",
  "floor_placement_phase": "abc123",
  "is_factory_adoptable": false,
  "serving_hive_id": "abc123"
}

SensorPowerType

Description

The possible power types for a sensor

Values
Enum Value Description

Wired

The sensor is powered by a wired connection

Battery

The sensor is powered by battery
Example
"Wired"

Sensors

Description

The type representing a collection of Sensor objects

Fields
Field Name Description
data - [Sensor!] A list of Sensor objects
Example
{"data": [Sensor]}

SensorsDeviceStateReportRejection

Description

A single unroutable entry, with the reason it will never succeed

Fields
Field Name Description
index - Int! Index of the entry in the submitted batch
mac_address - String! MAC as submitted, echoed back unnormalised for correlation
reason - String! Why the entry was rejected
Example
{
  "index": 123,
  "mac_address": "abc123",
  "reason": "xyz789"
}

SensorsDeviceStateReportResult

Description

Outcome of a reportSensorsDeviceState batch

Fields
Field Name Description
accepted - Int! Entries that were persisted, or that were correctly skipped as stale
applied - Int! Entries persisted whose observed_at was newer than the stored one. Always <= accepted; the difference is stale reports the ordering guard dropped, which is a success, not an error
rejected - [SensorsDeviceStateReportRejection!]! Entries that could not be routed and must NOT be retried (unknown or malformed MAC, unparseable observed_at). Reported rather than thrown so one bad entry cannot block the batch
Example
{
  "accepted": 123,
  "applied": 123,
  "rejected": [SensorsDeviceStateReportRejection]
}

Site

Description

A Site represents a group of buildings at a physical location, like a campus

Fields
Field Name Description
id - ID! The unique identifier of this site in the Butlr system
name - String! Each site can be given a name to make it easier to identify
buildings - [Building!]! The buildings present at this site
siteNumber - Int The site number of the site. Site numbers are unique among sites in one organization
airportCode - String IATA airport code for the nearest airport to this site (e.g., "JFK", "LAX")
airportCoords - Coords Coordinates of the nearest airport to this site. Read-only; derived from the airport code. Returns null if the airport code is not set or not found in the airports database
timezone - String The timezone of the site
Example
{
  "id": "4",
  "name": "abc123",
  "buildings": [Building],
  "siteNumber": 987,
  "airportCode": "abc123",
  "airportCoords": Coords,
  "timezone": "xyz789"
}

Sites

Fields
Field Name Description
data - [Site!]!
Example
{"data": [Site]}

Spot

Description

A Spot entity represents a named point location within a Floor

Fields
Field Name Description
id - ID! The unique identifier of the spot
floorID - ID! The unique identifier of the associated floor
roomID - ID The unique identifier of the associated room (may be null)
name - String! The display name of the spot
spotType - String! The type of the spot (e.g., 'desk', 'parking')
location - [Float!] The [x, y] coordinates of the spot's location
tags - [Tag!] The list of tags associated with the spot
note - String Note for the spot
customID - ID A custom ID can be assigned to objects which is meaningful to your system
metadata - MetaData! The metadata associated with the spot
Example
{
  "id": "4",
  "floorID": "4",
  "roomID": 4,
  "name": "abc123",
  "spotType": "xyz789",
  "location": [987.65],
  "tags": [Tag],
  "note": "abc123",
  "customID": "4",
  "metadata": MetaData
}

Spots

Description

A wrapper for a list of Spot entities

Fields
Field Name Description
data - [Spot!]! A list of Spot entities
Example
{"data": [Spot]}

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text

Example
"abc123"

Tag

Fields
Field Name Description
id - String!
name - String!
organization_id - String!
rooms - [Room!]!
zones - [Zone!]!
floors - [Floor!]!
spots - [Spot!]!
Example
{
  "id": "xyz789",
  "name": "abc123",
  "organization_id": "abc123",
  "rooms": [Room],
  "zones": [Zone],
  "floors": [Floor],
  "spots": [Spot]
}

Time

Example
"10:15:30Z"

Unit

Description

A Unit entity represents a residential dwelling (e.g. a senior-care apartment or suite) on a single Floor. Rooms, zones, and sensors belong to at most one unit; membership is derived from geometry (an entity whose centroid or location falls inside the unit's boundaries is a member)

Fields
Field Name Description
id - ID! The unique identifier of the unit
floor - Floor! The Floor entity associated with the Unit
metadata - MetaData! The MetaData associated with the unit
name - String! The display name of the unit
coordinates - [Float!] The coordinates of the unit's boundary vertices
tags - [Tag!] The list of tags associated with the unit
note - String Note for the unit
rooms - [Room!] The list of rooms whose centroid lies within the unit boundaries
zones - [Zone!] The list of zones whose centroid lies within the unit boundaries
sensors - [Sensor!] The list of sensors located within the unit boundaries
Example
{
  "id": 4,
  "floor": Floor,
  "metadata": MetaData,
  "name": "abc123",
  "coordinates": [987.65],
  "tags": [Tag],
  "note": "abc123",
  "rooms": [Room],
  "zones": [Zone],
  "sensors": [Sensor]
}

Units

Description

A wrapper for a list of Unit entities

Fields
Field Name Description
data - [Unit!]! A list of Unit entities
Example
{"data": [Unit]}

UpdateFloorInfoInput

Description

An input used to update metadata for a particular floor

Fields
Input Field Description
id - ID! The ID of the floor to update
floorNumber - Int Sets the floor number. Must be unique among floors in this building
capacity - CapacityInput Updates capacity information for the floor
area - AreaInput Updates area information for the floor
name - String Updates the name of the floor
installationStatus - InstallationStatus The installation status of the floor. Setting to INSTALLED will set the installation date to the current time unless installationDate is also set
installedAt - Time The installation date of the floor. If not set, the current time will be used
sensorLastBatteryChangedAt - Time The oldest last battery change date to apply to all sensors on the floor
sensorNextBatteryChangeAt - Time The earliest next battery change date to apply to all sensors on the floor
endOfDayTime - String End-of-day time for calibration (HH:MM:SS format, e.g., "23:59:59")
endOfDayOccupancy - Int Expected occupancy at end of day for calibration
isBuildingDataSource - Boolean Mark this floor as the building's data source. At most one floor per building may be the data source (enforced by the database)
excludeFromBuildingView - Boolean Exclude this floor from the building view
Example
{
  "id": "4",
  "floorNumber": 123,
  "capacity": CapacityInput,
  "area": AreaInput,
  "name": "xyz789",
  "installationStatus": "NOT_INSTALLED",
  "installedAt": "10:15:30Z",
  "sensorLastBatteryChangedAt": "10:15:30Z",
  "sensorNextBatteryChangeAt": "10:15:30Z",
  "endOfDayTime": "xyz789",
  "endOfDayOccupancy": 987,
  "isBuildingDataSource": false,
  "excludeFromBuildingView": false
}

UpdateFloorInfoResult

Fields
Field Name Description
floor - Floor
Example
{"floor": Floor}

UpdateRoomInput

Description

The input object used for updating room attributes

Fields
Input Field Description
room_id - ID! The unique identifier of the room to be updated
name - String The new name of the room (optional)
room_type - String The new room type (optional)
coordinates - [Float!] The new coordinates of the room (optional)
color - [Float!] The new color of the room (optional)
area - AreaInput The new area of the room (optional)
capacity - CapacityInput The new capacity of the room (optional)
rotation - Float The new rotation of the room (in degrees)
note - String Note for the zone
pir_zero_enable - Boolean Whether PIR zeroing is enabled for this room. When enabled, PIR motion data will be used to generate zero-occupancy calibration points
pir_zero_threshold - Float Custom PIR confidence threshold for this room (0.0-1.0). If not provided, uses the default threshold of 0.05
pir_zero_window - Int Custom minimum duration (in seconds) for PIR absence periods to trigger calibration. If not provided, uses the default of 300 seconds (5 minutes)
Example
{
  "room_id": 4,
  "name": "xyz789",
  "room_type": "xyz789",
  "coordinates": [987.65],
  "color": [123.45],
  "area": AreaInput,
  "capacity": CapacityInput,
  "rotation": 987.65,
  "note": "xyz789",
  "pir_zero_enable": false,
  "pir_zero_threshold": 123.45,
  "pir_zero_window": 123
}

UpdateSensorInput

Description

The input object used for updating an existing sensor with various attributes

Fields
Input Field Description
sensor_id - ID The unique identifier of the sensor
floor_id - String The unique identifier of the floor that contains the sensor (optional)
room_id - String The unique identifier of the room that contains the sensor (optional)
hive_id - String The unique identifier of the hive that the sensor belongs to (optional)
hive_serial - String The serial number of the hive that the sensor belongs to (optional)
name - String The name of the sensor (optional)
mac_address - String The MAC address of the sensor (optional)
mode - String The operational mode of the sensor (optional)
model - String The model of the sensor (optional)
sensitivity - Float The sensitivity level of the sensor (optional)
center - [Float!] The center coordinates of the sensor's coverage area (optional)
height - Float The height of the sensor (optional)
is_entrance - Boolean Indicates if the sensor is located at an entrance (optional)
is_building_entrance - Boolean Indicates if the sensor is located at a building entrance (optional)
parallel_to_door - Boolean Indicates if the sensor is parallel to a door (optional)
active_hours - [Float!] The active hours for the sensor (optional)
calibration - SensorCalibrationInput The calibration information of the sensor (optional)
door_line - Float The door line distance value for the sensor (optional)
generation - Float The generation of the sensor (optional)
in_direction - Float The direction value for the sensor's detection area (optional)
orientation - [Float!] The orientation of the sensor (optional)
field_of_view - Float The field of view value for the sensor (optional)
color - [Float!] The color of the sensor (optional)
algo_config - AlgoConfigInput The algorithm configuration settings for the sensor (optional)
last_battery_change_date - Time Last battery change date for the sensor
next_battery_change_date - Time Next battery change date for the sensor
power_type - SensorPowerType The power type of the sensor (Wired or Battery)
note - String Note for the sensor
pir_zero_enable - Boolean Whether this sensor participates in PIR zeroing. When false, the sensor will be excluded from PIR-based calibration calculations
Example
{
  "sensor_id": "4",
  "floor_id": "xyz789",
  "room_id": "abc123",
  "hive_id": "abc123",
  "hive_serial": "xyz789",
  "name": "xyz789",
  "mac_address": "abc123",
  "mode": "abc123",
  "model": "xyz789",
  "sensitivity": 987.65,
  "center": [987.65],
  "height": 987.65,
  "is_entrance": true,
  "is_building_entrance": true,
  "parallel_to_door": false,
  "active_hours": [987.65],
  "calibration": SensorCalibrationInput,
  "door_line": 987.65,
  "generation": 987.65,
  "in_direction": 123.45,
  "orientation": [123.45],
  "field_of_view": 123.45,
  "color": [123.45],
  "algo_config": AlgoConfigInput,
  "last_battery_change_date": "10:15:30Z",
  "next_battery_change_date": "10:15:30Z",
  "power_type": "Wired",
  "note": "abc123",
  "pir_zero_enable": true
}

UpdateTagInput

Fields
Input Field Description
id - String!
name - String!
Example
{
  "id": "xyz789",
  "name": "xyz789"
}

UpdateUnitInput

Description

The input object used for updating unit attributes. A unit's floor cannot be changed; moving a unit to another floor is a delete + recreate

Fields
Input Field Description
unit_id - ID! The unique identifier of the unit to be updated
name - String The new name of the unit (optional)
coordinates - [Float!] The new coordinates of the unit (optional). Must describe a valid, non-self-intersecting polygon that does not overlap any other unit on the same floor (shared edges with adjacent units are allowed)
note - String Note for the unit
Example
{
  "unit_id": 4,
  "name": "abc123",
  "coordinates": [987.65],
  "note": "abc123"
}

UpdateZoneInput

Description

The input type required to update an existing zone

Fields
Input Field Description
room_id - String The unique identifier of the room that will contain the zone (optional)
zone_id - ID! The unique identifier of the zone to update
name - String The name of the zone
coordinates - [Float!] The coordinates of the zone's location within the space
rotation - Float The clockwise rotation of the zone (in degrees)
area - AreaInput The area information of the zone
capacity - CapacityInput The capacity information of the zone
note - String Note for the zone
Example
{
  "room_id": "abc123",
  "zone_id": "4",
  "name": "abc123",
  "coordinates": [987.65],
  "rotation": 123.45,
  "area": AreaInput,
  "capacity": CapacityInput,
  "note": "abc123"
}

Webhook

Description

Represents a webhook subscription, containing information on the events it tracks and the endpoint configuration

Fields
Field Name Description
id - ID! A unique identifier for the webhook subscription
name - String! A user-defined name for the webhook, useful for identifying the webhook purpose
event_types - [EventType!]! A list of event types that the webhook subscribes to, such as FLOOR_OCCUPANCY, ROOM_OCCUPANCY, etc
endpoint_config - EndpointConfig! Configuration details for the endpoint, including URL, timeout, and authentication options
filters - JSON

Optional filters to apply to webhook events. Supports filtering by org_ids, site_ids, building_ids, floor_ids, room_ids, zone_ids, mac_addresses, and occupancy.

Example filters: { "floor_ids": ["floor_1", "floor_2"], "occupancy": { "comparison": "gt", // Trigger when occupancy > 10 "value": 10 } }

Occupancy comparison operators:

  • "gt": greater than
  • "gte": greater than or equal to
  • "lt": less than
  • "lte": less than or equal to
  • "eq": equal to
  • "ne": not equal to
send_on_value_change - Boolean! When true, webhooks will only be sent when the value of the event changes from the previous value
Example
{
  "id": "4",
  "name": "xyz789",
  "event_types": ["FLOOR_OCCUPANCY"],
  "endpoint_config": EndpointConfig,
  "filters": {},
  "send_on_value_change": false
}

WebhookCreateInput

Description

Input type for creating a new webhook

Fields
Input Field Description
name - String! A name for the webhook, chosen by the user to help identify its purpose
event_types - [EventType!]! A list of event types the webhook will subscribe to, such as FLOOR_OCCUPANCY, ROOM_OCCUPANCY, etc
endpoint_config - EndpointConfigInput! Configuration settings for the endpoint where the webhook sends data
filters - JSON

Optional filters to apply to webhook events. Supports filtering by org_ids, site_ids, building_ids, floor_ids, room_ids, zone_ids, mac_addresses, and occupancy.

For ID-based filters, use arrays of strings: { "floor_ids": ["floor_1", "floor_2"], "room_ids": ["room_abc"] }

For occupancy filters (only applies to ZONE_OCCUPANCY, ROOM_OCCUPANCY, FLOOR_OCCUPANCY events), use: { "occupancy": { "comparison": "gt", // One of: gt, gte, lt, lte, eq, ne "value": 10 // Numeric threshold } }

Filters can be combined - all conditions must be met (AND logic between different filter types, OR logic within ID arrays)

send_on_value_change - Boolean When set to true, webhooks will only be sent when the value of the event changes from the previous value. Defaults to false
Example
{
  "name": "abc123",
  "event_types": ["FLOOR_OCCUPANCY"],
  "endpoint_config": EndpointConfigInput,
  "filters": {},
  "send_on_value_change": false
}

WebhookUpdateInput

Description

Input type for updating an existing webhook

Fields
Input Field Description
id - ID! Unique identifier for the webhook to be updated
name - String Updated name for the webhook, chosen by the user
event_types - [EventType!] Updated list of event types the webhook will subscribe to
endpoint_config - EndpointConfigUpdate Updated configuration settings for the endpoint
filters - JSON

Optional filters to apply to webhook events. Supports filtering by org_ids, site_ids, building_ids, floor_ids, room_ids, zone_ids, mac_addresses, and occupancy.

For ID-based filters, use arrays of strings: { "floor_ids": ["floor_1", "floor_2"], "room_ids": ["room_abc"] }

For occupancy filters (only applies to ZONE_OCCUPANCY, ROOM_OCCUPANCY, FLOOR_OCCUPANCY events), use: { "occupancy": { "comparison": "gt", // One of: gt, gte, lt, lte, eq, ne "value": 10 // Numeric threshold } }

Filters can be combined - all conditions must be met (AND logic between different filter types, OR logic within ID arrays)

send_on_value_change - Boolean When set to true, webhooks will only be sent when the value of the event changes from the previous value
status - Boolean Updated status for the webhook. Set to false to deactivate the webhook
Example
{
  "id": "4",
  "name": "xyz789",
  "event_types": ["FLOOR_OCCUPANCY"],
  "endpoint_config": EndpointConfigUpdate,
  "filters": {},
  "send_on_value_change": true,
  "status": true
}

Zone

Description

The type representing information about a specific zone within a space

Fields
Field Name Description
id - ID! The unique identifier of the zone
metadata - MetaData! The metadata associated with the zone
name - String! The name of the zone
area - Area! The area information of the zone
coordinates - [Float!] The coordinates of the zone's location within the space
rotation - Float The clockwise rotation of the zone (in degrees)
capacity - Capacity! The capacity information of the zone
sensors - [Sensor!] A list of sensors associated with the zone
spots - [Spot!] The list of spots within the zone boundaries (resolved spatially via PostGIS)
unit - Unit The unit this zone belongs to, if any (derived from geometry: the unit whose boundaries contain the zone's centroid)
note - String Note for the zone
customID - ID A custom ID can be assigned to objects which is meaningful to your system
tags - [Tag!] The list of tags associated with the floor
client_id - String! No longer supported
floor_id - String!
room_id - String
zone_id - String! Use the id field instead
zone_type - String! Zone types are no longer supported. Contact support for more options.
color - [Float!] The color of the zone Zone colors are no longer supported.
Example
{
  "id": 4,
  "metadata": MetaData,
  "name": "xyz789",
  "area": Area,
  "coordinates": [987.65],
  "rotation": 123.45,
  "capacity": Capacity,
  "sensors": [Sensor],
  "spots": [Spot],
  "unit": Unit,
  "note": "abc123",
  "customID": "4",
  "tags": [Tag],
  "client_id": "xyz789",
  "floor_id": "xyz789",
  "room_id": "xyz789",
  "zone_id": "xyz789",
  "zone_type": "xyz789",
  "color": [987.65]
}

Zones

Description

The type representing a list of Zone objects

Fields
Field Name Description
data - [Zone!]! The list of Zone objects
Example
{"data": [Zone]}