Getting sensor data from the API

Hi

I’ve setup some hourly KW/hour logging to farmOS.
Where do i find the actual data in the API? I seem to only find the stream, but no values.

Planning to get diagrams pr day/week/month/year in Node-Red.

@pat You can access the data via the same URL that you use to POST data to a data stream. Just use GET instead.

If you are looking at a sensor asset in farmOS, and open the “Developer information” box, there will be a URL like:

https://myfarmos.com/asset/xxxxx/data/basic?private_key=yyyyy

That accepts both POST (for pushing) and GET (for pulling) requests.

This needs to be documented better in the user guide, if anyone wants to take a pass at that.

3 Likes

Ah. Of course :slight_smile:
I presume I can filter for timestamps with usual filter in the ur?

2 Likes

These are the available filter parameters:

  • start (timestamp)
  • end (timestamp)
  • name (string)
  • offset (integer)
  • limit (integer)
1 Like

I’ll give it a try

1 Like