Sensors & Data

Upload sensor specific data: POST /sensors/{id}/data

With this method sensor data can be uploaded for a specific sensor.

URLhttps://api.sense-os.nl/sensors/{id}/data
MethodPOST
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType
json_valueUpload json values xsd:boolean

Request Body

The sensor data object

{
    "data": [
        {
            "value": 10,
            "date": 1353656777.123
        }
    ]
}

Upload sensor data: POST /sensors/data

With this method sensor data can be uploaded. The uploaded data can either be a single value or an array.

URLhttps://api.sense-os.nl/sensors/data
MethodPOST
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Request Body

{
    "sensors": [
        {
            "sensor_id": "10",
            "data": [
                {
                    "value": "{\"x-axis\":0.1,\"y-axis\":0.2,\"z-axis\":0.3}",
                    "date": "1291719228"
                },
                {
                    "value": "{\"x-axis\":0.3,\"y-axis\":0.2,\"z-axis\":0.5}",
                    "date": "1291719229"
                }
            ]
        }
    ]
}

List sensor data: GET /sensors/{id}/data

This method will return a list of sensor data. The maximum amount of data points that can be retrieved at once are 1000 items.

URLhttps://api.sense-os.nl/sensors/{id}/data
MethodGET
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType
pageThis parameter specifies which page of the results must be retrieved. The page offset starts at 0. xsd:integer
per_pageThis parameter specifies the amount of items that must be received at once. The maximum amount is 1000 items and the default amount is 100 items. xsd:integer
start_dateThe start date in UNIX time format (double seconds). Used as date to start the item search from. xsd:float
end_dateThe end date in UNIX time format (double seconds). The date until which the items will be searched. xsd:float
dateThe date in UNIX time format at which the items will be searched. xsd:float
lastWith this parameter the last item will be returned based on the item date. xsd:boolean
sortThis parameter can be used to sort the results ascending (ASC) or descending (DESC) in time. xsd:string
intervalThis parameter is for sub-sampling data. Available intervals are: 604800, 86400, 3600, 1800, 600, 300, and 60 seconds. xsd:integer

Delete sensor data: DELETE /sensors/{id}/data/{sensor_data_id}

URLhttps://api.sense-os.nl/sensors/{id}/data/{sensor_data_id}
MethodDELETE
Need AuthTrue
#### Request Headers
NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Upload a file: POST /sensors/{id}/file

With this method a file can be uploaded. The allowed file types are:
avi, wmv, wav, mov, jpg, jpeg, gif, png, 3gp, mp3, mp4. A user has
10MB storage.

URLhttps://api.sense-os.nl/sensors/{id}/file
MethodPOST
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Delete file: DELETE /sensors/{id}/data/{data_id}/file

This method deletes the file that is uploaded and stored under the
name given in this sensor data value.

URLhttps://api.sense-os.nl/sensors/{id}/data/{data_id}/file
MethodDELETE
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Delete all files: DELETE /sensors/files

This method deletes all the uploaded files of the user.

URLhttps://api.sense-os.nl/sensors/files
MethodDELETE
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType