Welcome to the Butlr GraphQL API a powerful and flexible interface that allows you to query a variety of entities such as floors, rooms, zones, sensors, and hives. By crafting precise queries, you can fetch only the data you need, avoiding over-fetching or under-fetching of information. This results in optimized performance and reduced bandwidth usage, enabling seamless access and management of your smart building ecosystem.

Contact

For any questions/issues, please contact us at

support@butlr.io

https://butlr.io/support

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

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
      }
      buildingId
      floor_id
      client_id
    }
    building_number
    buildingNumber
    address {
      lines
      country
    }
    site {
      id
      name
      buildings {
        ...BuildingFragment
      }
      siteNumber
      timezone
    }
  }
}
Variables
{"id": 4, "customID": 4}
Response
{
  "data": {
    "building": {
      "id": "4",
      "name": "xyz789",
      "capacity": Capacity,
      "floors": [Floor],
      "building_number": 987,
      "buildingNumber": 987,
      "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 {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    hives {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      installed
      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 {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      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
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    buildingId
    floor_id
    client_id
  }
}
Variables
{"id": "4", "customID": 4}
Response
{
  "data": {
    "floor": {
      "id": "4",
      "building_id": "4",
      "building": Building,
      "metadata": MetaData,
      "name": "xyz789",
      "timezone": "xyz789",
      "area": Area,
      "capacity": Capacity,
      "installation_date": 987,
      "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],
      "buildingId": 4,
      "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
      }
      buildingId
      floor_id
      client_id
    }
  }
}
Variables
{"ids": ["xyz789"]}
Response
{"data": {"floors": {"data": [Floor]}}}

floorsByTag

Description

Fetch information about floors with the specified tags

Response

Returns a Floors!

Arguments
Name Description
tagIDs - [String!]

Example

Query
query floorsByTag($tagIDs: [String!]) {
  floorsByTag(tagIDs: $tagIDs) {
    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
      }
      buildingId
      floor_id
      client_id
    }
  }
}
Variables
{"tagIDs": ["xyz789"]}
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"])

Example

Query
query hives(
  $ids: [String!],
  $serial_numbers: [String!]
) {
  hives(
    ids: $ids,
    serial_numbers: $serial_numbers
  ) {
    data {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      installed
      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": ["abc123"],
  "serial_numbers": ["xyz789"]
}
Response
{"data": {"hives": {"data": [Hive]}}}

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
      }
      buildingId
      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
    }
    sensors {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    note
    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": "abc123",
      "area": Area,
      "coordinates": [123.45],
      "capacity": Capacity,
      "rotation": 987.65,
      "tags": [Tag],
      "sensors": [Sensor],
      "note": "abc123",
      "room_id": 4,
      "client_id": "abc123",
      "floor_id": "xyz789",
      "color": [123.45],
      "room_type": "xyz789",
      "auto_calibrated_at": 123
    }
  }
}

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"])

Example

Query
query rooms($ids: [String!]) {
  rooms(ids: $ids) {
    data {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
  }
}
Variables
{"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!]

Example

Query
query roomsByTag($tagIDs: [String!]) {
  roomsByTag(tagIDs: $tagIDs) {
    data {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
  }
}
Variables
{"tagIDs": ["xyz789"]}
Response
{"data": {"roomsByTag": {"data": [Room]}}}

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"])

Example

Query
query sensors(
  $ids: [String!],
  $mac_addresses: [String!],
  $floor_ids: [String!],
  $room_ids: [String!],
  $hive_ids: [String!],
  $hive_serials: [String!]
) {
  sensors(
    ids: $ids,
    mac_addresses: $mac_addresses,
    floor_ids: $floor_ids,
    room_ids: $room_ids,
    hive_ids: $hive_ids,
    hive_serials: $hive_serials
  ) {
    data {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
  }
}
Variables
{
  "ids": ["xyz789"],
  "mac_addresses": ["abc123"],
  "floor_ids": ["xyz789"],
  "room_ids": ["abc123"],
  "hive_ids": ["xyz789"],
  "hive_serials": ["abc123"]
}
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
    timezone
  }
}
Variables
{"id": 4, "customID": "4"}
Response
{
  "data": {
    "site": {
      "id": "4",
      "name": "abc123",
      "buildings": [Building],
      "siteNumber": 987,
      "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
      timezone
    }
  }
}
Response
{"data": {"sites": {"data": [Site]}}}

tags

Description

List the tags

Response

Returns [Tag!]

Example

Query
query tags {
  tags {
    id
    name
    organization_id
  }
}
Response
{
  "data": {
    "tags": [
      {
        "id": "abc123",
        "name": "abc123",
        "organization_id": "abc123"
      }
    ]
  }
}

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 {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    note
    customID
    tags {
      id
      name
      organization_id
    }
    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": 987.65,
      "capacity": Capacity,
      "sensors": [Sensor],
      "note": "xyz789",
      "customID": 4,
      "tags": [Tag],
      "client_id": "xyz789",
      "floor_id": "abc123",
      "room_id": "xyz789",
      "zone_id": "xyz789",
      "zone_type": "abc123",
      "color": [123.45]
    }
  }
}

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
      }
      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!]

Example

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

Mutations

associateTag

Description

Associate tags with floors, zones and rooms

Response

Returns an Association

Arguments
Name Description
input - AssociateTagInput

Example

Query
mutation associateTag($input: AssociateTagInput) {
  associateTag(input: $input) {
    tag {
      id
      name
      organization_id
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      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
      }
      note
      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
      }
      buildingId
      floor_id
      client_id
    }
  }
}
Variables
{"input": AssociateTagInput}
Response
{
  "data": {
    "associateTag": {
      "tag": Tag,
      "zones": [Zone],
      "rooms": [Room],
      "floors": [Floor]
    }
  }
}

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
      }
      buildingId
      floor_id
      client_id
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      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
      }
    }
    sensors {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    note
    installed
    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,
        "sensors": [Sensor],
        "note": "xyz789",
        "installed": true,
        "client_id": "xyz789",
        "floor_id": "xyz789",
        "room_id": "abc123",
        "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": 123,
        "last_detection_message": 987,
        "last_network_id": 987,
        "is_streaming": true,
        "activated_at": 123,
        "is_online": true,
        "net_path_stability": 987.65,
        "connection_health": ConnectionHealthHive
      }
    ]
  }
}

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
      }
      buildingId
      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
    }
    sensors {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    note
    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": [987.65],
        "capacity": Capacity,
        "rotation": 987.65,
        "tags": [Tag],
        "sensors": [Sensor],
        "note": "abc123",
        "room_id": "4",
        "client_id": "abc123",
        "floor_id": "xyz789",
        "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) {
    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
      }
      buildingId
      floor_id
      client_id
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    hive {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      installed
      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
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      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_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
    }
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeSensorFragment
      }
    }
    last_battery_change_date
    sensor_serial
    next_battery_change_date
    note
    room_id
    floor_id
    hive_id
  }
}
Variables
{"sensors": [CreateSensorInput]}
Response
{
  "data": {
    "createSensors": [
      {
        "id": "4",
        "floor": Floor,
        "room": Room,
        "hive": Hive,
        "hive_serial": "abc123",
        "zones": [Zone],
        "zone_ids": ["xyz789"],
        "sensor_id": 4,
        "metadata": MetaData,
        "name": "abc123",
        "mac_address": "abc123",
        "mode": "xyz789",
        "model": "abc123",
        "sensitivity": 987.65,
        "center": [123.45],
        "height": 123.45,
        "is_entrance": true,
        "is_online": false,
        "parallel_to_door": false,
        "active_hours": [987.65],
        "calibration": SensorCalibration,
        "door_line": 987.65,
        "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": 987.65,
        "is_streaming": false,
        "orientation": [987.65],
        "effective_field_of_view": 987.65,
        "field_of_view": 987.65,
        "algo_config": AlgoConfig,
        "connection_health": ConnectionHealthSensor,
        "last_battery_change_date": "10:15:30Z",
        "sensor_serial": "abc123",
        "next_battery_change_date": "10:15:30Z",
        "note": "xyz789",
        "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
  }
}
Variables
{"input": CreateTagInput}
Response
{
  "data": {
    "createTag": {
      "id": "xyz789",
      "name": "xyz789",
      "organization_id": "abc123"
    }
  }
}

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
  }
}
Variables
{"input": [CreateTagInput]}
Response
{
  "data": {
    "createTags": [
      {
        "id": "abc123",
        "name": "xyz789",
        "organization_id": "xyz789"
      }
    ]
  }
}

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 {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    note
    customID
    tags {
      id
      name
      organization_id
    }
    client_id
    floor_id
    room_id
    zone_id
    zone_type
    color
  }
}
Variables
{"zones": [CreateZoneInput]}
Response
{
  "data": {
    "createZones": [
      {
        "id": "4",
        "metadata": MetaData,
        "name": "xyz789",
        "area": Area,
        "coordinates": [987.65],
        "rotation": 987.65,
        "capacity": Capacity,
        "sensors": [Sensor],
        "note": "abc123",
        "customID": "4",
        "tags": [Tag],
        "client_id": "xyz789",
        "floor_id": "xyz789",
        "room_id": "abc123",
        "zone_id": "xyz789",
        "zone_type": "xyz789",
        "color": [123.45]
      }
    ]
  }
}

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 {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    hives {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      installed
      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 {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      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
      }
      note
      customID
      tags {
        ...TagFragment
      }
      client_id
      floor_id
      room_id
      zone_id
      zone_type
      color
    }
    buildingId
    floor_id
    client_id
  }
}
Variables
{"ids": ["abc123"]}
Response
{
  "data": {
    "deleteFloors": [
      {
        "id": "4",
        "building_id": "4",
        "building": Building,
        "metadata": MetaData,
        "name": "abc123",
        "timezone": "xyz789",
        "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],
        "buildingId": "4",
        "floor_id": 4,
        "client_id": "xyz789"
      }
    ]
  }
}

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
      }
      buildingId
      floor_id
      client_id
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      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
      }
    }
    sensors {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    note
    installed
    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": ["xyz789"],
  "serial_numbers": ["xyz789"]
}
Response
{
  "data": {
    "deleteHives": [
      {
        "id": "4",
        "floor": Floor,
        "room": Room,
        "metadata": MetaData,
        "coordinates": [123.45],
        "name": "xyz789",
        "connectionHealth": ConnectionHealthHive,
        "sensors": [Sensor],
        "note": "abc123",
        "installed": true,
        "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": 123,
        "last_compressed_message": 123,
        "last_occupancy_message": 987,
        "last_detection_message": 123,
        "last_network_id": 987,
        "is_streaming": true,
        "activated_at": 123,
        "is_online": false,
        "net_path_stability": 123.45,
        "connection_health": ConnectionHealthHive
      }
    ]
  }
}

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
      }
      buildingId
      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
    }
    sensors {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    note
    room_id
    client_id
    floor_id
    color
    room_type
    auto_calibrated_at
  }
}
Variables
{"ids": ["xyz789"]}
Response
{
  "data": {
    "deleteRooms": [
      {
        "id": "4",
        "floor": Floor,
        "metadata": MetaData,
        "name": "xyz789",
        "area": Area,
        "coordinates": [987.65],
        "capacity": Capacity,
        "rotation": 123.45,
        "tags": [Tag],
        "sensors": [Sensor],
        "note": "abc123",
        "room_id": 4,
        "client_id": "xyz789",
        "floor_id": "xyz789",
        "color": [123.45],
        "room_type": "abc123",
        "auto_calibrated_at": 123
      }
    ]
  }
}

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
  ) {
    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
      }
      buildingId
      floor_id
      client_id
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    hive {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      installed
      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
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      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_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
    }
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeSensorFragment
      }
    }
    last_battery_change_date
    sensor_serial
    next_battery_change_date
    note
    room_id
    floor_id
    hive_id
  }
}
Variables
{
  "ids": ["abc123"],
  "mac_addresses": ["xyz789"]
}
Response
{
  "data": {
    "deleteSensors": [
      {
        "id": 4,
        "floor": Floor,
        "room": Room,
        "hive": Hive,
        "hive_serial": "abc123",
        "zones": [Zone],
        "zone_ids": ["abc123"],
        "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_online": true,
        "parallel_to_door": true,
        "active_hours": [987.65],
        "calibration": SensorCalibration,
        "door_line": 123.45,
        "generation": 987.65,
        "in_direction": 123.45,
        "last_heartbeat": 987,
        "last_raw_message": 987,
        "last_compressed_message": 123,
        "last_occupancy_message": 987,
        "last_detection_message": 123,
        "messages_per_second": 987.65,
        "is_streaming": false,
        "orientation": [987.65],
        "effective_field_of_view": 123.45,
        "field_of_view": 123.45,
        "algo_config": AlgoConfig,
        "connection_health": ConnectionHealthSensor,
        "last_battery_change_date": "10:15:30Z",
        "sensor_serial": "xyz789",
        "next_battery_change_date": "10:15:30Z",
        "note": "xyz789",
        "room_id": "xyz789",
        "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}}

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 {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    note
    customID
    tags {
      id
      name
      organization_id
    }
    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": 123.45,
        "capacity": Capacity,
        "sensors": [Sensor],
        "note": "abc123",
        "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 and rooms

Response

Returns an Association

Arguments
Name Description
input - AssociateTagInput

Example

Query
mutation disassociateTag($input: AssociateTagInput) {
  disassociateTag(input: $input) {
    tag {
      id
      name
      organization_id
    }
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      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
      }
      note
      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
      }
      buildingId
      floor_id
      client_id
    }
  }
}
Variables
{"input": AssociateTagInput}
Response
{
  "data": {
    "disassociateTag": {
      "tag": Tag,
      "zones": [Zone],
      "rooms": [Room],
      "floors": [Floor]
    }
  }
}

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
      }
      buildingId
      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
      }
      buildingId
      floor_id
      client_id
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      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
      }
    }
    sensors {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    note
    installed
    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": "xyz789",
        "connectionHealth": ConnectionHealthHive,
        "sensors": [Sensor],
        "note": "abc123",
        "installed": true,
        "client_id": "abc123",
        "floor_id": "xyz789",
        "room_id": "abc123",
        "hive_id": "4",
        "serial_number": "abc123",
        "hive_version": "xyz789",
        "hive_type": "xyz789",
        "last_heartbeat": 987,
        "last_raw_message": 123,
        "last_compressed_message": 987,
        "last_occupancy_message": 987,
        "last_detection_message": 123,
        "last_network_id": 987,
        "is_streaming": false,
        "activated_at": 987,
        "is_online": true,
        "net_path_stability": 987.65,
        "connection_health": ConnectionHealthHive
      }
    ]
  }
}

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
      }
      buildingId
      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
    }
    sensors {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    note
    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": "xyz789",
        "area": Area,
        "coordinates": [123.45],
        "capacity": Capacity,
        "rotation": 123.45,
        "tags": [Tag],
        "sensors": [Sensor],
        "note": "xyz789",
        "room_id": "4",
        "client_id": "abc123",
        "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) {
    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
      }
      buildingId
      floor_id
      client_id
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    hive {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      installed
      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
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      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_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
    }
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeSensorFragment
      }
    }
    last_battery_change_date
    sensor_serial
    next_battery_change_date
    note
    room_id
    floor_id
    hive_id
  }
}
Variables
{"sensors": [UpdateSensorInput]}
Response
{
  "data": {
    "updateSensors": [
      {
        "id": "4",
        "floor": Floor,
        "room": Room,
        "hive": Hive,
        "hive_serial": "xyz789",
        "zones": [Zone],
        "zone_ids": ["xyz789"],
        "sensor_id": 4,
        "metadata": MetaData,
        "name": "xyz789",
        "mac_address": "abc123",
        "mode": "xyz789",
        "model": "abc123",
        "sensitivity": 987.65,
        "center": [987.65],
        "height": 987.65,
        "is_entrance": true,
        "is_online": true,
        "parallel_to_door": false,
        "active_hours": [123.45],
        "calibration": SensorCalibration,
        "door_line": 123.45,
        "generation": 987.65,
        "in_direction": 987.65,
        "last_heartbeat": 987,
        "last_raw_message": 987,
        "last_compressed_message": 123,
        "last_occupancy_message": 123,
        "last_detection_message": 123,
        "messages_per_second": 987.65,
        "is_streaming": true,
        "orientation": [123.45],
        "effective_field_of_view": 987.65,
        "field_of_view": 123.45,
        "algo_config": AlgoConfig,
        "connection_health": ConnectionHealthSensor,
        "last_battery_change_date": "10:15:30Z",
        "sensor_serial": "abc123",
        "next_battery_change_date": "10:15:30Z",
        "note": "abc123",
        "room_id": "abc123",
        "floor_id": "abc123",
        "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
  }
}
Variables
{"input": [UpdateTagInput]}
Response
{
  "data": {
    "updateTags": [
      {
        "id": "xyz789",
        "name": "xyz789",
        "organization_id": "abc123"
      }
    ]
  }
}

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 {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      hive {
        ...HiveFragment
      }
      hive_serial
      zones {
        ...ZoneFragment
      }
      zone_ids
      sensor_id
      metadata {
        ...MetaDataFragment
      }
      name
      mac_address
      mode
      model
      sensitivity
      center
      height
      is_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
      }
      connection_health {
        ...ConnectionHealthSensorFragment
      }
      last_battery_change_date
      sensor_serial
      next_battery_change_date
      note
      room_id
      floor_id
      hive_id
    }
    note
    customID
    tags {
      id
      name
      organization_id
    }
    client_id
    floor_id
    room_id
    zone_id
    zone_type
    color
  }
}
Variables
{"zones": [UpdateZoneInput]}
Response
{
  "data": {
    "updateZones": [
      {
        "id": 4,
        "metadata": MetaData,
        "name": "xyz789",
        "area": Area,
        "coordinates": [987.65],
        "rotation": 987.65,
        "capacity": Capacity,
        "sensors": [Sensor],
        "note": "abc123",
        "customID": 4,
        "tags": [Tag],
        "client_id": "xyz789",
        "floor_id": "xyz789",
        "room_id": "xyz789",
        "zone_id": "abc123",
        "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) {
    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
      }
      buildingId
      floor_id
      client_id
    }
    room {
      id
      floor {
        ...FloorFragment
      }
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      capacity {
        ...CapacityFragment
      }
      rotation
      tags {
        ...TagFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      room_id
      client_id
      floor_id
      color
      room_type
      auto_calibrated_at
    }
    hive {
      id
      floor {
        ...FloorFragment
      }
      room {
        ...RoomFragment
      }
      metadata {
        ...MetaDataFragment
      }
      coordinates
      name
      connectionHealth {
        ...ConnectionHealthHiveFragment
      }
      sensors {
        ...SensorFragment
      }
      note
      installed
      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
    zones {
      id
      metadata {
        ...MetaDataFragment
      }
      name
      area {
        ...AreaFragment
      }
      coordinates
      rotation
      capacity {
        ...CapacityFragment
      }
      sensors {
        ...SensorFragment
      }
      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_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
    }
    connection_health {
      status
      codes {
        ...ConnectionHealthCodeSensorFragment
      }
    }
    last_battery_change_date
    sensor_serial
    next_battery_change_date
    note
    room_id
    floor_id
    hive_id
  }
}
Variables
{"sensors": [CreateSensorInput]}
Response
{
  "data": {
    "upsertSensors": [
      {
        "id": "4",
        "floor": Floor,
        "room": Room,
        "hive": Hive,
        "hive_serial": "xyz789",
        "zones": [Zone],
        "zone_ids": ["abc123"],
        "sensor_id": "4",
        "metadata": MetaData,
        "name": "xyz789",
        "mac_address": "xyz789",
        "mode": "abc123",
        "model": "abc123",
        "sensitivity": 987.65,
        "center": [123.45],
        "height": 123.45,
        "is_entrance": true,
        "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": 123,
        "last_raw_message": 987,
        "last_compressed_message": 987,
        "last_occupancy_message": 123,
        "last_detection_message": 987,
        "messages_per_second": 987.65,
        "is_streaming": true,
        "orientation": [123.45],
        "effective_field_of_view": 987.65,
        "field_of_view": 123.45,
        "algo_config": AlgoConfig,
        "connection_health": ConnectionHealthSensor,
        "last_battery_change_date": "10:15:30Z",
        "sensor_serial": "xyz789",
        "next_battery_change_date": "10:15:30Z",
        "note": "xyz789",
        "room_id": "xyz789",
        "floor_id": "xyz789",
        "hive_id": 4
      }
    ]
  }
}

Types

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": ["abc123"],
  "country": "xyz789"
}

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
Example
{
  "cold_person_detection": false,
  "blacklist": [987.65],
  "sunlight": false,
  "shortened_doorline": [987.65]
}

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)
Example
{
  "blacklist": [123.45],
  "cold_person_detection": false,
  "shortened_doorline": [987.65],
  "sunlight": true
}

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": 123.45, "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": 123.45, "area_unit": "xyz789"}

AssociateTagInput

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

Association

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

Boolean

Description

The Boolean scalar type represents true or false

Example
true

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": 123,
  "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": 987.65, "max": 987.65}

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": 987.65}

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": "abc123",
  "last_timestamp": 123,
  "compared_timestamp": 987,
  "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": 123,
  "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"

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
Example
{
  "room_id": 4,
  "floor_id": "abc123",
  "name": "abc123",
  "room_type": "xyz789",
  "coordinates": [123.45],
  "color": [987.65],
  "area": AreaInput,
  "capacity": CapacityInput,
  "rotation": 123.45,
  "note": "xyz789"
}

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)
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
note - String Note for the sensor
Example
{
  "sensor_id": 4,
  "floor_id": "abc123",
  "room_id": "abc123",
  "hive_id": "xyz789",
  "hive_serial": "abc123",
  "name": "xyz789",
  "mac_address": "xyz789",
  "mode": "abc123",
  "model": "abc123",
  "sensitivity": 987.65,
  "center": [123.45],
  "height": 123.45,
  "is_entrance": false,
  "parallel_to_door": true,
  "active_hours": [123.45],
  "calibration": SensorCalibrationInput,
  "door_line": 987.65,
  "generation": 987.65,
  "in_direction": 987.65,
  "orientation": [123.45],
  "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",
  "note": "abc123"
}

CreateTagInput

Fields
Input Field Description
name - String!
Example
{"name": "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": "abc123",
  "room_id": "xyz789",
  "name": "xyz789",
  "coordinates": [123.45],
  "rotation": 123.45,
  "capacity": CapacityInput,
  "note": "xyz789"
}

Float

Description

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

Example
123.45

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

buildingId - ID! The unique identifier of the associated building Use building_id instead.
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": 987,
  "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],
  "buildingId": 4,
  "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": "xyz789",
  "coordinates": [123.45],
  "name": "abc123",
  "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
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
installed - Boolean!
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": [123.45],
  "name": "abc123",
  "connectionHealth": ConnectionHealthHive,
  "sensors": [Sensor],
  "note": "abc123",
  "installed": true,
  "client_id": "abc123",
  "floor_id": "xyz789",
  "room_id": "abc123",
  "hive_id": "4",
  "serial_number": "xyz789",
  "hive_version": "xyz789",
  "hive_type": "abc123",
  "last_heartbeat": 123,
  "last_raw_message": 123,
  "last_compressed_message": 987,
  "last_occupancy_message": 123,
  "last_detection_message": 123,
  "last_network_id": 987,
  "is_streaming": false,
  "activated_at": 987,
  "is_online": true,
  "net_path_stability": 987.65,
  "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"

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

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": 123, "updated_at": 987, "deleted_at": 123}

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

note - String Note for the room
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": [123.45],
  "capacity": Capacity,
  "rotation": 987.65,
  "tags": [Tag],
  "sensors": [Sensor],
  "note": "xyz789",
  "room_id": "4",
  "client_id": "abc123",
  "floor_id": "abc123",
  "color": [987.65],
  "room_type": "abc123",
  "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
id - ID! The unique identifier of the sensor
floor - Floor The floor object associated with the sensor
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
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_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
connection_health - ConnectionHealthSensor! The connection health of the sensor
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
note - String Note for the sensor
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
{
  "id": "4",
  "floor": Floor,
  "room": Room,
  "hive": Hive,
  "hive_serial": "abc123",
  "zones": [Zone],
  "zone_ids": ["abc123"],
  "sensor_id": 4,
  "metadata": MetaData,
  "name": "xyz789",
  "mac_address": "xyz789",
  "mode": "abc123",
  "model": "xyz789",
  "sensitivity": 123.45,
  "center": [987.65],
  "height": 987.65,
  "is_entrance": true,
  "is_online": false,
  "parallel_to_door": false,
  "active_hours": [123.45],
  "calibration": SensorCalibration,
  "door_line": 987.65,
  "generation": 987.65,
  "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": 987.65,
  "algo_config": AlgoConfig,
  "connection_health": ConnectionHealthSensor,
  "last_battery_change_date": "10:15:30Z",
  "sensor_serial": "xyz789",
  "next_battery_change_date": "10:15:30Z",
  "note": "xyz789",
  "room_id": "xyz789",
  "floor_id": "abc123",
  "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": 987,
  "auto_calibrate_end": 987,
  "auto_calibrate_person": 123
}

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": 987,
  "auto_calibrate_start": 987,
  "auto_calibrate_end": 987,
  "auto_calibrate_person": 123
}

Sensors

Description

The type representing a collection of Sensor objects

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

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
timezone - String The timezone of the site
Example
{
  "id": "4",
  "name": "xyz789",
  "buildings": [Building],
  "siteNumber": 123,
  "timezone": "xyz789"
}

Sites

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

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
"xyz789"

Tag

Fields
Field Name Description
id - String!
name - String!
organization_id - String!
Example
{
  "id": "abc123",
  "name": "xyz789",
  "organization_id": "xyz789"
}

Time

Example
"10:15:30Z"

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
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"
}

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
Example
{
  "room_id": "4",
  "name": "abc123",
  "room_type": "xyz789",
  "coordinates": [123.45],
  "color": [987.65],
  "area": AreaInput,
  "capacity": CapacityInput,
  "rotation": 987.65,
  "note": "abc123"
}

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)
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
note - String Note for the sensor
Example
{
  "sensor_id": "4",
  "floor_id": "abc123",
  "room_id": "xyz789",
  "hive_id": "xyz789",
  "hive_serial": "xyz789",
  "name": "abc123",
  "mac_address": "abc123",
  "mode": "xyz789",
  "model": "abc123",
  "sensitivity": 987.65,
  "center": [987.65],
  "height": 987.65,
  "is_entrance": true,
  "parallel_to_door": false,
  "active_hours": [987.65],
  "calibration": SensorCalibrationInput,
  "door_line": 123.45,
  "generation": 123.45,
  "in_direction": 987.65,
  "orientation": [123.45],
  "field_of_view": 987.65,
  "color": [987.65],
  "algo_config": AlgoConfigInput,
  "last_battery_change_date": "10:15:30Z",
  "next_battery_change_date": "10:15:30Z",
  "note": "abc123"
}

UpdateTagInput

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

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": "xyz789",
  "zone_id": "4",
  "name": "xyz789",
  "coordinates": [123.45],
  "rotation": 123.45,
  "area": AreaInput,
  "capacity": CapacityInput,
  "note": "xyz789"
}

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
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": 987.65,
  "capacity": Capacity,
  "sensors": [Sensor],
  "note": "xyz789",
  "customID": 4,
  "tags": [Tag],
  "client_id": "xyz789",
  "floor_id": "xyz789",
  "room_id": "xyz789",
  "zone_id": "abc123",
  "zone_type": "xyz789",
  "color": [123.45]
}

Zones

Description

The type representing a list of Zone objects

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