Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
curl -X POST \
  http://localhost:8085/data/dummy/location1/sensor1/humidity \
  -H 'content-type: application/senml+json' \
  -d '[{"n":"dummy/location1/sensor1/humidity","v":45}]'

You can also send values for multiple datasources in a single request (you have to give both UUIDs in the URL):

Code Block
languagebash
curl -X POST \
  http://localhost:8085/data/dummy/location1/sensor1/temperature,/data/dummy/location1/sensor1/humidity \
  -H 'content-type: application/senml+json' \
  -d '[{"bn":"dummy/location1/sensor1/","n":"temperature","v":25}, {"n":"humidity","v":42.005}]'

Get the Measurements

To get the humidity data (Change the url to http://localhost:8085/data/dummy/location1/sensor1/temperature  in order to get temperature measurements): 

...