User Tools

Site Tools


user:jan001:ioa:farmos:datastream_post

Post Data to Datastream

  1. Create a Sensor in farmOS
  2. Create a DataStream in / for that sensor
  3. Call GET http://localhost/api/data_stream/basic/ to get all basic data streams
  4. Response:
    1. data includes an array of data_streams
    2. ID: res.data[i].id
    3. private_key: res.data[i].attributes.private_key
    4. name: res.data[i].attributes.name
  5. Call POST http://localhost/api/data_stream/<ID>/data?private_key=<private_key> with a Body (in Postman 'raw','json'):
    1. {'data': 20}
    2. basic data streams can only have one value
    3. will look for 'data' in JSON
  6. Should give a 201 Created back
  7. This value can now be found in Assets>Sensors>(The Sensor you want)>Data stream

Important Links:

user/jan001/ioa/farmos/datastream_post.txt · Last modified: 2021/08/24 17:35 by 127.0.0.1