PushingBox API is really simple, to launch a scenario of notifications you can send an HTTP request or an email. The only argument you should attach is the DeviceID. This is the unique key that identify the scenario you want to launch. The DeviceID can be found on the Scenario Page.
You can also put more arguments to define customs notifications text using your own variables.
HTTP API
Using command line in a terminal
GET Methodcurl "http://api.pushingbox.com/pushingbox?devid=v0123456789ABCDE"POST Method
curl -d "devid=v0123456789ABCDE" http://api.pushingbox.com/pushingbox
With PHP
$ch = curl_init('http://api.pushingbox.com/pushingbox?devid=v0123456789ABCDE');
curl_exec ($ch);
curl_close ($ch);
Email API (beta)
First method
Simply send an email to this email address with your DeviceID set in the Subject:
Email address: api@api.pushingbox.com
Subject: v0123456789ABCDE
Second method
In case you can't define the Subject (like a generated email from a web service), you can put the DeviceID in to email address:
Email address: api+v0123456789ABCDE@api.pushingbox.com
Use your own variables
You can use variables if you want to send some customized information with your scenario. For example, you can send the temperature.
First, create your actions like this:
The $room$ temperature is $temperature$ degree
Using HTTP API
curl "http://api.pushingbox.com/pushingbox?devid=v0123456789ABCDE&room=kitchen&temperature=23"
Using Email API
In the body of your email, put the datas on a Json format:
{'room' : 'kitchen', 'temperature' : '23'}
The result will be « The kitchen temperature is 23 degree ».
Note that you can name your variables the way you want.
At the moment the usage of the devid parameter is obviously restricted and reserved to our internal use. However, we might restrict some other variables in the near future. In that case we would definitely inform you about it prior to do it.
Limits
There is a temporary limit of 1000 API requests by day.
Library
Arduino
Arduino source code is available for the Arduino embedding official Ethernet Shield (Chip Wiznet) and the unofficial one (ENC28J60)
Official Ethernet Shield (Wiznet)
Unofficial Ethernet Shield (ENC28J60)
Arduino Wifi board
Spark Core from Spark Device
Python
A script have been developed by « Guiguiabloc », a PushingBox user. You can find it on his blog.
C# and Powershell
Here is a tutorial on how to use PushingBox as an error log in C# or Powershell.
Wanna help ?
You wrote a library and want to share it? Contact me on Twitter @PushingBox and I will surely put a link on this page!