May I ask how do I put in the start time, end time, frequency filters? Thanks!
May I ask how do I put in the start time, end time, frequency filters? Thanks!
Hi Guangyi ,
The Stream GetRecorded action takes in starttime and endtime parameter.
If you'd like to 'sample' data from the recorded values, then please try Stream GetInterpolated instead.
Please also note that there is a bulk version of streams, streamset if you'd like a multiple datapulls at once.
Hi Guangyi ,
The Stream GetRecorded action takes in starttime and endtime parameter.
If you'd like to 'sample' data from the recorded values, then please try Stream GetInterpolated instead.
Please also note that there is a bulk version of streams, streamset if you'd like a multiple datapulls at once.
Hi (Missing Content),
I found the Time Strings page, but I'm still having trouble passing the dates I'd like to request. For example, if I want to request data from 1/1/23-2/1/23, what would the datetime format be?
Thanks (Missing Content), I got the call to work however I've run into another issue where the response only contains eight days worth of data instead of the requested month's worth. Do you happen to know why this would be? I've already verified that the tag contains all of the data I'm calling for.
(Missing Content) I've verified the data via the Excel add-in (pulls the whole month) and also plotting it in PI Vision. I'm unsure which piwebapi controller I'm querying.
(Missing Content) Apologies, thought you meant something else. My controller/endpoint is the same (/streams/[WebId]/recorded). The data for the tag I'm calling is already structured how I need it, I'm just running into this roadblock for some reason as far as automation goes. Could it be a server configuration for the API?
Hi Mike Rugh ,
I imagine you could put one as:
startTime=Jan 1 2023&endTime=Feb 1 2023.
Typically it's good to insert the year with 4 digits.
I'll need more detail to understand your issue. May I ask how you verified your data? and which piwebapi controller did you query data from?
Mike Rugh , The piwebapi controller can be found from the URL you are querying.
In the case above, it's /streams/<WebIDs>/recorded.
Excel(PI DataLink) functions could also be broken further into getting Sampled(interpolated) data and compressed(recorded) data.
maxCount parameter limits API to return only 1k rows, data points back.
You could try modifying this param.
/streams/webid/recorded?start&end&maxCount=xxxxx
Thanks (Missing Content) , now I have one more issue to solve... using the boundary params/types. I'm requesting two tags, one returns data at 10 minute intervals and the other at 1 minute intervals.
If I pass 01/01/2023 00:00:00 to 02/01/2023 00:00:00 for example, the data start point will be 01/01/2023 00:00:00 + one interval, and the end point will be 02/01/2023 00:00:00. I need that whole range shifted back one interval so the start is 00:00:00 and the end is 00:00:00 - 1 interval. Can I do that with the boundary param?
(Missing Content) Thanks, it was a problem on my end, didn't realize I was passing milliseconds too. One more thing, on DST (11/5/23) it's only passing the 24 hours when I'm expecting 25 (I validated with PI Data Link, which has 25 hours). Trying to figure out if that's a me problem or an API problem. My guess is the API will populate the JSON object with the 01:xx timestamps, and then repopulate them with the newest values because it would be a duplicate key:value pair.