Coming soon.
Our pilot project is well underway and we will soon release our API to allow more sensors to be connected.
Sensors
Sensors can include air quality (particulates and gases), noise, weather (wind, rain, temperature), water (depth, flow), car counters, car speed, parking space occupation, bus or other vehicle live location, stock availability at a location, charger availability, rental bike or car availability. They might include satellite sensors or data feeds from other open data suppliers.
Registration
We will offer two open APIs that allow you to add data to the data hub and extract data from the hub. Once you have successfully registered for an account, you will have access to the following API keys:
- Analyse key
Use this key to extract data about any sensor from the data hub for your own research projects and applications.
- Collect key
Use this key to send your sensor data to the data hub to share with the community.
If you are interested in volunteering to be part of the pilot project, email team@soxproject.org
Example Python request
# Sensor values
val1 = "1"
val2 = "2"
val3 = "3"
url = "https://api.soxproject.org/api/item/"
payload = 'f1='+val1+'&f2='+val2+'&f3='+val3+'&sensorid=' + id
headers = {
"X-API-KEY": "YOUR-API-KEY",
"Host": "api.soxproject.org",
"Connection":"close",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.request("POST", url, headers=headers, data = payload)
Example Arduino request
/* SOX Start Config Key */
String soxApiKey = "YOUR-API-KEY";
String soxHost = "api.soxproject.org";
const char* soxServer = "api.soxproject.org";
String soxSensorID = "YOUR-SENSOR-ID"; // Prefix + Chip ID
/* Sensor values */
String val1 = "1"
String val2 = "2"
String val3 = "3"
if (client.connect(soxServer, 80))
{
String postStr = "sensorid="+soxSensorID;
postStr += "&f1=";
postStr += String(val1);
postStr += "&f2=";
postStr += String(val2);
postStr += "&f3=";
postStr += String(val3);
client.println("POST /api/item/ HTTP/1.1");
client.println("Host: " + soxHost);
client.println("X-API-KEY: " + soxApiKey);
client.println("Connection: close");
client.println("Content-Type: application/x-www-form-urlencoded");
client.print("Content-Length: ");
client.println(postStr.length());
client.println();
client.print(postStr);
}