field/find API request

Discussions about the REST API usage.
Post Reply
Jean-Luc
Posts: 5
Joined: Sat Jan 18, 2020 9:29 pm

field/find API request

Post by Jean-Luc » Sat Feb 15, 2020 6:11 pm

Hello,
The field/find API gives as a response some info which include the last date update, but not the last value.
It would be fine to have also the last value. I have not found another API which provides the last date and value if the device is down since more than 1 hour, even /measurement/loadLastFloatValue/ response an error code 204 in that case.

User avatar
admin
Site Admin
Posts: 4
Joined: Fri Jul 19, 2019 4:46 pm

Re: field/find API request

Post by admin » Mon Feb 17, 2020 11:36 am

Okay, so that you need a full record of the last measurement of the field, like this?

Code: Select all

{  
   "epoch":17910,
   "nodeId":"7c8f4bb0-17eb-11e9-9ca3-f719d74fca9a",
   "field":"teszt",
   "created":"870d9b00-17eb-11e9-b2c0-591f3111d72f",
   "floatValue":21.0,
   "textValue":null
}

Jean-Luc
Posts: 5
Joined: Sat Jan 18, 2020 9:29 pm

Re: field/find API request

Post by Jean-Luc » Mon Feb 17, 2020 2:09 pm

I had in mind something like this:
[1557155484,23.21]
The pair of last float value and timestamps of the node key and field name.

This with no time limitation, not like the following API, which provides the last 'n' float values in the last 1 hour::
/measurement/loadLastFloatValues/{nodeKey}/{fieldName}/{items}

User avatar
admin
Site Admin
Posts: 4
Joined: Fri Jul 19, 2019 4:46 pm

Re: field/find API request

Post by admin » Tue Feb 18, 2020 7:09 am

Okay, I get it. I'm going to see what I can do, because the structure of the database it is not an easy task, so, it is on the TO DO list. :)

Jean-Luc
Posts: 5
Joined: Sat Jan 18, 2020 9:29 pm

Re: field/find API request

Post by Jean-Luc » Tue Feb 18, 2020 7:51 am

Thank you. I appreciate.

Post Reply