Skip to main content

HTTP API

Authentication

Currently the only authentication implemented for the Thermostat HTTP API endpoints is an IP address whitelist. In order to access these endpoints you need to make the HTTP request from a computer that has an IP address that is on either an Employee record or a ServerUser record in the Thermostat database. Currently only IPv4 addresses are supported. More extensive authentication schemes are planned for when the web interface is implemented.

Endpoints

GET https://api.thermostat.fahrenheit.io/install.sh

This API endpoint returns a Bash script that can be used to install Thermostat, for example by running curl -4 https://api.thermostat.fahrenheit.io/install.sh | bash.

GET https://api.thermostat.fahrenheit.io/serverinit.sh

This API endpoint returns a Bash script that can be used to initialize a bare VPS server with the standard packages and configurations that Fahrenheit Marketing uses for its servers, for example by running curl -4 https://api.thermostat.fahrenheit.io/serverinit.sh | bash.

GET https://api.thermostat.fahrenheit.io/employeeserverinit.sh

This API endpoint returns a Bash script that can be used to initialize a bare VPS server with the standard packages and configurations that Fahrenheit Marketing uses for its employee servers, for example by running curl -4 https://api.thermostat.fahrenheit.io/employeeserverinit.sh | bash.

GET https://api.thermostat.fahrenheit.io/test

This endpoint returns a 200 OK response if the Thermostat API server is running properly. This endpoint requires no authentication.