Satellite-connected beehive monitoring

Better Beekeeping
Products & Pricing
hive weight • temp • humidity
Login
view hives
Scroll icon
Satellite-connected beehive monitoring Progress graph Get tracking

Hivemind API access

To use the Hivemind API, you simply make a request to one of the URL endpoints below, using your API key.

All API requests begin with http://hivemind.co.nz/api/, and include the API key in the URL parameter named api_key. Our demo hub on the homepage is publicly available for testing with serial number H0 (no API key needed).

For example:
http://hivemind.co.nz/api/hubs/H0/readings/new/
Login first to view your API key.

API endpoints and documentation

Readings by date

http://hivemind.co.nz/api/hubs/[serial_number]/readings/

Request readings between two given dates.

URL and query parameters

URL:serial_number Hub serial number Specify which hub to show data for.
start_date ISO-format datetime, UTC Restrict readings to after this date.
end_date ISO-format datetime, UTC Restrict readings to before this date.
by_rows Boolean (1 or 0) Return readings as rows ordered by time, one column per series, instead of separate series.
column_labels Boolean (1 or 0) Values as key-value dicts, instead of structured lists. Verbose.

Example

  • Default
  • Example by rows
  • Example with column labels
Response:
[{"type": "weights"
  "device": "S5566",
  "hub": "H3834",
  "readings": [
    ["2013-02-23 13:23:35", 57.5],
    ["2013-02-23 19:23:35", 58.4],
    ["2013-02-24 01:23:35", 59.1],
    ["2013-02-24 07:23:35", 60.1],
  ],
 },
 {"type": "battery"
  "device": "S5566",
  "hub": "H3834",
  "readings": [
    ["2013-02-23 13:23:35", 0.8],
    ["2013-02-23 19:23:35", 0.8],
    ["2013-02-24 01:23:35", 0.8],
    ["2013-02-24 07:23:35", 0.8],
  ],
 },
 {...},
]
Response:
{"columns": ["time", "hub_serial", "S5566:weights", "S5566:battery"],
 "records": [["2013-02-23 13:23:35", "H3834", 57.5, 0.8],
             ["2013-02-23 19:23:35", "H3834", 58.4, 0.8],
             ["2013-02-24 01:23:35", "H3834", 59.1, 0.8],
             ["2013-02-24 07:23:35", "H3834", 60.1, 0.8],
             [...],
            ]
}
Response:
[{"time": "2013-02-23 13:23:35", "hub_serial": "H3834", "weight": 57.5, "battery": 0.8},
 {"time": "2013-02-23 19:23:35", "hub_serial": "H3834", "weight": 58.4, "battery": 0.8},
 {"time": "2013-02-24 01:23:35", "hub_serial": "H3834", "weight": 59.1, "battery": 0.8},
 {"time": "2013-02-24 07:23:35", "hub_serial": "H3834", "weight": 60.1, "battery": 0.8},
 {...},
]

New readings since last request

http://hivemind.co.nz/api/hubs/[serial_number]/readings/new/

Request new readings since previous request to /new/ for this hub.

URL and query parameters

URL:serial_number Hub serial number Specify which hub to show data for
by_rows and column_labels As per /readings/ above

Example

Reset new readings since last request

http://hivemind.co.nz/api/hubs/[serial_number]/readings/new/reset

Reset date of previous request to /new/ and return all readings.

URL and query parameters

URL:serial_number Hub serial number Specify which hub to show data for
by_rows and column_labels As per /readings/ above

Example

List all your hubs

http://hivemind.co.nz/api/hubs/

Serial numbers and metadata for all hubs in your account.

Example

Response:
{"H1234": {
   "battery_level": 0.9,
   "battery_quality": "good",
   "label": "My hub",
   "serial_number": "H1234",
 },
 "H5678": {
   "battery_level": 0.5,
   "battery_quality": "ok",
   "label": "My other hub",
   "serial_number": "H5678",
 },
 {...},
}

Show a given hub

http://hivemind.co.nz/api/hubs/[serial_number]/

Serial numbers for all hubs in your account.

Example

Response:
{"battery_level": 0.9,
 "battery_quality": "good",
 "label": "My hub",
 "serial_number": "H1234",
}