AnsweredAssumed Answered

Pi web api R client getSummary

Question asked by Taiji on Jul 16, 2019
Latest reply on Oct 17, 2019 by dallanprince

Hi 

I use Pi web api service in R and I'm want to calculate the total value from a tag for a period of time. After some searches, it seems getSummary is the way to go. I have written the following code:

piWebApiService$calculation$getSummary(endTime = '1/5/2019 6am',expression = 'Total',startTime = '1-6-2019 6am',
webId = "P0UC9rztwGrk6ZiqiDjGOvqAPSAAAATUVTXDJfV0kyMTYxMTM0X1ZfUFY",
timeType = '1 mo')

However, i got the following error message:

[1] "HTTP Status code is 400."
[1] "Error: Unknown or invalid WebID format: 'P0UC9rztwGrk6ZiqiDjGOvqAPSAAAATUVTXDJfV0kyMTYxMTM0X1ZfUFY'."
$Errors
$Errors[[1]]
[1] "Unknown or invalid WebID format: 'P0UC9rztwGrk6ZiqiDjGOvqAPSAAAATUVTXDJfV0kyMTYxMTM0X1ZfUFY'."

I have checked the webId again with the following url and can confirm it's the right one:

https://piserverxxx/piwebapi/points?path=%5C%5Cmes%5C2_WI2161134_V_PV

 

Can someone please shed some lights on this issue?

Outcomes