Skip to content

REST interface

Once the homecage server is running, it will respond to the following REST end points. Simply put, the REST interface allows you to control a Raspberry Pi camera from a web-browser.

With this, it is relatively simple to write your own code to control a Raspberry Pi running the homecage server. You could do this from Python, Javascript, Matlab, or Igor. For example, we (and now you) are using this interface for both the web and video wall interfaces.

You can try this out by entering the following web addresses into your browser:


And you should get something like this:

  "environment": {
    "humidity": 1.0,
    "temperature": 28.29
  "lights": {
    "irLED": false,
    "whiteLED": false
  "server": {
    "lastResponse": "",
    "state": "idle"
  "system": {
    "cpuTemperature": "48.3",
    "date": "2018-05-21",
    "gbRemaining": "7.70",
    "gbSize": "14.48",
    "hostname": "pi3",
    "ip": "",
    "time": "13:24:23"
  "trial": {
    "startTimeSeconds": null,
    "timeRemaining": null

Server Status:

Get runtime status of server


Get user configured options



Start and stop video recording



Start and stop video streaming



Turn lights on and off




Set user options


Simulate a scope