API Requests

Request example using pagination

GET http://parken.perseum.com:10010/v1/sensorDataList?sensor=tc&limit=100&offset=0

Pagination is useful when handling big amount of data or, in general, to make data easier to handle.

This API method returns the latest number of results (limit) withing a certain offset.

If the limit=100 and offset=0, the API returns the last 100 results. Changing the offset=1 it will bring the next 100 results and so on.

If a sensor is specified it will return results just for that sensor, otherwise it will return the last results for all sensors.

Parameters
Name Located in Description Required Type Example
sensor query The sensor name No string PM1, PM2_5, PM10, LUX, TC, HUM, PRES, NOISE
limit query The limit of records Yes number 100
offset query The offset of records Yes number 1
Request example by dates

GET http://parken.perseum.com:10010/v1/sensorDataByDate?start_date=2016-12-07%2015:57:23&end_date=2017-05-13%2015:57:23&interval=MONTH

This API method returns results between two dates. Results are grouped by a specified interval (YEAR, MONTH, WEEK, DAY, HOUR).

This API call can also include a sensor field.

Parameters
Name Located in Description Required Type Example
sensor query The sensor name No string PM1, PM2_5, PM10, LUX, TC, HUM, PRES, NOISE
start_date query The start date Yes string 2017-05-29 15:16:28
end_date query The end date Yes string 2017-06-29 15:16:28
interval query The data interval Yes string YEAR,MONTH,WEEK,DAY,HOUR