Skip to content
Chris Borrill edited this page Dec 8, 2015 · 27 revisions

API Description


You need to understands the basic concept of OpenSensorCloud, based on three important items:

  • Device : represent a physical device wheere your sensor reside
  • Feed: represent datas from a sensor, feeds are connected to a device, a represents a set of values



To use the API you need to add X-ApiKey in the header with your API KEY. The API Key is available from your profile page You can also pass the API_KEY as a parameter of the URL with api_key=



cUrl Example

curl -i --header "Accept: application/json" 
--header "Content-Type: application/json" 
--header "X-ApiKey: 5707e849499b5fb1037515dac8db1bd1" 


Post to a device



An array of related feed measure. For each feed, there must be a either a data: field. The data field contains a list of data, this list can contains one or more element. Feeds are referenced eith by their ID or by ther name.

Format exemple:

Single feed update, single value


Single feed update, multiple values with time stamp


Multiple feed update, single value

  {"name":"lum" ,"value":  20},

cUrl example with multiple feed update

curl -i --header "Accept: application/json" --header "Content-Type: application/json" --header "X-ApiKey: 5707e849499b5fb1037515dac8db1bd1" -X POST -d '[{"name":"lum","value":"20"},{"name":"temp","value":"99"}]'

Post to a device using generic type payload (binary)


POST DATA: datas: the payload that will be decoded by the server

This can be the direct URL called by the Sigfox backend

Post to a device using sigfox callback (binary)


POST DATA: datas: the payload that will be decoded by the server device: the device number send by Sigfox. Information must be entered on OpenSensorCloud signal: optional

This can be the direct URL called by the Sigfox backend

binary binding description

In order to decode binary format, you must provide a description of this format.

This description is a JSON description, like this one:


We except a two byte value, stored into the temperature sensor

 {"name":"temp" ,"type":"int"},
 {"name":"cell" ,"type":"uint"}

Here we excpet three value, an int mappend on temp, a float (4 bytes) mappend on power, and an unsinged int (2 bytes) mapped on cell For instance, the last example is the translation of the following C struct for Arduinoe

struct {
  int name;
  float power;
  unsigned int cell,

Complex type like structure can be described.


Download device measures


(a callback parameter can be added to be jQuery compatible)

Options: numbers: the number of samples returned (default, 100000) page: the page, to be used in conjonction with numbers. For instance, to get numbers between 100 and 200, pages=1 and numbers=100, default 0 startTime: Timestamp in UTC, in the format dd_mm_yyyy or dd_mm_yyyy_hh_mm (ex: 18_12_1966_20_12 for 18/12/1966 at 20:12) endTime : Timestamp in UTC

Return: A json containing the measures for this device, in the form array of couple timestamp in milliseconds ,value.


[[1437326019000 , 1609.34],
 [1437326030000 , 1471.78],
 [1437326041000 , 1616.52],
 [1437326052000 , 1617.85],
 [1437326063000 , 1014.69],
 [1437326074000 , 171.89],
 [1437326084000 , 171.53]
Clone this wiki locally
You can’t perform that action at this time.