We needed(?) a REST API to our coffee machine. So I put a Twine next to it, and made it call back over HTTP to a webhook on one of our servers. This webhook logs all the temperature changes, and now anyone can query the dataset via our REST API. It just returns if the coffee is hot or cold in beautiful JSON.
http://earthpeople.se/api/coffee
Then, just for the hell of it, I set up an API to our teapot too.
(It actually only returns that it is a teapot, according to the HTCPCC. Which is probably abusing the meaning of the status code, since it’s in the 400 Bad Request-range…)
Comments
One response to “How we created an API to our coffee machine and how we abused the 418 I’m a teapot”
Your coffee is always cold brrrrrr….