1 Reply Latest reply on Feb 19, 2018 5:08 PM by gregor Branched from an earlier discussion.

    How to get recorded data for multiple PI Points through PI Web API?

    SamanvithaM

      Is it possible to get historical data for a defined period for multiple PI points using Web API? What would be the query format for this?

        • Re: How to get recorded data for multiple PI Points through PI Web API?
          gregor

          Hello Samanvitha,

           

          I felt your question would be worth a new question and branched it from the other one.

           

          Let's use our public PI Web API endpoint to develop the answer to your question. The first thing to do, after picking up the login information, is to lookup some WebID's, so I am searching for PI Points 'SINUSOID'.

           

          https://devdata.osisoft.com/piwebapi/search/query?q=sinusoid 
          

           

          Let's copy the WebID: P0W6Wlk0_Utku9vWTvxg45oAAQAAAAUElTUlYxXFNJTlVTT0lE

           

          Now we modify the query and look for 'CDT158'.

           

          https://devdata.osisoft.com/piwebapi/search/query?q=cdt158
          

           

          The search yields 2 results, so let's pick the WebID of 'CDT158': P0W6Wlk0_Utku9vWTvxg45oAAwAAAAUElTUlYxXENEVDE1OA

           

          The Streamset controller allows queries to multiple unrelated data items at once. Because there are at least 2 options, I suggest using GetValuesAdHoc.

           

          https://devdata.osisoft.com/piwebapi/streamsets/recorded?webid=P0W6Wlk0_Utku9vWTvxg45oAAQAAAAUElTUlYxXFNJTlVTT0lE&webid=P0W6Wlk0_Utku9vWTvxg45oAAwAAAAUElTUlYxXENEVDE1OA