I'd like to propose an enhancement to the HTTP API for hisRead and hisWrite to allow batch reads/writes.
This comes up quite a bit. There was previous discussion in topics 339 and 347 (way back in 2015). The design I propose is in-line with those discussions.
This proposal keeps the existing behavior untouched and fully backward compatible. But adds the ability to read and write multiple history points in one request.
// request
ver:"3.0"
ts, v0 id:@hisA, v1 id:@hisB
2012-04-21T08:30:00-04:00 New_York, 72.2, 10
2012-04-21T08:45:00-04:00 New_York, 76.3, N
2012-04-21T09:00:00-04:00 New_York, N, 12
Notes:
first column must be named ts and contain timestamps
any additional columns can history data (can be named anything)
each value column specifies an id of the point being written
use null for value cells without a value for that row's timestamp
Jay HerronThu 20 Apr 2023
I love these suggestions! I was recently surprised to find that hisRead only supported a single individual point.
Not that I think it should be part of this effort, but what are your thoughts on allowing a filter input for hisRead? Or do you think it's best as a 2-step process - a read followed by a hisRead?
Brian FrankWed 31 May 2023
I did add to the docs for more thorough review. Also I added a little bit of JS so you can see all the examples in both Zinc and JSON (very simple toggle right now).
Brian Frank Wed 19 Apr 2023
I'd like to propose an enhancement to the HTTP API for hisRead and hisWrite to allow batch reads/writes.
This comes up quite a bit. There was previous discussion in topics 339 and 347 (way back in 2015). The design I propose is in-line with those discussions.
This proposal keeps the existing behavior untouched and fully backward compatible. But adds the ability to read and write multiple history points in one request.
Reads
Current design for one read:
Proposed design for batch read
Notes:
tz
tag is required to specify the timezone to use and timezones are converted by serverWrite
Current design for one write:
Proposed design for batch write:
Notes:
ts
and contain timestampsJay Herron Thu 20 Apr 2023
I love these suggestions! I was recently surprised to find that hisRead only supported a single individual point.
Not that I think it should be part of this effort, but what are your thoughts on allowing a filter input for
hisRead
? Or do you think it's best as a 2-step process - aread
followed by ahisRead
?Brian Frank Wed 31 May 2023
I did add to the docs for more thorough review. Also I added a little bit of JS so you can see all the examples in both Zinc and JSON (very simple toggle right now).