FriskByBergen / friskby

3 stars 9 forks source link

API v1.0 #202

Open pgdr opened 7 years ago

pgdr commented 7 years ago

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

So, maybe I want to write friskby/api/v1.0/timeseries or friskby/api/v1.0/observation/latest?

pgdr commented 7 years ago

Please discuss. @mortalisk what are good things to think about before attempting the impossible; writing a good rest(?) api?

mortalisk commented 7 years ago

Suggestion:

mortalisk commented 7 years ago

A better alternative is perhaps to put the sensors inside locations, and measurements inside sensors in the json

joakim-hove commented 7 years ago

This is outside my competence - but your two first points, although certainly valuable, do imply quite some computation - is it still an API?

pgdr commented 7 years ago

[...] 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.