Open pgdr opened 7 years ago
Please discuss. @mortalisk what are good things to think about before attempting the impossible; writing a good rest(?) api?
Suggestion:
A better alternative is perhaps to put the sensors inside locations, and measurements inside sensors in the json
This is outside my competence - but your two first points, although certainly valuable, do imply quite some computation - is it still an API?
[...] quite some computation - is it still an API?
Yes, and they can also be cached if we fear overuse.
@mortalisk many good ideas! I will update the main post to reflect your ideas.
This is a white document for the first attempt of a sane REST(?) API for the friskby data. This issue will be updated continuously as new ideas are proposed.
First, I want to be able to receive
(arithmetic) mean
,min
max
,p10
,p90
,median
,std
) on a location (e.g. Bryggen), and with one or both of measurement typesPM25
andPM10
3hrs
, with possibly a start and end dateSo, maybe I want to write
friskby/api/v1.0/timeseries
orfriskby/api/v1.0/observation/latest
?