Skip to content

Example of what the API could be

jburris edited this page Apr 21, 2013 · 4 revisions

Interact with our api by sending the data from your ArduSat, to our endpoint.

Accepted sensors: temperature, inertia, photo

Saving sensor data

To save your sensor data, simply post a JSON object to /sensors

{
  arduino: '00:B0:D0:86:BB:F7',
  sensors: [
    { kind: 'temperature',
      data: '89',
      unit: 'kelvin',
      capture_time: '2013-04-21T01:58:59Z' }
  ]
}

Saving a specific sensor

You can also specify which sensor you'd like to store, via the URL.

Either one at a time : /sensor/temperature

{
  arduino: '00:B0:D0:86:BB:F7',
  sensor: {
    data: '89',
    unit: 'kelvin',
    capture_time: '2013-04-21T01:58:59Z'
  }
}

Or all at once : /sensor/temperatures

{
  arduino: '00:B0:D0:86:BB:F7',
  sensors: [
    { data: '89',
      unit: 'kelvin',
      capture_time: '2013-04-21T01:58:59Z' },

    { data: '93',
      unit: 'kelvin',
      capture_time: '2013-04-22T01:58:59Z' }
  ]
}
Clone this wiki locally