Skip to content

Instantly share code, notes, and snippets.

@WillEngler
WillEngler / plenario-sensor-mock.js
Last active April 2, 2016 20:16
What should Plenario's sensor API look like?
// Every network maintainer gets an API key to authenticate POST, PATCH, DELETE requests on sensors and observations in their network
// What a network maintainer would POST to /sensor-observation
{
"data": {
"type": "sensor-observation",
"api-key": "abc123mykey", // Assigned to maintainer of sensor network
"attributes": {
"time": "2016-02-29T18:39:30.519207", // The one attribute that we mandate.
"observation": {
// The maintainer of the sensor network is responsible